summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_mroute.c12
-rw-r--r--sys/netinet6/ip6_mroute.c23
2 files changed, 6 insertions, 29 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 7da94bf5563..0ead255eb0a 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.84 2015/11/12 16:48:53 mpi Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.85 2015/11/12 16:58:45 mpi Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
@@ -67,14 +67,14 @@
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
#include <sys/sysctl.h>
#include <sys/timeout.h>
+#include <crypto/siphash.h>
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
@@ -83,19 +83,15 @@
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/in_pcb.h>
-#include <netinet/udp.h>
#include <netinet/igmp.h>
#include <netinet/igmp_var.h>
#include <netinet/ip_mroute.h>
+
#ifdef PIM
#include <netinet/pim.h>
#include <netinet/pim_var.h>
#endif
-#include <sys/stdarg.h>
-
-#include <crypto/siphash.h>
-
#define IP_MULTICASTOPTS 0
#define M_PULLUP(m, len) \
do { \
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 4cd0cdb2940..05413df18c9 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -87,10 +87,7 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
-#include <sys/sockio.h>
#include <sys/protosw.h>
-#include <sys/errno.h>
-#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
@@ -102,9 +99,9 @@
#include <net/if_var.h>
#include <netinet/in.h>
-#include <netinet/icmp6.h>
#include <netinet6/in6_var.h>
#include <netinet/ip6.h>
+#include <netinet/icmp6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/ip6_mroute.h>
@@ -151,9 +148,7 @@ void expire_upcalls6(void *);
#define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */
#define UPCALL_EXPIRE 6 /* number of timeouts */
-#ifdef MROUTING
extern struct socket *ip_mrouter;
-#endif
/*
* 'Interfaces' associated with decapsulator (so we can tell
@@ -546,16 +541,13 @@ ip6_mrouter_done(void)
* For each phyint in use, disable promiscuous reception of all IPv6
* multicasts.
*/
-#ifdef MROUTING
/*
* If there is still IPv4 multicast routing daemon,
* we remain interfaces to receive all muliticasted packets.
* XXX: there may be an interface in which the IPv4 multicast
* daemon is not interested...
*/
- if (!ip_mrouter)
-#endif
- {
+ if (!ip_mrouter) {
for (mifi = 0; mifi < nummifs; mifi++) {
if (mif6table[mifi].m6_ifp &&
!(mif6table[mifi].m6_flags & MIFF_REGISTER)) {
@@ -568,10 +560,6 @@ ip6_mrouter_done(void)
}
}
}
-#ifdef notyet
- bzero((caddr_t)qtable, sizeof(qtable));
- bzero((caddr_t)tbftable, sizeof(tbftable));
-#endif
bzero((caddr_t)mif6table, sizeof(mif6table));
nummifs = 0;
@@ -661,9 +649,6 @@ add_m6if(struct mif6ctl *mifcp)
struct ifnet *ifp;
struct in6_ifreq ifr;
int error, s;
-#ifdef notyet
- struct tbf *m_tbf = tbftable + mifcp->mif6c_mifi;
-#endif
if (mifcp->mif6c_mifi >= MAXMIFS)
return EINVAL;
@@ -777,10 +762,6 @@ del_m6if(mifi_t *mifip)
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
}
-#ifdef notyet
- bzero((caddr_t)qtable[*mifip], sizeof(qtable[*mifip]));
- bzero((caddr_t)mifp->m6_tbf, sizeof(*(mifp->m6_tbf)));
-#endif
bzero((caddr_t)mifp, sizeof (*mifp));
/* Adjust nummifs down */