]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
BSD: Fix router reachability tests
authorRoy Marples <roy@marples.name>
Fri, 23 Aug 2019 17:01:24 +0000 (18:01 +0100)
committerRoy Marples <roy@marples.name>
Fri, 23 Aug 2019 17:01:24 +0000 (18:01 +0100)
commit9996285f1c23d1e62b93c48f7fc84fd5939990fc
treefb838859b9ffad00af55e0907a63dea26ac9aa50
parent1055803393ab78a7d7497a607750860bb1787d4c
BSD: Fix router reachability tests

dhcpcd likes to indicate an on-link route as a NULL gateway.
However, we were testing this for an AF_LINK address to ensure
reachability. As such, it was possible to log a false positive.

Instead, record the existance of a valid AF_LINK address via
RTDF_GATELINK.

While here, ensure that we only treat RTM_DELETE as unreachable
and only other messages with RTDF_GATELINK as reachable, ignoring
other states so that a new incomplete address won't make us
unreachable if we're just discovering it.
src/if-bsd.c
src/route.h