Package: ifupdown
Version: 0.8.13ubuntu2
Severity: important
Tags: patch ipv6

Dear Maintainer,

Originally reported in Ubuntu bug 1629972 (http://pad.lv/1629972).
stop of networking.service will bring down the link of the 'lo' interface.
This causes problems.  it does this whether or not there is a 'lo' entry
in /etc/network/interfaces.

For example:
$ cat go.sh
#!/bin/sh
# clean out any state
rm /run/network/ifstate*
ip link set down dev lo
ip link set down dev eth0

echo == all down ==;   ip link show up
echo == coming up ==;  ifup -a
echo == after up ==;   ip link show up
echo == going down ==; ifdown -a
echo == after down ==; ip link show up

That will show:
 == all down ==
 == coming up ==
 == after up ==
 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode
 DEFAULT group default qlen 1
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 == going down ==
 == after down ==

The 'lo' link is taken down.

As demonstrated
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1629972/comments/6
that actually breaks ipv6 networking.

See attached suggested fix.

-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety-updates
  APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 
'yakkety')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-22-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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.113+nmu3ubuntu4
ii  init-system-helpers  1.45
ii  iproute2             4.3.0-1ubuntu3
ii  libc6                2.24-3ubuntu1
ii  lsb-base             9.20160110ubuntu5

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.3-5ubuntu15

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

-- no debconf information
commit c25d5c6b832ffa9e93433862479ad7b7f632a674
Author: Scott Moser <smo...@brickies.net>
Date:   Thu Oct 13 16:21:10 2016 -0400

    networking.service: exclude loopback device lo in ExecStop.
    
    Taking down the loopback device causes havoc on the system, such
    as issues with dbus or general ipv6 networking.
    
    The issue seen here was that ipv6 networking would stop functioning
    and the iscsi mount of root over that ipv6 would become unavailable.

diff --git a/debian/networking.service b/debian/networking.service
index 065c816..7d7af55 100644
--- a/debian/networking.service
+++ b/debian/networking.service
@@ -16,6 +16,6 @@ Type=oneshot
 EnvironmentFile=-/etc/default/networking
 ExecStartPre=-/bin/sh -c '[ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle'
 ExecStart=/sbin/ifup -a --read-environment
-ExecStop=/sbin/ifdown -a --read-environment
+ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
 RemainAfterExit=true
 TimeoutStartSec=5min

Reply via email to