Index: if_veb.c =================================================================== RCS file: /cvs/src/sys/net/if_veb.c,v retrieving revision 1.16 diff -u -p -r1.16 if_veb.c --- if_veb.c 10 Mar 2021 10:21:48 -0000 1.16 +++ if_veb.c 24 May 2021 11:37:18 -0000 @@ -500,6 +500,7 @@ veb_pf(struct ifnet *ifp0, int dir, stru { struct ether_header *eh, copy; sa_family_t af = AF_UNSPEC; + void (*ip_input)(struct ifnet *, struct mbuf *); /* * pf runs on vport interfaces when they enter or leave the @@ -515,10 +516,14 @@ veb_pf(struct ifnet *ifp0, int dir, stru switch (ntohs(eh->ether_type)) { case ETHERTYPE_IP: af = AF_INET; + ip_input = ipv4_input; break; +#ifdef INET6 case ETHERTYPE_IPV6: af = AF_INET6; + ip_input = ipv6_input; break; +#endif default: return (m); } @@ -538,6 +543,11 @@ veb_pf(struct ifnet *ifp0, int dir, stru return (NULL); /* checksum? */ + + if (dir == PF_IN && ISSET(m->m_pkthdr.pf.flags, PF_TAG_DIVERTED)) { + (*ip_input)(ifp0, m); + return (NULL); + } eh = mtod(m, struct ether_header *); *eh = copy;