2016-01-28 15:48 GMT+03:00 Martín Ferrari <tin...@tincho.org>: > On 27/01/16 16:53, Andrey Melnikov wrote: > >> ifconfig doesn't show interface (lxcbr0 on my config). > > Does it show it if you run 'ifconfig -a'? And if you configure ip addresses? No.
# brctl addbr testbr && ip link set dev testbr up # brctl addbr testbr0 && ip link set dev testbr0 up # brctl addbr testbr1 && ip link set dev testbr1 up # ./ifconfig -a | grep testbr testbr0 Link encap:Ethernet HWaddr b2:d0:d7:30:d2:02 testbr1 Link encap:Ethernet HWaddr 5a:4f:05:b8:68:bc # ip link | grep testbr 73: testbr: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 74: testbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 75: testbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 # ip add add 10.1.0.1/24 dev testbr # ip add add 10.2.0.1/24 dev testbr0 # ip add add 10.3.0.1/24 dev testbr1 # ./ifconfig -a | grep testbr testbr0 Link encap:Ethernet HWaddr b2:d0:d7:30:d2:02 testbr1 Link encap:Ethernet HWaddr 5a:4f:05:b8:68:bc # ip -4 add | grep testbr 73: testbr: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 10.1.0.1/24 scope global testbr 74: testbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 10.2.0.1/24 scope global testbr0 75: testbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 10.3.0.1/24 scope global testbr1 # ./ifconfig testbr testbr0 Link encap:Ethernet HWaddr b2:d0:d7:30:d2:02 inet addr:10.2.0.1 Bcast:0.0.0.0 Mask:255.255.255.0 inet6 addr: fe80::b0d0:d7ff:fe30:d202/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:648 (648.0 B) total mess. But "./ifconfig testbr 10.4.0.1 netmask 255.255.255.0" configure right interface, this is good. > In any case, this bug does not seem to be severity:important, nor > deserving an upload to stable, which usually only happens for security > issues. If some user scripts parse output of this broken ifconfig - it may configure firewall with wrong IP address or any other service. This bug fixed 2 year ago in net-tools git: commit 12f5a0c5db56f035350330a4fe7081f6b61deb37 Author: Jiri Popelka <jpope...@redhat.com> Date: Mon Oct 21 10:58:56 2013 +0200 Fix nstrcmp() to prevent ifconfig from showing duplicate interfaces. Patch from TAKADA Yoshihito https://bugzilla.redhat.com/show_bug.cgi?id=1021109