Hi,

In OpenBSD 6.0 we had the check (ip6_forward_rt.ro_tableid !=
m->m_pkthdr.ph_rtableid) after going to reroute in ip6_forward().
As this was lost during refactoring, now the old route is used after
pf has changed the routing table.  Solution is to reset the route,
then it is not valid and will be reallocated.

ok?

bluhm

Index: netinet6/ip6_forward.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/ip6_forward.c,v
retrieving revision 1.94
diff -u -p -r1.94 ip6_forward.c
--- netinet6/ip6_forward.c      5 Feb 2017 16:04:14 -0000       1.94
+++ netinet6/ip6_forward.c      29 Jun 2017 14:33:28 -0000
@@ -298,6 +298,8 @@ reroute:
                /* tag as generated to skip over pf_test on rerun */
                m->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
                srcrt = 1;
+               rtfree(rt);
+               rt = NULL;
                if_put(ifp);
                ifp = NULL;
                goto reroute;

Reply via email to