summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-05-11 09:22:57 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-05-11 09:22:57 +0000
commit432ff65a43723f8e2fd5ab2922f37dbdaf16bed3 (patch)
tree3077063934c1fac321c57d824ebea13f1700ddf1 /sys/net
parent011385e6acf27bd8b2fdf46cf99f6cc511375420 (diff)
Add support for MPLS in GRE. Fairly trivial and a NOP unless option MPLS
is defined.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gre.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index a022a3295e9..fde4de2c306 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.47 2010/05/07 13:33:16 claudio Exp $ */
+/* $OpenBSD: if_gre.c,v 1.48 2010/05/11 09:22:56 claudio Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -377,6 +377,14 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
etype = ETHERTYPE_IPV6;
break;
#endif
+#ifdef MPLS
+ case AF_MPLS:
+ if (m->m_flags & (M_BCAST | M_MCAST))
+ etype = ETHERTYPE_MPLS_MCAST;
+ else
+ etype = ETHERTYPE_MPLS;
+ break;
+#endif
default:
IF_DROP(&ifp->if_snd);
m_freem(m);