Index: sys/net/route.c =================================================================== --- sys/net/route.c +++ sys/net/route.c @@ -1733,6 +1733,8 @@ int family, mtu; struct if_mtuinfo ifmtu; + RIB_WLOCK_ASSERT(rnh); + rt = (struct rtentry *)rnh->rnh_lookup(info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK], &rnh->head); @@ -1823,6 +1825,13 @@ } } + /* + * This route change may have modified the route's gateway. In that + * case, any inpcbs that have cached this route need to invalidate their + * llentry cache. + */ + rnh->rnh_gen++; + if (ret_nrt) { *ret_nrt = rt; RT_ADDREF(rt);