interface-ip: Fix broadcast address when using /31 or /32 IPv4 addressing
authorBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 14 Sep 2015 10:25:33 +0000 (12:25 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 26 Sep 2015 11:50:48 +0000 (13:50 +0200)
A /31-addressed interface requires a broadcast address of 255.255.255.255,
because there is no room for a proper broadcast address.  Without this,
any packet destinated to the other end of the link is sent as broadcast,
which is incorrect.

For consistency with the Linux kernel, /32-addressed interfaces are
treated in the same way.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>

No differences found