Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by jmcne...



details:   https://anonhg.NetBSD.org/src/rev/987a239ebc86
branches:  netbsd-8
changeset: 851181:987a239ebc86
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Nov 27 14:11:17 2017 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #398):
        sys/net/if_vlan.c: revision 1.113
kern/52765: npf cannot do port forwarding on vlan interfaces
Add pfil hooks support to vlan(4), from christos@

diffstat:

 sys/net/if_vlan.c |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (46 lines):

diff -r e9c2c1412914 -r 987a239ebc86 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Mon Nov 27 14:09:11 2017 +0000
+++ b/sys/net/if_vlan.c Mon Nov 27 14:11:17 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.97.2.8 2017/11/24 08:39:09 martin Exp $  */
+/*     $NetBSD: if_vlan.c,v 1.97.2.9 2017/11/27 14:11:17 martin Exp $  */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.8 2017/11/24 08:39:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.97.2.9 2017/11/27 14:11:17 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1347,6 +1347,14 @@
        ec = (void *)mib->ifvm_p;
 
        bpf_mtap(ifp, m);
+
+       if (pfil_run_hooks(ifp->if_pfil, &m, ifp, PFIL_OUT) != 0) {
+               if (m != NULL)
+                       m_freem(m);
+               error = 0;
+               goto out;
+       }
+
        /*
         * If the parent can insert the tag itself, just mark
         * the tag in the mbuf header.
@@ -1531,6 +1539,12 @@
        m_set_rcvif(m, &ifv->ifv_if);
        ifv->ifv_if.if_ipackets++;
 
+       if (pfil_run_hooks(ifp->if_pfil, &m, ifp, PFIL_IN) != 0) {
+               if (m != NULL)
+                       m_freem(m);
+               goto out;
+       }
+
        m->m_flags &= ~M_PROMISC;
        if_input(&ifv->ifv_if, m);
 out:



Home | Main Index | Thread Index | Old Index