#942258 ifupdown: Failure to bring up br0 causes pppd to be terminated

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Alex DEKKER
Date:
2019-10-13 10:57:07 UTC
Severity:
normal
#942258#5
Date:
2019-10-13 09:27:57 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

IPv6 DAD "fails" on br0. ifupdown then terminates the PPPoE client running on eth3 [eth3 is not part of br0]


   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?
I expect that failure to bring up one interface will not cause the ifupdown to terminate pppd on a different interface.


*** End of the template - remove these template lines ***
--- up and down scripts installed:
/etc/network/if-down.d:
total 4
-rwxr-xr-x 1 root root 289 Jan 17  2018 bind9

/etc/network/if-post-down.d:
total 0
lrwxrwxrwx 1 root root 29 Jan 27  2019 bridge -> /lib/bridge-utils/ifupdown.sh

/etc/network/if-pre-up.d:
total 4
lrwxrwxrwx 1 root root  29 Jan 27  2019 bridge -> /lib/bridge-utils/ifupdown.sh
-rwxr-xr-x 1 root root 344 Jun  7  2010 ethtool

/etc/network/if-up.d:
total 16
-rwxr-xr-x 1 root root  289 Jan 17  2018 bind9
-rwxr-xr-x 1 root root 1685 Sep 22  2014 ethtool
-rwxr-xr-x 1 root root 4937 Aug 22 16:39 mountnfs

#942258#10
Date:
2019-10-13 10:05:23 UTC
From:
To:
This is what happens without dad-attempts 0 on br0:


Oct 13 10:31:30 westogre pppd[2055]: rcvd [IPCP ConfAck id=0x2 <addr
81.x.x.x>]
Oct 13 10:31:30 westogre pppd[2055]: local  IP address 81.x.x.x
Oct 13 10:31:30 westogre pppd[2055]: remote IP address 81.187.81.187
Oct 13 10:31:30 westogre pppd[2055]: Script /etc/ppp/ip-up started (pid
2087)
Oct 13 10:31:30 westogre pppd[2055]: rcvd [IPV6CP ConfReq id=0x0 <addr
fe80::0203:97ff:fe40:4000>]
Oct 13 10:31:30 westogre pppd[2055]: sent [IPV6CP ConfAck id=0x0 <addr
fe80::0203:97ff:fe40:4000>]
Oct 13 10:31:30 westogre pppd[2055]: local  LL address
fe80::4094:d1c2:9863:b1a5
Oct 13 10:31:30 westogre pppd[2055]: remote LL address
fe80::0203:97ff:fe40:4000
Oct 13 10:31:30 westogre pppd[2055]: Script /etc/ppp/ipv6-up started
(pid 2088)
Oct 13 10:31:30 westogre pppd[2055]: Script /etc/ppp/ipv6-up finished
(pid 2088), status = 0x0
Oct 13 10:31:31 westogre ifup[1521]: /bin/run-parts --exit-on-error
--verbose /etc/network/if-up.d
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/bind9
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/ethtool
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/mountnfs
Oct 13 10:31:31 westogre ifup[1521]: /bin/run-parts --exit-on-error
--verbose /etc/network/if-up.d
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/bind9
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/ethtool
Oct 13 10:31:31 westogre ifup[1521]: run-parts: executing
/etc/network/if-up.d/mountnfs
Oct 13 10:31:31 westogre systemd[1]: networking.service: Main process
exited, code=exited, status=1/FAILURE
Oct 13 10:31:31 westogre pppd[2055]: Terminating on signal 15
Oct 13 10:31:31 westogre pppd[2055]: Connect time 0.1 minutes.
Oct 13 10:31:31 westogre pppd[2055]: Sent 242 bytes, received 0 bytes.
Oct 13 10:31:31 westogre pppd[2055]: Script /etc/ppp/ipv6-down started
(pid 2170)
Oct 13 10:31:31 westogre pppd[2055]: sent [LCP TermReq id=0x2 "User
request"]
Oct 13 10:31:31 westogre pppd[2055]: Child process /etc/ppp/ip-up (pid
2087) terminated with signal 15
Oct 13 10:31:31 westogre pppd[2055]: Script /etc/ppp/ip-down started
(pid 2171)
Oct 13 10:31:31 westogre pppd[2055]: Script /etc/ppp/ipv6-down finished
(pid 2170), status = 0x0
Oct 13 10:31:31 westogre pppd[2055]: rcvd [LCP TermAck id=0x2]
Oct 13 10:31:31 westogre pppd[2055]: Connection terminated.
Oct 13 10:31:31 westogre pppd[2055]: Connect time 0.1 minutes.
Oct 13 10:31:31 westogre pppd[2055]: Sent 242 bytes, received 0 bytes.
Oct 13 10:31:31 westogre pppd[2055]: Send PPPOE Discovery V1T1 PADT
session 0x214 length 20
Oct 13 10:31:31 westogre pppd[2055]:  dst 28:8a:1c:e9:c0:52  src
00:19:99:ed:01:9a
Oct 13 10:31:31 westogre pppd[2055]:  [AC-cookie  33 58 9a 5b 57 42 46
f7 fc e5 5e 6f d0 b3 47 8c]
Oct 13 10:31:31 westogre pppd[2055]: Sent PADT
Oct 13 10:31:31 westogre pppd[2055]: Waiting for 1 child processes...
Oct 13 10:31:31 westogre pppd[2055]:   script /etc/ppp/ip-down, pid 2171
Oct 13 10:31:31 westogre pppd[2055]: Script /etc/ppp/ip-down finished
(pid 2171), status = 0x1
Oct 13 10:31:31 westogre pppd[2055]: Exit.
Oct 13 10:31:31 westogre systemd[1]: networking.service: Failed with
result 'exit-code'.
Oct 13 10:31:31 westogre systemd[1]: Failed to start Raise network
interfaces.
Oct 13 10:31:31 westogre systemd[1]: Reached target Network.

The irony of this is that br0 is configured absolutely fine, it's ppp0
that suffers!

#942258#15
Date:
2019-10-13 10:46:01 UTC
From:
To:
[...]
[...]

I think the issue is that systemd kills the pppd process when ifup
reports an error bringing up br0. And that's probably because ppp0 was
brought up during startup of the networking service, and thus systemd
keeps track of all processes spawned at that time.

A possible workaround is to make ppp0 bringup not part of the network
initialization, but rather during the "hotplug" event of eth3. So
instead of having:

auto ppp0
iface ppp0 inet ppp
	...

Write this:

allow-hotplug eth3

iface eth3 inet manual
	mtu 1508
	up ifup ppp0
	down ifdown ppp0

iface ppp0 inet ppp
	provider provider
	post-up sh /root/firewall/delayed-post-up.sh

Note that hotplug doesn't mean when the cable is plugged in, it means
when the system detects the network card hardware. And for a built-in
network card, it detects it at boot time. So effectively you still get
ppp0 brought up at boot time this way.