Mercurial > hg > dhcpcd
changeset 5176:9f2e260a7369 draft
DHCP: Close sockets on carrier down
This allows any BPF filter to reset family on carrier up.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 28 Apr 2020 16:39:48 +0000 |
| parents | bbeece20b49c |
| children | 1d16a9434290 |
| files | src/dhcp.c |
| diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Tue Apr 28 17:00:29 2020 +0100 +++ b/src/dhcp.c Tue Apr 28 16:39:48 2020 +0000 @@ -2772,6 +2772,10 @@ dhcp_auth_reset(&state->auth); #endif + /* Close DHCP ports so a changed interface family is picked + * up by a new BPF state. */ + dhcp_close(ifp); + state->state = DHS_NONE; free(state->offer); state->offer = NULL;
