When setting up an interface with:
iface IFACE inet6 auto
dhcp 1
[...]
then, the dhclient -6 is correctly started (on ifup) but
not stopped (on ifdown).
Looking at the sources, inet6.defn, we can see:
method auto
[...]
up
[...]
/sbin/dhclient -6 -v -P -pf /run/dhclient6.%iface%.pid -lf /var/lib/dhcp/dhclient6.%iface%.leases -I -df /var/lib/dhcp/dhclient.%iface%.leases %iface% \
if (var_true("dhcp", ifd) && execable("/sbin/dhclient") && var_true("request_prefix", ifd))
/sbin/dhclient -6 -1 -v -S -pf /run/dhclient6.%iface%.pid -lf /var/lib/dhcp/dhclient6.%iface%.leases -I -df /var/lib/dhcp/dhclient.%iface%.leases %iface% \
elsif (var_true("dhcp", ifd) && execable("/sbin/dhclient"))
echo 'No DHCPv6 client software found!' >&2; false \
elsif (var_true("dhcp", ifd))
down
[nothing to stop dhclient...]
Should not we have something like (taken from the dhcp method):
down
/sbin/dhclient -6 -v -r -pf /run/dhclient6.%iface%.pid -lf /var/lib/dhcp/dhclient6.%iface%.leases -I -df /var/lib/dhcp/dhclient.%iface%.leases %iface% \
if (var_true("dhcp", ifd) && execable("/sbin/dhclient"))
echo 'No DHCPv6 client software found!' >&2; false \
elsif (var_true("dhcp", ifd))
(not sure if we should test for "var_true("dhcp", ifd)" in the down
part. Perhaps it is better to always stop dhclient if any?
Regards,
Vincent
--- up and down scripts installed:
/etc/network/if-down.d:
total 16
-rwxr-xr-x 1 root root 1015 Apr 13 2015 avahi-autoipd
-rwxr-xr-x 1 root root 372 Nov 23 2014 openvpn
-rwxr-xr-x 1 root root 800 Jan 9 2017 postfix
-rwxr-xr-x 1 root root 256 Mar 25 2013 resolvconf
lrwxrwxrwx 1 root root 32 Oct 19 10:35 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
/etc/network/if-post-down.d:
total 8
lrwxrwxrwx 1 root root 42 Oct 11 18:28 openvswitch -> /usr/share/openvswitch/scripts/ifupdown.sh
-rwxr-xr-x 1 root root 907 Feb 4 2012 vde2
-rwxr-xr-x 1 root root 1409 Mar 24 2016 wireless-tools
lrwxrwxrwx 1 root root 32 Oct 19 10:35 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
/etc/network/if-pre-up.d:
total 16
-rwxr-xr-x 1 root root 344 Aug 21 2011 ethtool
lrwxrwxrwx 1 root root 42 Oct 11 18:28 openvswitch -> /usr/share/openvswitch/scripts/ifupdown.sh
-rwxr-xr-x 1 root root 1793 Feb 4 2012 vde2
-rwxr-xr-x 1 root root 4191 Sep 15 2018 wireless-tools
lrwxrwxrwx 1 root root 32 Oct 19 10:35 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
/etc/network/if-up.d:
total 28
-rwxr-xr-x 1 root root 817 Mar 25 2013 000resolvconf
-rwxr-xr-x 1 root root 923 Apr 13 2015 avahi-autoipd
-rwxr-xr-x 1 root root 1685 Nov 23 2014 ethtool
-rwxr-xr-x 1 root root 4938 Aug 14 2020 mountnfs
-rwxr-xr-x 1 root root 385 Jul 7 2015 openvpn
-rwxr-xr-x 1 root root 1117 Jan 9 2017 postfix
lrwxrwxrwx 1 root root 32 Oct 19 10:35 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
We believe that the bug you reported is fixed in the latest version of
ifupdown, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1000180@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Santiago Ruano Rincón <santiago@debian.org> (supplier of updated ifupdown package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 16 Jan 2023 14:57:59 +0100
Source: ifupdown
Architecture: source
Version: 0.8.40
Distribution: unstable
Urgency: medium
Maintainer: Josué Ortega <josue@debian.org>
Changed-By: Santiago Ruano Rincón <santiago@debian.org>
Closes: 998088 1000180 1022843
Changes:
ifupdown (0.8.40) unstable; urgency=medium
.
[ Colin Watson ]
* Clarify formatting of post-up and pre-down aliases in interfaces(5).
.
[ Vincent Bernat ]
* Kill dhclient on down for inet6 auto method. (Closes: #1000180)
.
[ Santiago Ruano Rincón ]
* networking.service: Wants ifupdown-pre.service instead of Requiring it.
Patch by Ron <ron@debian.org>
(Closes: #998088)
* networking.service: Add ExecStart=/sbin/ifup -a --allow=hotplug. Patch by
"Oleg A. Arkhangelsky" <sysoleg@yandex.ru>
(Closes: #1022843)
* Update d/copyright and fix Source URL
.
[ Marek Vasut ]
* Add short -f option for --force long option
.
[ Simon Arlott ]
* Support IPv6 tunnels (ip6ip6 and ip6gre)
* Support encaplimit on IPv6 tunnels
* Document and test support for ipip6 tunnels too (IPv4 in IPv6)
.
[ Guillem Jover ]
* Rework execable() function to accept a filename instead of a pathname
* Do not use absolute pathnames when executing commands
Checksums-Sha1:
5a3eabb2c09df73c91e4897c7ea4aaa1cee77c27 986 ifupdown_0.8.40.dsc
18278238383d710f0a6cf142c66b751418aff5d5 81808 ifupdown_0.8.40.tar.xz
73d459bc51777bb8b4b55a1ae7da474ea42b6621 5404 ifupdown_0.8.40_amd64.buildinfo
Checksums-Sha256:
100d47fdb21e3a34950b067134e31f99ad649f2ade537cc65777e909a0954c79 986 ifupdown_0.8.40.dsc
0e9b0fedb6828db8352e0f0ca8f164aec55f98a2ea3db6c4c514381a2fb1edfe 81808 ifupdown_0.8.40.tar.xz
723cf7ec365e3a447298d2c4c627afbdae91d82b29deefd6d3c2f897ef359b99 5404 ifupdown_0.8.40_amd64.buildinfo
Files:
ca9b9247545e98068ff2726d520ad858 986 admin important ifupdown_0.8.40.dsc
6bd2c47a721a984d82cce50486ed6dfa 81808 admin important ifupdown_0.8.40.tar.xz
02dde7d1b0c6cb8a360dbfe0551993ee 5404 admin important ifupdown_0.8.40_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQRZVjztY8b+Ty43oH1itBCJKh26HQUCY8ViGQAKCRBitBCJKh26
HZwhAQDsYZPuya81nDRRJOcNVQEUqXTSETEHbn7RTkAfFiy3DAEAgdJHErz5wHRK
WZVpeus7lXpxmAD/ZVepr3ANsFAjmAY=
=JW3C
-----END PGP SIGNATURE-----