Date: Mon, 3 Sep 2018 22:27:28 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338450 - head/sys/netinet6 Message-ID: <201809032227.w83MRSq1027505@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Mon Sep 3 22:27:27 2018 New Revision: 338450 URL: https://svnweb.freebsd.org/changeset/base/338450 Log: Replicate r328271 from legacy IP to IPv6 using a single macro to clear L2 and L3 route caches. Also mark one function argument as __unused. Reviewed by: karels, ae Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D17007 Modified: head/sys/netinet6/in6_pcb.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Mon Sep 3 22:14:37 2018 (r338449) +++ head/sys/netinet6/in6_pcb.c Mon Sep 3 22:27:27 2018 (r338450) @@ -846,13 +846,10 @@ in6_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifne * (by a redirect), time to try a default gateway again. */ void -in6_losing(struct inpcb *in6p) +in6_losing(struct inpcb *inp) { - RO_RTFREE(&in6p->inp_route6); - if (in6p->inp_route6.ro_lle) - LLE_FREE(in6p->inp_route6.ro_lle); /* zeros ro_lle */ - return; + RO_INVALIDATE_CACHE(&inp->inp_route6); } /* @@ -860,12 +857,10 @@ in6_losing(struct inpcb *in6p) * and allocate a (hopefully) better one. */ struct inpcb * -in6_rtchange(struct inpcb *inp, int errno) +in6_rtchange(struct inpcb *inp, int errno __unused) { - RO_RTFREE(&in6p->inp_route6); - if (inp->inp_route6.ro_lle) - LLE_FREE(inp->inp_route6.ro_lle); /* zeros ro_lle */ + RO_INVALIDATE_CACHE(&inp->inp_route6); return inp; } Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Sep 3 22:14:37 2018 (r338449) +++ head/sys/netinet6/ip6_output.c Mon Sep 3 22:27:27 2018 (r338450) @@ -804,22 +804,16 @@ again: error = netisr_queue(NETISR_IPV6, m); goto done; } else { - RO_RTFREE(ro); + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ - if (ro->ro_lle) - LLE_FREE(ro->ro_lle); /* zeros ro_lle */ - ro->ro_lle = NULL; } } /* See if fib was changed by packet filter. */ if (fibnum != M_GETFIB(m)) { m->m_flags |= M_SKIP_FIREWALL; fibnum = M_GETFIB(m); - RO_RTFREE(ro); + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; - if (ro->ro_lle) - LLE_FREE(ro->ro_lle); /* zeros ro_lle */ - ro->ro_lle = NULL; } if (needfiblookup) goto again;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809032227.w83MRSq1027505>