Bug#858070: ifupdown: ifdown puts the interface down before removing the IPv6 addresses

2023-01-06 Thread Conrad T. Pino
Package: ifupdown
Version: 0.8.36
Severity: normal
Tags: ipv4 ipv6

Debian Bug #858070 remains in ifdown version 0.8.36

Multipe static IPv4 and IPv6 address are affected because interface is flushed 
AND downed AFTER EVERY address delete.

admin@hef1v10:~$ cat /etc/network/interfaces.d/ens224
allow-hotplug ens224

iface ens224 inet static
address 64.62.193.70/28

iface ens224 inet static
address 64.62.193.74/28

iface ens224 inet static
address 64.62.193.75/28

iface ens224 inet static
address 64.62.193.76/28

iface ens224 inet static
address 64.62.193.77/28

iface ens224 inet static
address 64.62.193.78/28

iface ipv6all inet6 static
accept_ra 0 # Accept router advertisements 0=off
autoconf 0  # Perform stateless autoconfiguration 0=off
dad-attempts 0  # Duplicate Address Detection attempts
privext 0   # Privacy extensions (RFC3041) 0=off

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2::403e:c146/64

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2::403e:c14a/64

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2::403e:c14e/64

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2:20c:29ff:fe60:aa05/64

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2:20c:29ff:feba:79b3/64

iface ens224 inet6 static inherits ipv6all
address 2001:470:44:2:20c:29ff:fee1:45b7/64


admin@hef1v10:~$ sudo ifdown --version
ifdown version 0.8.36

Copyright (c) 1999-2009 Anthony Towns
  2010-2015 Andrej Shadura
  2015-2017 Guus Sliepen

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.



admin@hef1v10:~$ sudo ifdown --verbose ens224
ifdown: parsing file /etc/network/interfaces.d/ens224
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.70/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.74/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.75/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.76/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.77/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip addr del 64.62.193.78/255.255.255.240 broadcast 64.62.193.79 dev 
ens224 label ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -4 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet6)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip -6 addr del 2001:470:44:2::403e:c146/64  dev ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -6 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet6)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip -6 addr del 2001:470:44:2::403e:c14a/64  dev ens224
RTNETLINK answers: Cannot assign requested address
/sbin/ip -6 addr flush dev ens224
/sbin/ip link set dev ens224 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens224=ens224 (inet6)
/bin/run-parts --verbose /etc/network/if-down.d

/sbin/ip -6 addr del 2001:470:44:2::

Bug#858070: ifupdown: ifdown puts the interface down before removing the IPv6 addresses

2017-03-17 Thread Daniel Haid
Package: ifupdown
Version: 0.8.19
Severity: normal
Tags: ipv6

Dear Maintainer,

when both IPv4 and IPv6 are statically configured, ifdown first removes
the IPv4 addresses, then puts the interfaces down, and then tries to
remove the IPv6 addresses, which results in the error message
   "RTNETLINK answers: Cannot assign requested address".

Here is the verbose output:

root@host:~# ifdown -v ens2
ifdown: reading directory /etc/network/interfaces.d
ifdown: parsing file /etc/network/interfaces.d/ens2
ifdown: configuring interface ens2=ens2 (inet)
/bin/run-parts --verbose /etc/network/if-down.d
/bin/ip addr del 10.0.0.1/255.255.255.255 broadcast 10.0.0.1 dev ens2 label ens2
/bin/ip link set dev ens2 down
/bin/run-parts --verbose /etc/network/if-post-down.d
ifdown: configuring interface ens2=ens2 (inet6)
/bin/run-parts --verbose /etc/network/if-down.d
/bin/ip -6 addr del fd00::1/128  dev ens2
RTNETLINK answers: Cannot assign requested address
/bin/ip link set dev ens2 down
/bin/run-parts --verbose /etc/network/if-post-down.d