summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2017-11-17 14:52:50 +0000
committerjca <jca@openbsd.org>2017-11-17 14:52:50 +0000
commit7bfba612abdd07aad490e2ab2ee0caa89637ff2c (patch)
tree5b0c50d8b78d7296bd04192a762707ad6bc79381
parentDrop etheripstat use in ip_ether.c (diff)
downloadwireguard-openbsd-7bfba612abdd07aad490e2ab2ee0caa89637ff2c.tar.xz
wireguard-openbsd-7bfba612abdd07aad490e2ab2ee0caa89637ff2c.zip
Move etherip_allow where it is used
While here, drop the declaration in headers, since the variable is used in a single file. ok visa@ mpi@
-rw-r--r--sys/net/if_etherip.c11
-rw-r--r--sys/net/if_etherip.h2
-rw-r--r--sys/netinet/ip_ether.c8
-rw-r--r--sys/netinet/ip_ether.h4
4 files changed, 3 insertions, 22 deletions
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c
index 5e2b1cfe069..8eac395cb2c 100644
--- a/sys/net/if_etherip.c
+++ b/sys/net/if_etherip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_etherip.c,v 1.25 2017/11/17 14:50:17 jca Exp $ */
+/* $OpenBSD: if_etherip.c,v 1.26 2017/11/17 14:52:50 jca Exp $ */
/*
* Copyright (c) 2015 Kazuya GODA <goda@openbsd.org>
*
@@ -64,20 +64,11 @@ struct etherip_softc {
LIST_HEAD(, etherip_softc) etherip_softc_list;
-#if 0
-/*
- * TODO:
- * At this stage, etherip_allow and etheripstat are defined
- * at netinet/ip_ether.c. When implementation of etherip is
- * removed from gif(4), there are moved here.
- */
-
/*
* We can control the acceptance of EtherIP packets by altering the sysctl
* net.inet.etherip.allow value. Zero means drop them, all else is acceptance.
*/
int etherip_allow = 0;
-#endif
struct cpumem *etheripcounters;
diff --git a/sys/net/if_etherip.h b/sys/net/if_etherip.h
index 6349e671850..a37a9f2e4d0 100644
--- a/sys/net/if_etherip.h
+++ b/sys/net/if_etherip.h
@@ -26,8 +26,6 @@
* are moved here.
*/
-extern int etherip_allow;
-
struct etheripstat {
u_int64_t etherips_hdrops; /* packet shorter than header shows */
u_int64_t etherips_qfull; /* bridge queue full, packet dropped */
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c
index 5b0485d61e5..9b123a48e1b 100644
--- a/sys/netinet/ip_ether.c
+++ b/sys/netinet/ip_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ether.c,v 1.93 2017/11/17 14:51:48 jca Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.94 2017/11/17 14:52:51 jca Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
*
@@ -70,12 +70,6 @@ void mplsip_decap(struct mbuf *, int);
struct gif_softc *etherip_getgif(struct mbuf *);
/*
- * We can control the acceptance of EtherIP packets by altering the sysctl
- * net.inet.etherip.allow value. Zero means drop them, all else is acceptance.
- */
-int etherip_allow = 0;
-
-/*
* etherip_input gets called when we receive an encapsulated packet.
*/
int
diff --git a/sys/netinet/ip_ether.h b/sys/netinet/ip_ether.h
index 4457fad5435..c06b36a1542 100644
--- a/sys/netinet/ip_ether.h
+++ b/sys/netinet/ip_ether.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ether.h,v 1.25 2017/11/17 13:36:04 jca Exp $ */
+/* $OpenBSD: ip_ether.h,v 1.26 2017/11/17 14:52:51 jca Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@adk.gr)
*
@@ -112,7 +112,5 @@ struct tdb;
int etherip_output(struct mbuf *, struct tdb *, struct mbuf **, int);
int etherip_input(struct mbuf **, int *, int, int);
-extern int etherip_allow;
-
#endif /* _KERNEL */
#endif /* _NETINET_IP_ETHER_H_ */