summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-19 19:57:28 +0000
committerngie <ngie@FreeBSD.org>2015-12-19 19:57:28 +0000
commitf8c5cd12c37a92500da3f42f1d25bae9cc70e30a (patch)
treeea8f2cb9e0c06c3875296365ec64f45267a791eb /sys/netinet6/nd6.c
parent490921132f201193a73d81699cb455aa2ae87357 (diff)
parent69774947bfffd5e16d26b60a82d880aa659abbf2 (diff)
downloadFreeBSD-src-f8c5cd12c37a92500da3f42f1d25bae9cc70e30a.zip
FreeBSD-src-f8c5cd12c37a92500da3f42f1d25bae9cc70e30a.tar.gz
MFhead @ r292474
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index d2a457d..7ca172c 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/callout.h>
-#include <sys/random.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
@@ -103,12 +102,8 @@ VNET_DEFINE(int, nd6_maxnudhint) = 0; /* max # of subsequent upper
* layer hints */
static VNET_DEFINE(int, nd6_maxqueuelen) = 1; /* max pkts cached in unresolved
* ND entries */
-
-static VNET_DEFINE(int, nd6_on_link) = 1; /* Send unsolicited ND's on link up */
-
#define V_nd6_maxndopt VNET(nd6_maxndopt)
#define V_nd6_maxqueuelen VNET(nd6_maxqueuelen)
-#define V_nd6_on_link VNET(nd6_on_link)
#ifdef ND6_DEBUG
VNET_DEFINE(int, nd6_debug) = 1;
@@ -117,7 +112,6 @@ VNET_DEFINE(int, nd6_debug) = 0;
#endif
static eventhandler_tag lle_event_eh;
-static eventhandler_tag ifnet_link_event_eh;
/* for debugging? */
#if 0
@@ -202,14 +196,6 @@ nd6_lle_event(void *arg __unused, struct llentry *lle, int evt)
type == RTM_ADD ? RTF_UP: 0), 0, RT_DEFAULT_FIB);
}
-static void
-nd6_ifnet_link_event(void *arg __unused, struct ifnet *ifp, int linkstate)
-{
-
- if (linkstate == LINK_STATE_UP && V_nd6_on_link)
- nd6_na_output_unsolicited(ifp);
-}
-
void
nd6_init(void)
{
@@ -225,12 +211,9 @@ nd6_init(void)
nd6_slowtimo, curvnet);
nd6_dad_init();
- if (IS_DEFAULT_VNET(curvnet)) {
+ if (IS_DEFAULT_VNET(curvnet))
lle_event_eh = EVENTHANDLER_REGISTER(lle_event, nd6_lle_event,
NULL, EVENTHANDLER_PRI_ANY);
- ifnet_link_event_eh = EVENTHANDLER_REGISTER(ifnet_link_event,
- nd6_ifnet_link_event, NULL, EVENTHANDLER_PRI_ANY);
- }
}
#ifdef VIMAGE
@@ -240,10 +223,8 @@ nd6_destroy()
callout_drain(&V_nd6_slowtimo_ch);
callout_drain(&V_nd6_timer_ch);
- if (IS_DEFAULT_VNET(curvnet)) {
+ if (IS_DEFAULT_VNET(curvnet))
EVENTHANDLER_DEREGISTER(lle_event, lle_event_eh);
- EVENTHANDLER_DEREGISTER(ifnet_link_event, ifnet_link_event_eh);
- }
}
#endif
@@ -2476,18 +2457,13 @@ static int nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS);
SYSCTL_DECL(_net_inet6_icmp6);
#endif
SYSCTL_NODE(_net_inet6_icmp6, ICMPV6CTL_ND6_DRLIST, nd6_drlist,
- CTLFLAG_RD, nd6_sysctl_drlist, "List default routers");
+ CTLFLAG_RD, nd6_sysctl_drlist, "");
SYSCTL_NODE(_net_inet6_icmp6, ICMPV6CTL_ND6_PRLIST, nd6_prlist,
- CTLFLAG_RD, nd6_sysctl_prlist, "List prefixes");
+ CTLFLAG_RD, nd6_sysctl_prlist, "");
SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXQLEN, nd6_maxqueuelen,
- CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_maxqueuelen), 1,
- "Max packets cached in unresolved ND entries");
+ CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_maxqueuelen), 1, "");
SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, nd6_gctimer,
- CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_gctimer), (60 * 60 * 24),
- "Interface in seconds between garbage collection passes");
-SYSCTL_INT(_net_inet6_icmp6, OID_AUTO, nd6_on_link, CTLFLAG_VNET | CTLFLAG_RW,
- &VNET_NAME(nd6_on_link), 0,
- "Send unsolicited neighbor discovery on interface link up events");
+ CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nd6_gctimer), (60 * 60 * 24), "");
static int
nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS)
OpenPOWER on IntegriCloud