[BACK]Return to nd6_nbr.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet6/nd6_nbr.c between version 1.162 and 1.163

version 1.162, 2018/12/07 14:47:24 version 1.163, 2018/12/13 10:27:51
Line 653  nd6_na_input(struct mbuf *m, int off, in
Line 653  nd6_na_input(struct mbuf *m, int off, in
                 goto freeit;                  goto freeit;
         }          }
   
         if (ndopts.nd_opts_tgt_lladdr) {          if (ndopts.nd_opts_tgt_lladdr != NULL) {
                   struct ifnet *ifp_ll;
                   struct psref psref_ll;
   
                 lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1);                  lladdr = (char *)(ndopts.nd_opts_tgt_lladdr + 1);
                 lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;                  lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
   
                   if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
                           nd6log(LOG_INFO, "lladdrlen mismatch for %s "
                               "(if %d, NA packet %d)\n", IN6_PRINT(ip6buf, &taddr6),
                               ifp->if_addrlen, lladdrlen - 2);
                           goto bad;
                   }
   
                   ifp_ll = if_get_bylla(lladdr, ifp->if_addrlen, &psref_ll);
                   if (ifp_ll != NULL) {
                           /* it's from me, ignore it. */
                           if_put(ifp_ll, &psref_ll);
                           goto freeit;
                   }
         }          }
   
         ifa = (struct ifaddr *)in6ifa_ifpwithaddr_psref(ifp, &taddr6, &psref_ia);          ifa = (struct ifaddr *)in6ifa_ifpwithaddr_psref(ifp, &taddr6, &psref_ia);
Line 691  nd6_na_input(struct mbuf *m, int off, in
Line 708  nd6_na_input(struct mbuf *m, int off, in
                 goto bad;                  goto bad;
         }          }
   
         if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {  
                 nd6log(LOG_INFO, "lladdrlen mismatch for %s "  
                     "(if %d, NA packet %d)\n", IN6_PRINT(ip6buf, &taddr6),  
                     ifp->if_addrlen, lladdrlen - 2);  
                 goto bad;  
         }  
   
         /*          /*
          * If no neighbor cache entry is found, NA SHOULD silently be           * If no neighbor cache entry is found, NA SHOULD silently be
          * discarded.           * discarded.

Legend:
Removed from v.1.162  
changed lines
  Added in v.1.163

CVSweb <webmaster@jp.NetBSD.org>