From: Roy Marples Date: Tue, 28 Apr 2020 16:39:48 +0000 (+0000) Subject: DHCP: Close sockets on carrier down X-Git-Tag: v9.1.0~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e72861dd03bd8ffb428fe937f2aa1615b8aadb0;p=thirdparty%2Fdhcpcd.git DHCP: Close sockets on carrier down This allows any BPF filter to reset family on carrier up. --- diff --git a/src/dhcp.c b/src/dhcp.c index 9af2dbd0..927f2137 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2772,6 +2772,10 @@ dhcp_drop(struct interface *ifp, const char *reason) 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;