[pkg-dhcp-devel] Bug#768860: [PATCH] Re: isc-dhcp-client: goes into infinite loop with (invalid?) rfc3442-classless-static-routes

Max-Julian max-julian at qyanu.net
Thu Jun 18 18:10:55 UTC 2015


Package: isc-dhcp-client
Version: 4.3.2-1
Tags: patch
Followup-For: Bug #768860

Dear Maintainer,


The immediate cause of this issue seem to be, that in file
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
the "shift <n>" commands perform no actual shift and leaves the
positional arguments as before.

the bash manual explains:

> shift [n]
>        If n is greater than $#, the positional parameters are not
>        changed.

My patch attached to this email proposes to check for this condition and
abort the script.

Although the issue should be resolved by this, no attempts are made to
further mitigate the effect of bogus dhcp option 121 sent by the dhcp
server (I think a bogus rfc-3442 option should be ignore entirely).

As a further note: I would like to write an error message to system log
(in the patch it's only written to stderr and thus does not reach
syslog). Although /usr/bin/logger seems to be the perfect tool, I am
unsure regarding support/presence of this tool on non-debian operating
systems (i.e. *BSD))


-- System Information:
Debian Release: stretch/sid
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages isc-dhcp-client depends on:
ii  debianutils       4.4+b1
ii  iproute2          3.16.0-2
ii  isc-dhcp-common   4.3.1-6
ii  libc6             2.19-18
ii  libdns-export100  1:9.9.5.dfsg-9
ii  libirs-export91   1:9.9.5.dfsg-9
ii  libisc-export95   1:9.9.5.dfsg-9

isc-dhcp-client recommends no packages.

Versions of packages isc-dhcp-client suggests:
ii  avahi-autoipd  0.6.31-5
pn  resolvconf     <none>

-- no debconf information



-------------- next part --------------
A non-text attachment was scrubbed...
Name: isc-dhcp-client_4.3.2-1_amd64.patch
Type: text/x-diff
Size: 1806 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20150618/3d5bf6fa/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20150618/3d5bf6fa/attachment.sig>


More information about the pkg-dhcp-devel mailing list