]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcp: Fix classless static routes
authorRoy Marples <roy@marples.name>
Mon, 29 May 2017 20:03:25 +0000 (22:03 +0200)
committerRoy Marples <roy@marples.name>
Wed, 31 May 2017 18:26:51 +0000 (20:26 +0200)
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

src/dhcp.c

index 1389f72cba040ef1ac94cbd339afed062aa8fd30..be3d354aa68b6f3b3f1d250fe21c10bb179d49d5 100644 (file)
@@ -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. */