[Bug 206876] ifconfig(8): Inconsistent behavior when creating and giving custom name to interface at the same time

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 19 01:47:19 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206876

--- Comment #1 from Marie Helene Kvello-Aune <marieheleneka at gmail.com> ---
I've made a patch to fix this problem. I'll submit it once I find a way of
making ifconfig echo the name of the interface AFTER the 'name' command,
instead of the name of the interface during 'create' command. Example:
"ifconfig tap create name blah" would echo "tap0" but should echo "blah".

I found the same bug appeared with the 'description' command as well (ifconfig
tap create description "some description").

The bug is that setifdescr(...) and setifname(...) doesn't copy the 'global
namespace' member 'name' onto the 'ifr.ifr_name' member before doing
operations. This made me realize a workaround exist. If you manage to run a
command which initializes 'ifr.ifr_name' properly before the 'name' or
'description' commands, these would work as expected. Example: 'ifconfig tap
create mtu 9000 name mysupertap'

I'll keep digging into the source to figure out how to echo the proper
interface name now.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list