Bug 4862 - ip: incorrect handling of "ip link add link" with address set
Summary: ip: incorrect handling of "ip link add link" with address set
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.19.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 18:05 UTC by alex hauras
Modified: 2014-03-01 16:39 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alex hauras 2012-03-06 18:05:31 UTC
using busybox 1.19.4:

iputils ip:
#/usr/sbin/ip link add link eth0.143 address 00:22:76:13:E8:C1 eth0.143e0 type macvlan
#ifconfig eth0.143e0
eth0.143e0 Link encap:Ethernet  HWaddr 00:22:76:13:E8:C1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#ip link del eth0.143e0

busybox ip:
#ip link add link eth0.143 address 00:22:76:13:E8:C1 eth0.143e0 type macvlan
#ifconfig eth0.143e0
eth0.143e0 Link encap:Ethernet  HWaddr D6:F1:73:D0:24:55
                                ^^^^^^^^^^^^^^^^^^^^^^^^ - random ether instead of specified one
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#ip link del eth0.143e0

if we need to set address in busybox, we will need to specify it one more time:
#ip link set eth0.143e0 address 00:22:76:13:E8:C1
Comment 1 Denys Vlasenko 2014-03-01 16:39:53 UTC
Fixed in git:

commit ecd8c3affcbf39de2bdbfe347ae014abb709ab5d
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Sat Mar 1 17:38:41 2014 +0100

    ip link: add support for "address ETHADDR"