lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20121116144350.fc4012c3179b5c452832a24e@anilinux.org>
Date:	Fri, 16 Nov 2012 14:43:50 +0100
From:	Jan Dvořák <mordae@...linux.org>
To:	netdev@...r.kernel.org
Subject: losing addresses if reusing interface names too fast

Hello,

I have noticed a surprising behavior when removing virtual interfaces.
For example, removing a bridge with configured IP addresses and then
quickly creating another interface with identical name will cause the
addresses to be removed from the new interface a second or so later.

To demonstrate the issue:

brctl addbr foobar
ip addr add 10.20.30.40/24 dev foobar
ip addr show dev foobar

# 40: foobar: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
#     link/ether 12:12:f5:1b:c6:8e brd ff:ff:ff:ff:ff:ff
#     inet 10.20.30.40/24 scope global foobar

sleep 1

ip link set down dev foobar
brctl delbr foobar
ip link add name foobar link em1 type vlan id 42
ip addr add 10.20.30.40/24 dev foobar
ip addr show dev foobar

# 41: foobar@em1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
#     link/ether 00:21:cc:63:ec:3c brd ff:ff:ff:ff:ff:ff
#     inet 10.20.30.40/24 scope global foobar

sleep 3

ip addr show dev foobar
# 41: foobar@em1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
#     link/ether 00:21:cc:63:ec:3c brd ff:ff:ff:ff:ff:ff

ip link del foobar type vlan


If you monitor udev during course of this script, you will get following
sequence, spaces where sleeps were:

KERNEL[457506.286789] add      /devices/virtual/net/foobar (net)

KERNEL[457507.298630] remove   /devices/virtual/net/foobar (net)
KERNEL[457507.309597] add      /devices/virtual/net/foobar (net)

KERNEL[457510.324433] remove   /devices/virtual/net/foobar (net)


This means that I can't event wait for the bridge to get completely
removed, kernel tells me it's gone as soon as I delete it.

Could you please advise a workaround or confirm this as a bug?

Best regards,
	Jan Dvorak
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ