Bug#891857: busybox: Special case for /32 subnets not working as expected

2018-03-02 Thread Benjamin Drung
On Thu, 01 Mar 2018 17:55:52 +0100 Yuval Freund  
wrote:
> A fix for /32 has already been implemented in an earlier version of
> busybox, but it doesn't seem to work as expected, because the interface
> isn't defined while adding the relevant route.

To be more precise: The ip command will fail if the device is not
specified:

~# ip -4 route add default via 157.97.106.1 onlink
ip: RTNETLINK answers: No such device
~# ip -4 route add default via 157.97.106.1 dev eth0 onlink
~#

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Email: benjamin.dr...@profitbricks.com
URL: https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg



Bug#891857: busybox: Special case for /32 subnets not working as expected

2018-03-01 Thread Yuval Freund
Package: busybox
Severity: normal

Dear Maintainer,

Many of our customers would like to use the debian installer in order to set up 
their own VMs. Our DHCP servers currently offer addresses with /32 subnets, and 
we've come to realize that the debian installer does not properly configure the 
default route.

A fix for /32 has already been implemented in an earlier version of busybox, 
but it doesn't seem to work as expected, because the interface isn't defined 
while adding the relevant route.

Here's a suggested fix, which would probably also clear up what I mean:

##

--- tree/debian/tree/busybox-udeb/etc/udhcpc/default.script 2018-03-01 
15:45:33.0 +0100
+++ tree/debian/tree/busybox-udeb/etc/udhcpc/default.script_proposed
2018-03-01 15:47:37.259206527 +0100
@@ -68,7 +68,7 @@

# special case for /32 subnets, use onlink when adding routes
[ ".$subnet" = .255.255.255.255 ] \
-&& onlink=onlink || onlink=
+&& onlink="dev $interface onlink" || onlink=
for r in "$router"; do
ip -4 route add default via "$r" $onlink
done

##

We would appreciate it if you could patch all current/relevant versions to use 
this fix.

Thank you!

Yuval Freund, ProfitBricks GmbH