Package: ifupdown
Version: 0.8.19
Severity: normal

* Steps to reproduce:
1. Configure interface with a static ipv6 address

# cat /etc/network/interfaces.d/eth1
auto eth1
iface eth1 inet static
   10.2.3.4
   netmask 255.255.255.0
iface eth1 inet6 static
   address fd60:d925:aaaa::bbbb
   netmask 64

2. Restart networking service. Note that the address is assigned:

# systemctl restart networking
# ip -6 addr show dev eth1
    inet6 fd60:d925:aaaa::bbbb/64 scope global
       valid_lft forever preferred_lft forever

3. Now unplug interface and restart networking service

* Expected Results:
- Networking service restarts successfully

* Actual results
- Networking service goes to failed state

* Cause
I think this line of code 
https://salsa.debian.org/debian/ifupdown/blob/master/inet6.defn#L98
causes ifup to fail if the interface is unplugged. In particular after unplug 
and restart, my ipv6 address
is added as "tentative" and settle-dad.sh does not like it:
# ip -6 addr show dev eth1
    inet6 fd60:d925:aaaa::bbbb/64 scope global tentative
       valid_lft forever preferred_lft forever

* Workaround:
Put "dad-attempts 0" in the ipv6 stanza with static address.

However, I would like to have the DAD capacbility.

Would it be possible to set dad-attempts condionally
i.e. add `nodad` also if the interface is unplugged 
https://salsa.debian.org/debian/ifupdown/blob/master/inet6.defn#L95 ?

--- up and down scripts installed:
/etc/network/if-down.d:
total 4
-rwxr-xr-x 1 root root 332 Jun  2  2015 upstart
lrwxrwxrwx 1 root root  32 Aug  9 00:23 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-post-down.d:
total 0
lrwxrwxrwx 1 root root 23 Jan 23  2017 avahi-daemon -> ../if-up.d/avahi-daemon
lrwxrwxrwx 1 root root 32 Aug  9 00:23 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-pre-up.d:
total 0
lrwxrwxrwx 1 root root 32 Aug  9 00:23 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-up.d:
total 12
-rwxr-xr-x 1 root root  484 Jan 23  2017 avahi-daemon
-rwxr-xr-x 1 root root  972 Mar  1  2018 openssh-server
-rwxr-xr-x 1 root root 1483 Jun  2  2015 upstart
lrwxrwxrwx 1 root root   32 Aug  9 00:23 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh


-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ifupdown depends on:
ii  adduser              3.115
ii  init-system-helpers  1.48
ii  iproute2             4.9.0-1+deb9u1
ii  libc6                2.24-11+deb9u3
ii  lsb-base             9.20161125

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.5-3+deb9u1

Versions of packages ifupdown suggests:
ii  ppp     2.4.7-1+4
pn  rdnssd  <none>

-- no debconf information

Reply via email to