diff options
author | 2017-11-17 18:21:33 +0000 | |
---|---|---|
committer | 2017-11-17 18:21:33 +0000 | |
commit | 1ebb0d2d7e810b91e5599414f326159f30f7fa3e (patch) | |
tree | 5ce1bdfb17354dc62de9c60650904cd484fe5583 | |
parent | Rename functions that now handle only MPLS-in-IP (diff) | |
download | wireguard-openbsd-1ebb0d2d7e810b91e5599414f326159f30f7fa3e.tar.xz wireguard-openbsd-1ebb0d2d7e810b91e5599414f326159f30f7fa3e.zip |
Add ifdef MPLS around all the MPLS-in-IP code
ok visa@ mpi@
-rw-r--r-- | sys/netinet/ip_ether.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_ether.h | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c index 01971a09353..bcc99183b20 100644 --- a/sys/netinet/ip_ether.c +++ b/sys/netinet/ip_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ether.c,v 1.95 2017/11/17 18:20:49 jca Exp $ */ +/* $OpenBSD: ip_ether.c,v 1.96 2017/11/17 18:21:33 jca Exp $ */ /* * The author of this code is Angelos D. Keromytis (kermit@adk.gr) * @@ -66,7 +66,6 @@ #ifdef MPLS void mplsip_decap(struct mbuf *, int); -#endif struct gif_softc *mplsip_getgif(struct mbuf *); /* @@ -76,11 +75,9 @@ int mplsip_input(struct mbuf **mp, int *offp, int proto, int af) { switch (proto) { -#ifdef MPLS case IPPROTO_MPLS: mplsip_decap(*mp, *offp); return IPPROTO_DONE; -#endif default: DPRINTF(("%s: dropped, unhandled protocol\n", __func__)); m_freemp(mp); @@ -88,7 +85,6 @@ mplsip_input(struct mbuf **mp, int *offp, int proto, int af) } } -#ifdef MPLS void mplsip_decap(struct mbuf *m, int iphlen) { @@ -136,7 +132,6 @@ mplsip_decap(struct mbuf *m, int iphlen) mpls_input(m); } -#endif struct gif_softc * mplsip_getgif(struct mbuf *m) @@ -312,3 +307,4 @@ mplsip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int proto) return 0; } +#endif /* MPLS */ diff --git a/sys/netinet/ip_ether.h b/sys/netinet/ip_ether.h index c839ecc4000..988b7b8f67a 100644 --- a/sys/netinet/ip_ether.h +++ b/sys/netinet/ip_ether.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ether.h,v 1.27 2017/11/17 18:20:49 jca Exp $ */ +/* $OpenBSD: ip_ether.h,v 1.28 2017/11/17 18:21:33 jca Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@adk.gr) * @@ -107,10 +107,12 @@ etheripstat_pkt(enum etheripstat_counters pcounter, counters_pkt(etheripcounters, pcounter, bcounter, v); } -struct tdb; +struct tdb; /* XXX within #ifdef MPLS? */ +#ifdef MPLS int mplsip_output(struct mbuf *, struct tdb *, struct mbuf **, int); int mplsip_input(struct mbuf **, int *, int, int); +#endif /* MPLS */ #endif /* _KERNEL */ #endif /* _NETINET_IP_ETHER_H_ */ |