Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Please unblock package ifupdown I've got a bug, #775660, in ifupdown which I think should be fixed in Jessie. I'm not sure how many our users does it affect, but I agree with Marco it's good to fix it. Patch: http://anonscm.debian.org/hg/collab-maint/ifupdown/rev/adfae04d9df8 Also, one of the last uploads introduced an incorrect warning appearing on every Jessie install (but not in any release before) caused by incorrect handling of wordexp's return values: * pattern expands into * when there are not matches, not in an empty list, so a warning is printed for every ifupdown invocation, as the default config includes all files matching /etc/network/interfaces.d/*, and there are none of them. The fix for this is 5 lines of code not counting includes, so it's pretty trivial and I think it should be included. Patch: http://anonscm.debian.org/hg/collab-maint/ifupdown/rev/79188bbab56f unblock ifupdown/0.7.53 -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.12-1-686-pae (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/mksh
diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ifupdown (0.7.53) UNRELEASED; urgency=medium + + * Default accept_ra to 0 when gateway is set (Closes: #775660). + * Don't try to parse a non-existing file given by wordexp (Closes: #776578). + + -- Andrew Shadura <[email protected]> Wed, 11 Mar 2015 00:04:44 +0100 + ifupdown (0.7.52) unstable; urgency=medium * Fix segfault when /e/n/i can't be read. Fail only when the file diff --git a/archlinux.c b/archlinux.c --- a/archlinux.c +++ b/archlinux.c @@ -295,3 +295,13 @@ void map_value(interface_defn * ifd UNUS *pparam[0] = 0; } } + +void if_set(interface_defn * ifd UNUSED, char **pparam, int argc, char **argv) +{ + if (argc == 1) { + *pparam = realloc(*pparam, strlen(argv[0]) + 1); + if (*pparam == NULL) + return; + strcpy(*pparam, argv[0]); + } +} diff --git a/archlinux.h b/archlinux.h --- a/archlinux.h +++ b/archlinux.h @@ -16,3 +16,4 @@ void set_preferred_lft(interface_defn * void get_token(interface_defn * ifd, char **pparam, int argc, char **argv); void to_decimal(interface_defn * ifd, char **pparam, int argc, char **argv); void map_value(interface_defn * ifd, char **pparam, int argc, char **argv); +void if_set(interface_defn * ifd, char **pparam, int argc, char **argv); diff --git a/config.c b/config.c --- a/config.c +++ b/config.c @@ -10,6 +10,9 @@ #include <libgen.h> #include <wordexp.h> #include <dirent.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> static int get_line(char **result, size_t * result_len, FILE * f, int *line); static char *next_word(char *buf, char *word, int maxlen); static address_family *get_address_family(address_family * af[], char *name); @@ -280,10 +283,18 @@ interfaces_file *read_interfaces_defn(in wordexp_t p; char **w; size_t i; + struct stat sb; + int fail = wordexp(pattern, &p, WRDE_NOCMD); if (!fail) { w = p.we_wordv; for (i = 0; i < p.we_wordc; i++) { + if (stat(w[i], &sb) == -1) { + /* wordexp can't expand * in an empty dir */ + if (errno == ENOENT) { + continue; + } + } if (verbose) { fprintf(stderr, "Parsing file %s\n", w[i]); } diff --git a/debian/testbuild-linux b/debian/testbuild-linux --- a/debian/testbuild-linux +++ b/debian/testbuild-linux @@ -178,7 +178,7 @@ EOF cat >tests/testcase.3 <<EOF # RUN: -a -auto eth0 +auto eth0 eth1 iface eth0 inet static address 1.2.3.4 netmask 255.255.255.0 @@ -206,6 +206,16 @@ iface eth0 inet6 static iface eth0 inet6 static address / dad-attempts 0 + +iface eth1 inet6 static + address 3ffe:ffff:100:f102::1/64 + gateway 3ffe:ffff:100:f102::fff + dad-attempts 0 +iface eth1 inet6 static + address 3ffe:ffff:100:f102::6/64 + gateway 3ffe:ffff:100:f102::fff + accept_ra 1 + dad-attempts 0 EOF cat >tests/up.3 <<EOF ====stdout==== @@ -281,6 +291,26 @@ run-parts --exit-on-error --verbose /etc Configuring interface eth0=eth0 (inet6) Missing required variable: address Missing required configuration variables for interface eth0/inet6. +Configuring interface eth1=eth1 (inet6) +run-parts --exit-on-error --verbose /etc/network/if-pre-up.d +modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure. + +sysctl -q -e -w net.ipv6.conf.eth1.accept_ra=0 +sysctl -q -e -w net.ipv6.conf.eth1.autoconf=0 +ip link set dev eth1 up +ip -6 addr add 3ffe:ffff:100:f102::1/64 dev eth1 + ip -6 route add default via 3ffe:ffff:100:f102::fff dev eth1 +run-parts --exit-on-error --verbose /etc/network/if-up.d +Configuring interface eth1=eth1 (inet6) +run-parts --exit-on-error --verbose /etc/network/if-pre-up.d +modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure. + +sysctl -q -e -w net.ipv6.conf.eth1.accept_ra=1 +sysctl -q -e -w net.ipv6.conf.eth1.autoconf=0 +ip link set dev eth1 up +ip -6 addr add 3ffe:ffff:100:f102::6/64 dev eth1 + ip -6 route add default via 3ffe:ffff:100:f102::fff dev eth1 +run-parts --exit-on-error --verbose /etc/network/if-up.d run-parts --exit-on-error --verbose /etc/network/if-up.d EOF diff --git a/inet6.defn b/inet6.defn --- a/inet6.defn +++ b/inet6.defn @@ -66,6 +66,7 @@ method static preferred-lifetime set_preferred_lft address (get_token / 1 "") =netmask? address (get_token / 0 "") + gateway (if_set 0) =accept_ra? up modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.

