mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-23 10:06:42 +08:00
dhcp: Fix classless link local static routes (#161)
Detecting host routes based on address comparison is not needed in classless routes as /32 mask can be explicitly used. This detecting mechanism did cause issues when gateway was set to 0.0.0.0 (link local routes).
This commit is contained in:
parent
6797c08b66
commit
3e6277050f
@ -442,15 +442,6 @@ decode_rfc3442_rt(rb_tree_t *routes, struct interface *ifp,
|
||||
memcpy(&gateway.s_addr, p, 4);
|
||||
p += 4;
|
||||
|
||||
/* An on-link host route is normally set by having the
|
||||
* gateway match the destination or assigned address */
|
||||
if (gateway.s_addr == dest.s_addr ||
|
||||
(gateway.s_addr == bootp->yiaddr ||
|
||||
gateway.s_addr == bootp->ciaddr))
|
||||
{
|
||||
gateway.s_addr = INADDR_ANY;
|
||||
netmask.s_addr = INADDR_BROADCAST;
|
||||
}
|
||||
if (netmask.s_addr == INADDR_BROADCAST)
|
||||
rt->rt_flags = RTF_HOST;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user