OpenSolaris

Printable Version Enter a New Search
Bug ID 6745835
Synopsis dhcpagent does not support IP interface names longer than IFNAMSIZ
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:dhcp_client
Keywords xen
Responsible Engineer Peter Memishian
Reported Against
Duplicate Of
Introduced In solaris_8
Commit to Fix snv_107
Fixed In snv_107
Release Fixed solaris_nevada(snv_107)
Related Bugs 4215942
Submit Date 8-September-2008
Last Update Date 28-January-2009
Description
I want  to use the MAC address to build the name of a VNIC. I can create this
VNIC using VNA.
However,  here is the error I get when trying to start DHCP on this
interface (the error does not occur if I use static IP):

-bash-3.2# ifconfig vnic0015172426CE0 dhcp start
ifconfig: vnic0015172426CE0: interface does not exist or cannot be managed using DHCP
-bash-3.2# /usr/lib/vna vnic0015172426CE0
dladm_vnic_delete: link busy
-bash-3.2# ifconfig vnic0015172426CE0 unplumb
-bash-3.2# /usr/lib/vna vnic0015172426CE0

Now, if I don't specify the VNIC name:

-bash-3.2# /usr/lib/vna e1000g0 0:15:17:24:26:ce
vnic2
-bash-3.2# ifconfig vnic2 plumb
-bash-3.2# ifconfig vnic2 dhcp start
-bash-3.2# ifconfig vnic2
vnic2: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 27
       inet 10.17.5.214 netmask ffffff00 broadcast 10.17.5.255
       ether 0:15:17:24:26:ce 
*** (#1 of 1): [ UNSAVED ]  xxxxx@xxxxx.com
dhcp_ipc_alloc_request() truncates interface names from LIFNAMSIZ (32) to IFNAMSIZ (16), in order
to squeeze them into struct dhcp_ipc_request.ifname.

Various other parts of libdhcpagent also use IFNAMSIZ where they should prefer LIFNAMSIZ.
It's a private interface, so we could change the way the IPC request works,
but there are other problems here.  Chief among them: the standard BSD
ioctls all rely on IFNAMSIZ in struct ifreq.  If your interface name is too long,
then many portable networking applications will fall apart.

Are you sure you really want to do this with your interfaces?
Work Around
Use a smaller prefix than 'vnic', such as 'v'.
Comments
N/A