summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_gre.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@cvs.openbsd.org>2015-07-29 00:04:04 +0000
committerRafael Zalamena <rzalamena@cvs.openbsd.org>2015-07-29 00:04:04 +0000
commitf9452d6600827be8026afad77d2bee42f3f5ec28 (patch)
tree6020f17eaa7adece3613fd99fb745a46a1694e0f /sys/netinet/ip_gre.c
parent0570bc829f17be54336aa00b04fdc334d53f2406 (diff)
Don't use mpls_input() as input handler anymore and instead call it
directly. Also protect non mp-safe functions while at it. ok mpi@.
Diffstat (limited to 'sys/netinet/ip_gre.c')
-rw-r--r--sys/netinet/ip_gre.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 7d348a66c17..65055d2cce6 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.c,v 1.56 2015/07/20 21:16:39 rzalamena Exp $ */
+/* $OpenBSD: ip_gre.c,v 1.57 2015/07/29 00:04:03 rzalamena Exp $ */
/* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -97,8 +97,6 @@ gre_input2(struct mbuf *m, int hlen, u_char proto)
struct gre_softc *sc;
u_short flags;
u_int af;
- int s;
- struct mbuf_list ml = MBUF_LIST_INITIALIZER();
if ((sc = gre_lookup(m, proto)) == NULL) {
/* No matching tunnel or tunnel is down. */
@@ -180,17 +178,8 @@ gre_input2(struct mbuf *m, int hlen, u_char proto)
#ifdef MPLS
case ETHERTYPE_MPLS:
case ETHERTYPE_MPLS_MCAST:
- if ((sc->sc_if.if_xflags & IFXF_MPLS) == 0) {
- m_freem(m);
- return (0);
- }
-
- ml_enqueue(&ml, m);
-
- s = splnet();
- if_input(&sc->sc_if, &ml);
- splx(s);
- return (0);
+ mpls_input(&sc->sc_if, m);
+ return (1);
#endif
default: /* others not yet supported */
return (0);