diff --git a/sys/net/if.c b/sys/net/if.c index 15b4d7c12d1..fcc882aec26 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1187,7 +1187,6 @@ if_detach_internal(struct ifnet *ifp, int vmove, struct if_clone **ifcp) */ free(ifp->if_hw_addr, M_IFADDR); ifp->if_hw_addr = NULL; - ifp->if_addr = NULL; /* We can now free link ifaddr. */ IF_ADDR_WLOCK(ifp); diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 407764ed263..f5498770ef0 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1922,8 +1922,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) rnh = rt_tables_get_rnh(fib, i); if (rnh != NULL) { RIB_RLOCK(rnh); + NET_EPOCH_ENTER(); error = rnh->rnh_walktree(&rnh->head, sysctl_dumpentry, &w); + NET_EPOCH_EXIT(); RIB_RUNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT;