]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Fix crash when creating routes for a non preferred lease.
authorRoy Marples <roy@marples.name>
Sat, 24 Jun 2017 16:36:12 +0000 (17:36 +0100)
committerRoy Marples <roy@marples.name>
Wed, 28 Jun 2017 23:03:04 +0000 (00:03 +0100)
commit5efbd5a5bfdd3be9b0d829c2889bb2d6bf3cfd1e
tree1ee36b290d5e9f633228c1ca5d4744a2b739ff40
parent44123537c41a293cdf573c20446084978d789e51
Fix crash when creating routes for a non preferred lease.

Summary:
When dhcpcd shares the same IP address across interfaces, the
non preferred leases have the address deleted but remain in
the BOUND state.
We need to check that the address has been added, otherwise
we crash when building some routes.

Thanks to Jason A. Donenfeld <Jason@zx2c4.com> for the report.

Test Plan:
Ensure the lowest metric interface is denied in denyinterfaces.
Setup your DHCP server to share the same IP addres to all the host interfaces.
Start dhcpcd.
Activate the denied interface via `dhcpcd -n $interface`.
dhcpcd should not crash when binding the routes.

Tags: #dhcpcd

Differential Revision: https://dev.marples.name/D121
src/ipv4.c