[systemd-devel] systemd-networkd doesn't delete netdev when parent interface is deleted
hello at andreborie.name
hello at andreborie.name
Thu Aug 20 15:14:12 PDT 2015
Hello,
I'm trying to use systemd-networkd to manage a "sit" tunnel and I've hit
problem. My internet connection is provided by "ppp0" which isn't
directly managed by networkd and can come and go at anytime. I have a
.network file with "[Match] Name=ppp0" that works as expected and
correctly configures DNS and forwarding on that interface. I then added
a .netdev file for the tunnel and referenced it using the "[Network]
Tunnel=..." directive in ppp0's .network file. That works as expected
and the tunnel is configured with ppp0 as its device :
heipv6: ipv6/ip remote 216.66.84.42 local any dev ppp0 ttl 255
6rd-prefix 2002::/16
The problem happens when the ppp0 interface goes down. The tunnel netdev
remains but references a non-existing interface "ifXX" and is obviously
not operational anymore :
heipv6: ipv6/ip remote 216.66.84.42 local any dev if34 ttl 255
6rd-prefix 2002::/16
Worse, once the ppp0 interface comes back up, that netdev remains
untouched and still points to the non-existing interface. Restarting
systemd-networkd doesn't have any effect either. Only deleting the
tunnel with "ip tunnel del" and then either restarting systemd-networkd
or pppd (to recreate an ppp0 interface) causes systemd-networkd to
create a new tunnel correctly referencing the new ppp0.
According to the manual for systemd.netdev, this is expected behavior :
If a netdev with the specified name already exists, networkd will use
that as-is rather than create its own. Note that the settings of the
pre-existing netdev will not be changed by networkd.
However, in my case it's clearly undesirable behavior and I'd like to
know what should I do to get this working. Here are the relevant
configuration files :
# ppp.network
[Match]
Name=ppp0
[Network]
DHCP=no
Tunnel=heipv6
# he.netdev
[NetDev]
Name=heipv6
Kind=sit
[Tunnel]
Remote=216.66.84.42
Thanks.
TLDR: I need to make systemd-networkd override some settings of an
existing netdev, or delete a netdev after its parent device has
disappeared.
More information about the systemd-devel
mailing list