]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
BSD: Improve NEWADDR == IFF_UP handling
authorRoy Marples <roy@marples.name>
Fri, 7 Feb 2025 11:47:01 +0000 (11:47 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2025 11:47:01 +0000 (11:47 +0000)
commit66fb5a777b3ca7e13763964a4772314711c0ea2f
tree44717977b80a4262d219af39652cf13531658e47
parente1ce5235976d52f7a83012f122fc5b85dbbbcf2e
BSD: Improve NEWADDR == IFF_UP handling

On BSD when an address is added, the interface is automatically
brought up.
We can detect this by RTM_NEWADDR, but that lacks the IFF_UP flag.
We really want to stay in sync with RTM messages for flags, but
here we need to check the interface for IFF_UP if we think it's
not there. Only set that.

This fixes NEWADDR announcements for state transitions when
the interface is currently down.
src/if-bsd.c
src/if-sun.c
src/if.c
src/if.h