Project

General

Profile

Submit #2780 ยป rfc4861_no.patch

gpr, 01/29/2015 08:33 AM

View differences:

sys/netinet6/in6.h
/* New entries should be added here from current IPV6CTL_MAXID value. */
/* to define items, should talk with KAME guys first, for *BSD compatibility */
#define IPV6CTL_MAXID 42
#define ICMPV6CTL_ND6_ONLINKNSRFC4861 47
#define IPV6CTL_MAXID 48
#endif /* !_XOPEN_SOURCE */
/*
sys/netinet6/in6_proto.c
#ifndef IPV6_SENDREDIRECTS
#define IPV6_SENDREDIRECTS 1
#endif
int nd6_onlink_ns_rfc4861 = 0; /* allow 'on-link' nd6 NS (as in RFC 4861) */
int ip6_forwarding = IPV6FORWARDING; /* act as router? */
int ip6_sendredirects = IPV6_SENDREDIRECTS;
......
&nd6_maxnudhint, 0, "Max # of subsequent upper layer hints");
SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG, nd6_debug, CTLFLAG_RW,
&nd6_debug, 0, "Enable debug output");
SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861, nd6_onlink_ns_rfc4861, CTLFLAG_RW,
&nd6_onlink_ns_rfc4861, 0, "Accept 'on-link' nd6 NS in compliance with RFC 4861.");
sys/netinet6/nd6.h
extern struct nd_prhead nd_prefix;
extern struct mtx nd6_mtx;
extern int nd6_debug;
extern int nd6_onlink_ns_rfc4861;
#define nd6log(x) do { if (nd6_debug) log x; } while (0)
sys/netinet6/nd6_nbr.c
"(wrong ip6 dst)\n"));
goto bad;
}
} else {
} else if (!nd6_onlink_ns_rfc4861) {
/*
* Make sure the source address is from a neighbor's address.
*
    (1-1/1)