Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 633606[details]
Patch we're using to fix this issue
Description of problem:
shutting down an (ipv4) interface alias (e.g. eth0:1) flushes/removes all ipv6 addresses on the parent interface (e.g. eth0).
Version-Release number of selected component (if applicable):
initscripts-9.03.31-2.el6.x86_64
How reproducible:
every time
Steps to Reproduce:
1. configure some interface aliases - parent eth0 has ipv6 connectivity (ipv6 autoconfig):
$ ifconfig | egrep 'Link|inet'
eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0
inet6 addr: 2001:db8::5054:ff:fe37:1d02/64 Scope:Global
inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link
eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0
eth0:3 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.3 Bcast:192.0.2.255 Mask:255.255.255.0
2. 'ifdown' one of the aliases
$ ifdown eth0:3
Actual results:
The interface alias is shutdown, however all ipv6 addresses of the parent interface are also removed:
$ ifconfig | egrep 'Link|inet'
eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link
eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0
Expected results:
The interface alias is shutdown, and the ipv6 addresses of the parent interface remain:
$ ifconfig | egrep 'Link|inet'
eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0
inet6 addr: 2001:db8::5054:ff:fe37:1d02/64 Scope:Global
inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link
eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02
inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0
Additional info:
/sbin/ifdown calls ifdown-eth which correctly shuts down the alias address and then calls ifdown-ipv6 on the alias device.
ifdown-ipv6 munges the alias device name from "eth0:X" to the realdevice name of "eth0" and then issues an "ipv6_cleanup_device eth0" which erroneously removes all addresses on the parent device.
We have fixed this by modifying ifdown-ipv6 to only attempt to shutdown the alias, which will be a silent noop because the 'eth0:X' alias interface has no ipv6 addresses:
% diff -ur ifdown-ipv6.*
--- ifdown-ipv6.a 2012-10-26 12:22:52.000000000 +1030
+++ ifdown-ipv6.b 2012-10-26 12:22:59.000000000 +1030
@@ -46,6 +46,7 @@
source_config
REALDEVICE=${DEVICE%%:*}
+DEVICE=$REALDEVICE
[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
. /etc/sysconfig/network-scripts/network-functions-ipv6
@@ -131,4 +132,4 @@
fi
# Delete all current configured IPv6 addresses on this interface
-ipv6_cleanup_device $REALDEVICE
+ipv6_cleanup_device $DEVICE
With you patch (I assume it should be backwards) ifdown-ipv6 will still call some sysctl on parent device and I don't think that this is desired behavior.
I have recently encountered a variation of this behaviour with the latest 9.03.49-2.3 initscript package.
Running ifdown on an alias interface is dropping all ipv4 addresses from the parent interface, which is extremely dangerous.
Created attachment 633606 [details] Patch we're using to fix this issue Description of problem: shutting down an (ipv4) interface alias (e.g. eth0:1) flushes/removes all ipv6 addresses on the parent interface (e.g. eth0). Version-Release number of selected component (if applicable): initscripts-9.03.31-2.el6.x86_64 How reproducible: every time Steps to Reproduce: 1. configure some interface aliases - parent eth0 has ipv6 connectivity (ipv6 autoconfig): $ ifconfig | egrep 'Link|inet' eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0 inet6 addr: 2001:db8::5054:ff:fe37:1d02/64 Scope:Global inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0 eth0:3 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.3 Bcast:192.0.2.255 Mask:255.255.255.0 2. 'ifdown' one of the aliases $ ifdown eth0:3 Actual results: The interface alias is shutdown, however all ipv6 addresses of the parent interface are also removed: $ ifconfig | egrep 'Link|inet' eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0 Expected results: The interface alias is shutdown, and the ipv6 addresses of the parent interface remain: $ ifconfig | egrep 'Link|inet' eth0 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.1 Bcast:192.0.2.255 Mask:255.255.255.0 inet6 addr: 2001:db8::5054:ff:fe37:1d02/64 Scope:Global inet6 addr: fe80::5054:ff:fe37:1d02/64 Scope:Link eth0:2 Link encap:Ethernet HWaddr 52:54:00:37:1D:02 inet addr:192.0.2.2 Bcast:192.0.2.255 Mask:255.255.255.0 Additional info: /sbin/ifdown calls ifdown-eth which correctly shuts down the alias address and then calls ifdown-ipv6 on the alias device. ifdown-ipv6 munges the alias device name from "eth0:X" to the realdevice name of "eth0" and then issues an "ipv6_cleanup_device eth0" which erroneously removes all addresses on the parent device. We have fixed this by modifying ifdown-ipv6 to only attempt to shutdown the alias, which will be a silent noop because the 'eth0:X' alias interface has no ipv6 addresses: % diff -ur ifdown-ipv6.* --- ifdown-ipv6.a 2012-10-26 12:22:52.000000000 +1030 +++ ifdown-ipv6.b 2012-10-26 12:22:59.000000000 +1030 @@ -46,6 +46,7 @@ source_config REALDEVICE=${DEVICE%%:*} +DEVICE=$REALDEVICE [ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1 . /etc/sysconfig/network-scripts/network-functions-ipv6 @@ -131,4 +132,4 @@ fi # Delete all current configured IPv6 addresses on this interface -ipv6_cleanup_device $REALDEVICE +ipv6_cleanup_device $DEVICE