summaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 1146cc7e2b2..633c5d9ea07 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.134 2015/07/02 09:40:02 mpi Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.135 2015/07/20 22:16:41 rzalamena Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -47,6 +47,8 @@
* will not modify the ethernet header.
*/
+#include "mpw.h"
+
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -204,6 +206,16 @@ vlan_start(struct ifnet *ifp)
if (prio <= 1)
prio = !prio;
+#if NMPW > 0
+ struct ifnet *ifpn = if_get(m->m_pkthdr.ph_ifidx);
+ /*
+ * If this packet came from a pseudowire it means it already
+ * has all tags it needs, so just output it.
+ */
+ if (ifpn && ifpn->if_type == IFT_MPLSTUNNEL) {
+ /* NOTHING */
+ } else
+#endif /* NMPW */
/*
* If the underlying interface cannot do VLAN tag insertion
* itself, create an encapsulation header.