Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.149.4.5 retrieving revision 1.156 diff -u -p -r1.149.4.5 -r1.156 --- src/sys/netinet6/ip6_input.c 2016/04/22 15:44:18 1.149.4.5 +++ src/sys/netinet6/ip6_input.c 2016/04/01 05:11:38 1.156 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.149.4.5 2016/04/22 15:44:18 skrll Exp $ */ +/* $NetBSD: ip6_input.c,v 1.156 2016/04/01 05:11:38 ozaki-r Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.149.4.5 2016/04/22 15:44:18 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.156 2016/04/01 05:11:38 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -410,7 +410,7 @@ ip6_input(struct mbuf *m) * to the usage conflict. * in6_setscope() then also checks and rejects the cases where src or * dst are the loopback address and the receiving interface - * is not loopback. + * is not loopback. */ if (__predict_false( m_makewritable(&m, 0, sizeof(struct ip6_hdr), M_DONTWAIT))) @@ -476,6 +476,7 @@ ip6_input(struct mbuf *m) */ if (rt != NULL && (rt->rt_flags & (RTF_HOST|RTF_GATEWAY)) == RTF_HOST && + !(rt->rt_flags & RTF_CLONED) && #if 0 /* * The check below is redundant since the comparison of @@ -499,9 +500,10 @@ ip6_input(struct mbuf *m) goto hbhcheck; } else { /* address is not ready, so discard the packet. */ - nd6log(LOG_INFO, "packet to an unready address %s->%s\n", + nd6log((LOG_INFO, + "ip6_input: packet to an unready address %s->%s\n", ip6_sprintf(&ip6->ip6_src), - ip6_sprintf(&ip6->ip6_dst)); + ip6_sprintf(&ip6->ip6_dst))); goto bad; } @@ -801,7 +803,7 @@ ip6_getdstifaddr(struct mbuf *m) * rtalertp - XXX: should be stored more smart way */ int -ip6_hopopts_input(u_int32_t *plenp, u_int32_t *rtalertp, +ip6_hopopts_input(u_int32_t *plenp, u_int32_t *rtalertp, struct mbuf **mp, int *offp) { struct mbuf *m = *mp; @@ -846,7 +848,7 @@ ip6_hopopts_input(u_int32_t *plenp, u_in * opthead + hbhlen is located in continuous memory region. */ static int -ip6_process_hopopts(struct mbuf *m, u_int8_t *opthead, int hbhlen, +ip6_process_hopopts(struct mbuf *m, u_int8_t *opthead, int hbhlen, u_int32_t *rtalertp, u_int32_t *plenp) { struct ip6_hdr *ip6; @@ -1021,7 +1023,7 @@ ip6_unknown_opt(u_int8_t *optp, struct m * you are using IP6_EXTHDR_CHECK() not m_pulldown()) */ void -ip6_savecontrol(struct in6pcb *in6p, struct mbuf **mp, +ip6_savecontrol(struct in6pcb *in6p, struct mbuf **mp, struct ip6_hdr *ip6, struct mbuf *m) { #ifdef RFC2292 @@ -1526,19 +1528,19 @@ ip6_delaux(struct mbuf *m) } #ifdef GATEWAY -/* +/* * sysctl helper routine for net.inet.ip6.maxflows. Since * we could reduce this value, call ip6flow_reap(); */ static int sysctl_net_inet6_ip6_maxflows(SYSCTLFN_ARGS) -{ +{ int error; - + error = sysctl_lookup(SYSCTLFN_CALL(rnode)); if (error || newp == NULL) return (error); - + mutex_enter(softnet_lock); KERNEL_LOCK(1, NULL); @@ -1546,13 +1548,13 @@ sysctl_net_inet6_ip6_maxflows(SYSCTLFN_A KERNEL_UNLOCK_ONE(NULL); mutex_exit(softnet_lock); - + return (0); } static int sysctl_net_inet6_ip6_hashsize(SYSCTLFN_ARGS) -{ +{ int error, tmp; struct sysctlnode node; @@ -1579,7 +1581,7 @@ sysctl_net_inet6_ip6_hashsize(SYSCTLFN_A * EINVAL if not a power of 2 */ error = EINVAL; - } + } return error; } @@ -1903,7 +1905,7 @@ sysctl_net_inet6_ip6_setup(struct sysctl NULL, 0, &ip6_mcast_pmtu, 0, CTL_NET, PF_INET6, IPPROTO_IPV6, CTL_CREATE, CTL_EOL); -#ifdef GATEWAY +#ifdef GATEWAY sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "maxflows",