Diff below kills the unused RTAX_NETMASK arguments and the global
variable associated of two requests where a route to host is added
or deleted.
ok?
Index: netinet6/in6.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/in6.c,v
retrieving revision 1.130
diff -u -p -c -4 -r1.130 in6.c
*** netinet6/in6.c 21 Jan 2014 10:18:26 -0000 1.130
--- netinet6/in6.c 22 Jan 2014 10:21:00 -0000
*************** const struct sockaddr_in6 sa6_any = {
*** 135,151 ****
void
in6_ifloop_request(int cmd, struct ifaddr *ifa)
{
struct rt_addrinfo info;
- struct sockaddr_in6 all1_sa;
struct rtentry *nrt = NULL;
int e;
- bzero(&all1_sa, sizeof(all1_sa));
- all1_sa.sin6_family = AF_INET6;
- all1_sa.sin6_len = sizeof(struct sockaddr_in6);
- all1_sa.sin6_addr = in6mask128;
-
/*
* We specify the address itself as the gateway, and set the
* RTF_LLINFO flag, so that the corresponding host route would have
* the flag, and thus applications that assume traditional behavior
--- 135,145 ----
*************** in6_ifloop_request(int cmd, struct ifadd
*** 158,166 ****
info.rti_flags = RTF_UP | RTF_HOST | RTF_LLINFO;
info.rti_info[RTAX_DST] = ifa->ifa_addr;
if (cmd != RTM_DELETE)
info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr;
- info.rti_info[RTAX_NETMASK] = sin6tosa(&all1_sa);
e = rtrequest1(cmd, &info, RTP_CONNECTED, &nrt,
ifa->ifa_ifp->if_rdomain);
if (e != 0) {
char addr[INET6_ADDRSTRLEN];
--- 152,159 ----
Index: netinet6/nd6.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/nd6.c,v
retrieving revision 1.109
diff -u -p -c -4 -r1.109 nd6.c
*** netinet6/nd6.c 13 Jan 2014 23:03:52 -0000 1.109
--- netinet6/nd6.c 22 Jan 2014 10:21:00 -0000
*************** struct llinfo_nd6 llinfo_nd6 = {&llinfo_
*** 91,99 ****
struct nd_drhead nd_defrouter;
struct nd_prhead nd_prefix = { 0 };
int nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL;
- static struct sockaddr_in6 all1_sa;
void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *);
void nd6_slowtimo(void *);
struct llinfo_nd6 *nd6_free(struct rtentry *, int);
--- 91,98 ----
*************** int fill_prlist(void *, size_t *, size_t
*** 119,138 ****
void
nd6_init(void)
{
static int nd6_init_done = 0;
- int i;
if (nd6_init_done) {
log(LOG_NOTICE, "nd6_init called more than once(ignored)\n");
return;
}
- all1_sa.sin6_family = AF_INET6;
- all1_sa.sin6_len = sizeof(struct sockaddr_in6);
- for (i = 0; i < sizeof(all1_sa.sin6_addr); i++)
- all1_sa.sin6_addr.s6_addr[i] = 0xff;
-
/* initialization of the default router list */
TAILQ_INIT(&nd_defrouter);
nd6_init_done = 1;
--- 118,131 ----
*************** nd6_lookup(struct in6_addr *addr6, int c
*** 688,696 ****
info.rti_flags = (ifa->ifa_flags | RTF_HOST |
RTF_LLINFO) & ~RTF_CLONING;
info.rti_info[RTAX_DST] = sin6tosa(&sin6);
info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr;
- info.rti_info[RTAX_NETMASK] = sin6tosa(&all1_sa);
if ((e = rtrequest1(RTM_ADD, &info, RTP_CONNECTED,
&rt, rtableid)) != 0) {
#if 0
char ip[INET6_ADDRSTRLEN];
--- 681,688 ----