[OpenWrt-Devel] [PATCH] netifd: Request DHCP option 121 (classless route) by default
Baptiste Jonglez
baptiste at bitsofnetworks.org
Tue Nov 17 18:33:57 EST 2015
From: Baptiste Jonglez <git at bitsofnetworks.org>
This option is very useful when the gateway configured by DHCP cannot
be in the same subnet as the client. This happens, for instance, when
using DHCP to hand out addresses in /32 subnets.
Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
---
package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 0e88af9..1eb8010 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -38,6 +38,8 @@ proto_dhcp_setup() {
append dhcpopts "-x $opt"
done
+ # Classless route option, see RFC 3442
+ append dhcpopts "-O 121"
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list