Bug #3151
openCould not create second AddrObject on a link (link-name's length eq MAXLINKNAMELEN)
0%
Description
As i understand 'dladm' and 'ipadm' should work together, because 'dladm' creates objects, that can be used by 'ipadm'.
1. 'dladm' can create a link. max length of the link name EQ '32' http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/sys/param.h#203
2. i tried to create the following vlan:
# dladm create-vlan -l e1000g2 -v 12 vlan1234567890qwertyuiopasdfgh1
3. The vlan was successfully created:
# dladm show-vlan vlan1234567890qwertyuiopasdfgh1 LINK VID OVER FLAGS vlan1234567890qwertyuiopasdfgh1 12 e1000g2 -----
4. After that i tried to create AddrObject on the vlan:
# ipadm create-addr -T static -a 10.3.10.8/24 vlan1234567890qwertyuiopasdfgh1/ipv5
5. The AddrObject was successfully created:
# ipadm show-addr vlan1234567890qwertyuiopasdfgh1/ipv5 ADDROBJ TYPE STATE ADDR vlan1234567890qwertyuiopasdfgh1/ipv5 static ok 10.3.10.8/24
6. After that i tried to create another AddrObject on the link, but could not:
# ipadm create-addr -T static -a 10.3.11.8/24 vlan1234567890qwertyuiopasdfgh1/ipv7 ipadm: Could not create address: Operation failed
You can see truss output in the attachment file. Also i found that it returns the error here: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/inet/ip/ip_if.c#11935
Stack trace:
# dtrace -n ':::ip_sioctl_addif:entry {stack(); ustack()}' -c 'ipadm create-addr -T static -a 10.3.11.8/24 vlan1234567890qwertyuiopasdfgh1/ipv7' dtrace: description ':::ip_sioctl_addif:entry ' matched 1 probe ipadm: Could not create address: Operation failed CPU ID FUNCTION:NAME 0 58075 is_lifname_valid:entry ip`ipif_insert+0x130 ip`ipif_allocate+0x245 ip`ip_sioctl_addif+0x2e8 ip`ip_process_ioctl+0x2ab ip`ip_wput_nondata+0x2fa ip`ip_helper_wput+0x38 unix`putnext+0x21e genunix`strdoioctl+0x535 genunix`strioctl+0x469b genunix`ldi_ioctl+0x8f ip`udp_ioctl+0xc4 sockfs`so_ioctl+0x147 sockfs`socket_ioctl+0x2a sockfs`socket_vop_ioctl+0x29 genunix`fop_ioctl+0x7b genunix`ioctl+0x18e unix`_sys_sysenter_post_swapgs+0x149 libc.so.1`ioctl+0x15 libipadm.so.1`i_ipadm_create_addr+0xee libipadm.so.1`ipadm_create_addr+0x3e7 ipadm`do_create_addr+0x45b ipadm`main+0x122 ipadm`_start+0x7d dtrace: pid 9579 exited with status 1
When i created the first AddrObject on the vlan i was following stack trace:
# dtrace -n ':::is_lifname_valid:entry {stack(); ustack()}' -c 'ipadm create-addr -T static -a 10.3.10.8/24 vlan1234567890qwertyuiopasdfgh1/ipv5' dtrace: description ':::is_lifname_valid:entry ' matched 1 probe CPU ID FUNCTION:NAME 0 58075 is_lifname_valid:entry ip`ipif_insert+0x191 ip`ipif_allocate+0x435 ip`ip_ll_subnet_defaults+0x35f ip`ip_rput_dlpi_writer+0xb0 ip`qwriter_ip+0x7a ip`ip_rput_dlpi+0x214 ip`ip_rput_notdata+0x151 ip`ip_rput+0x62 unix`putnext+0x21e genunix`qreply+0x2e dld`proto_info_req+0x231 dld`dld_proto+0x97 dld`dld_wput_nondata_task+0x8b genunix`taskq_d_thread+0xb1 unix`thread_start+0x8 0 58075 is_lifname_valid:entry ip`ipif_insert+0x191 ip`ipif_allocate+0x435 ip`ip_ll_subnet_defaults+0x35f ip`ip_rput_dlpi_writer+0xb0 ip`qwriter_ip+0x7a ip`ip_rput_dlpi+0x214 ip`ip_rput_notdata+0x151 ip`ip_rput+0x62 unix`putnext+0x21e genunix`qreply+0x2e dld`proto_info_req+0x231 dld`dld_proto+0x97 dld`dld_wput_nondata_task+0x8b genunix`taskq_d_thread+0xb1 unix`thread_start+0x8
7. I tried to create another vlan (name length 15) and repeat all above operations:
# dladm create-vlan -l e1000g2 -v 15 vlanqwertyuiop1 # dladm show-vlan LINK VID OVER FLAGS vlanqwertyuiop1 15 e1000g2 ----- # ipadm create-addr -T static -a 10.3.10.2/24 vlanqwertyuiop1/ipv1 # ipadm show-addr vlanqwertyuiop1/ipv1 ADDROBJ TYPE STATE ADDR vlanqwertyuiop1/ipv1 static ok 10.3.10.2/24 # ipadm create-addr -T static -a 10.3.11.2/24 vlanqwertyuiop1/ipv2 ipadm show-addr vlanqwertyuiop1/ipv2 ADDROBJ TYPE STATE ADDR vlanqwertyuiop1/ipv2 static ok 10.3.11.2/24 # ipadm show-addr vlanqwertyuiop1/ ADDROBJ TYPE STATE ADDR vlanqwertyuiop1/ipv1 static ok 10.3.10.2/24 vlanqwertyuiop1/ipv2 static ok 10.3.11.2/24
As you can see second experiment finished without error.
Files
No data to display