From: Roy Marples Date: Mon, 29 May 2017 20:03:25 +0000 (+0200) Subject: dhcp: Fix classless static routes X-Git-Tag: v7.0.0-rc2~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f206e8d4370fc0f0897b7d5d8ace7fb81096298f;p=thirdparty%2Fdhcpcd.git dhcp: Fix classless static routes Summary: Assign the netwask correctly from the message. Fixes T122. Test Plan: Test dhcpcd using the Classless Static Routes DHCP option. Reviewers: c_14 Reviewed By: c_14 Maniphest Tasks: T122 Differential Revision: https://dev.marples.name/D116 --- diff --git a/src/dhcp.c b/src/dhcp.c index 1389f72c..be3d354a 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -452,7 +452,7 @@ decode_rfc3442_rt(struct rt_head *routes, struct interface *ifp, } sa_in_init(&rt->rt_dest, &dest); - sa_in_init(&rt->rt_dest, &netmask); + sa_in_init(&rt->rt_netmask, &netmask); sa_in_init(&rt->rt_gateway, &gateway); /* If CIDR is 32 then it's a host route. */