Package: ifupdown
Version: 0.8.44
Severity: important
Tags: ipv6
X-Debbugs-Cc: [email protected]


When using DHCPv6 with ifupdown it requires a link-local address.  After the 
interface
is brought up, the wait-for-ll6.sh script is supposed to be used to wait for 
the address
to be non-tentative (duplicate address detection has finished) before moving on 
to the
next phase.  This file lives in /usr/lib/ifupdown by default.

The problem is that the 'inet6' provider (defined in the source in inet6.defn 
and compiled
into the binary) uses the execable() function to decide whether to run it or 
not:

    wait-for-ll6.sh if (var_true("dhcp", ifd) && execable("wait-for-ll6.sh"))

execable() only looks through the PATH if 'program' does not start with a 
leading /.
Because /usr/lib/ifupdown is not in the default PATH, the script is never run.

You can see this in action by running 'ifup -v xxxx' with an appropriate 
interface configured.
It will show that 'ip link set dev XXXX up' was run, and then immediately runs 
the dhcp
client (in my case isc-dhcp-client) and fail because there is no link-local 
address.

If you then bring down the interface and make sure to flush the v6 addresses
(ip -6 addr flush XXXX) and run 'PATH=/usr/lib/ifupdown:$PATH ifup -v xxxx' it 
will
show that 'ip link set dev XXXX up' is run, then wait-for-ll6.sh, and then the 
dhcp
client, and it succeeds.

If debian is going to put these scripts into /usr/lib/ifupdown, then execable()
should look there first, and THEN check the PATH.


-- Package-specific info:
--- up and down scripts installed:
/etc/network/if-down.d:
total 4
-rwxr-xr-x 1 root root 759 Aug 19  2024 resolved
lrwxrwxrwx 1 root root  32 Mar 22 02:06 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-post-down.d:
total 0
lrwxrwxrwx 1 root root 32 Mar 22 02:06 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-pre-up.d:
total 0
lrwxrwxrwx 1 root root 32 Mar 22 02:06 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh

/etc/network/if-up.d:
total 8
-rwxr-xr-x 1 root root 4665 Aug 19  2024 resolved
lrwxrwxrwx 1 root root   32 Mar 22 02:06 wpasupplicant -> 
../../wpa_supplicant/ifupdown.sh


-- System Information:
Debian Release: 13.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.38+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ifupdown depends on:
ii  adduser   3.152
ii  iproute2  6.15.0-1
ii  libc6     2.41-12

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.4.3-P1-8

Versions of packages ifupdown suggests:
pn  ppp     <none>
pn  rdnssd  <none>

-- no debconf information

Reply via email to