[BACK]Return to ip6_input.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/ip6_input.c between version 1.94 and 1.94.2.1

version 1.94, 2007/02/10 09:43:05 version 1.94.2.1, 2007/02/27 16:55:03
Line 237  ip6intr()
Line 237  ip6intr()
 extern struct   route_in6 ip6_forward_rt;  extern struct   route_in6 ip6_forward_rt;
   
 void  void
 ip6_input(m)  ip6_input(struct mbuf *m)
         struct mbuf *m;  
 {  {
         struct ip6_hdr *ip6;          struct ip6_hdr *ip6;
         int off = sizeof(struct ip6_hdr), nest;          int off = sizeof(struct ip6_hdr), nest;
Line 277  ip6_input(m)
Line 276  ip6_input(m)
                 else                  else
                         ip6stat.ip6s_mext1++;                          ip6stat.ip6s_mext1++;
         } else {          } else {
 #define M2MMAX  (sizeof(ip6stat.ip6s_m2m)/sizeof(ip6stat.ip6s_m2m[0]))  #define M2MMAX  __arraycount(ip6stat.ip6s_m2m)
                 if (m->m_next) {                  if (m->m_next) {
                         if (m->m_flags & M_LOOP) {                          if (m->m_flags & M_LOOP) {
                                 ip6stat.ip6s_m2m[lo0ifp->if_index]++; /* XXX */                                  ip6stat.ip6s_m2m[lo0ifp->if_index]++; /* XXX */
Line 465  ip6_input(m)
Line 464  ip6_input(m)
          *  Unicast check           *  Unicast check
          */           */
         if (!IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst,          if (!IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst,
             &((struct sockaddr_in6 *)(&ip6_forward_rt.ro_dst))->sin6_addr))              &((const struct sockaddr_in6 *)rtcache_getdst((const struct route *)&ip6_forward_rt))->sin6_addr))
                 rtcache_free((struct route *)&ip6_forward_rt);                  rtcache_free((struct route *)&ip6_forward_rt);
         else          else
                 rtcache_check((struct route *)&ip6_forward_rt);                  rtcache_check((struct route *)&ip6_forward_rt);
Line 477  ip6_input(m)
Line 476  ip6_input(m)
   
                 ip6stat.ip6s_forward_cachemiss++;                  ip6stat.ip6s_forward_cachemiss++;
   
                 bzero(&ip6_forward_rt.ro_dst, sizeof(struct sockaddr_in6));                  dst6 = &ip6_forward_rt.ro_dst;
                 dst6 = (struct sockaddr_in6 *)&ip6_forward_rt.ro_dst;                  memset(dst6, 0, sizeof(*dst6));
                 dst6->sin6_len = sizeof(struct sockaddr_in6);                  dst6->sin6_len = sizeof(struct sockaddr_in6);
                 dst6->sin6_family = AF_INET6;                  dst6->sin6_family = AF_INET6;
                 dst6->sin6_addr = ip6->ip6_dst;                  dst6->sin6_addr = ip6->ip6_dst;
Line 1298  ip6_savecontrol(in6p, mp, ip6, m)
Line 1297  ip6_savecontrol(in6p, mp, ip6, m)
   
   
 void  void
 ip6_notify_pmtu(struct in6pcb *in6p, struct sockaddr_in6 *dst, uint32_t *mtu)  ip6_notify_pmtu(struct in6pcb *in6p, const struct sockaddr_in6 *dst,
       uint32_t *mtu)
 {  {
         struct socket *so;          struct socket *so;
         struct mbuf *m_mtu;          struct mbuf *m_mtu;
Line 1324  ip6_notify_pmtu(struct in6pcb *in6p, str
Line 1324  ip6_notify_pmtu(struct in6pcb *in6p, str
             IPV6_PATHMTU, IPPROTO_IPV6)) == NULL)              IPV6_PATHMTU, IPPROTO_IPV6)) == NULL)
                 return;                  return;
   
         if (sbappendaddr(&so->so_rcv, (struct sockaddr *)dst, NULL, m_mtu)          if (sbappendaddr(&so->so_rcv, (const struct sockaddr *)dst, NULL, m_mtu)
             == 0) {              == 0) {
                 m_freem(m_mtu);                  m_freem(m_mtu);
                 /* XXX: should count statistics */                  /* XXX: should count statistics */

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.94.2.1

CVSweb <webmaster@jp.NetBSD.org>