[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.98.4.1 and 1.109.4.2

version 1.98.4.1, 2007/07/11 20:11:42 version 1.109.4.2, 2007/10/26 15:49:08
Line 148  struct pfil_head inet6_pfil_hook;
Line 148  struct pfil_head inet6_pfil_hook;
   
 struct ip6stat ip6stat;  struct ip6stat ip6stat;
   
 static void ip6_init2 __P((void *));  static void ip6_init2(void *);
 static struct m_tag *ip6_setdstifaddr __P((struct mbuf *, struct in6_ifaddr *));  static struct m_tag *ip6_setdstifaddr __P((struct mbuf *, struct in6_ifaddr *));
   
 static int ip6_hopopts_input __P((u_int32_t *, u_int32_t *, struct mbuf **, int *));  static int ip6_hopopts_input(u_int32_t *, u_int32_t *, struct mbuf **, int *);
 static struct mbuf *ip6_pullexthdr __P((struct mbuf *, size_t, int));  static struct mbuf *ip6_pullexthdr(struct mbuf *, size_t, int);
   
 /*  /*
  * IP6 initialization: fill in IP6 protocol switch table.   * IP6 initialization: fill in IP6 protocol switch table.
Line 490  ip6_input(struct mbuf *m)
Line 490  ip6_input(struct mbuf *m)
         else          else
                 ip6stat.ip6s_forward_cachemiss++;                  ip6stat.ip6s_forward_cachemiss++;
   
 #define rt6_key(r) ((struct sockaddr_in6 *)((r)->rt_nodes->rn_key))  #define rt6_getkey(__rt) satocsin6(rt_getkey(__rt))
   
         /*          /*
          * Accept the packet if the forwarding interface to the destination           * Accept the packet if the forwarding interface to the destination
Line 510  ip6_input(struct mbuf *m)
Line 510  ip6_input(struct mbuf *m)
              * the destination and the key of the rtentry has               * the destination and the key of the rtentry has
              * already done through looking up the routing table.               * already done through looking up the routing table.
              */               */
             IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &rt6_key(rt)->sin6_addr) &&              IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &rt6_getkey(rt)->sin6_addr) &&
 #endif  #endif
             rt->rt_ifp->if_type == IFT_LOOP) {              rt->rt_ifp->if_type == IFT_LOOP) {
                 struct in6_ifaddr *ia6 = (struct in6_ifaddr *)rt->rt_ifa;                  struct in6_ifaddr *ia6 = (struct in6_ifaddr *)rt->rt_ifa;
Line 590  ip6_input(struct mbuf *m)
Line 590  ip6_input(struct mbuf *m)
          * as our interface address (e.g. multicast addresses, addresses           * as our interface address (e.g. multicast addresses, addresses
          * within FAITH prefixes and such).           * within FAITH prefixes and such).
          */           */
         if (deliverifp && !ip6_getdstifaddr(m)) {          if (deliverifp && ip6_getdstifaddr(m) == NULL) {
                 struct in6_ifaddr *ia6;                  struct in6_ifaddr *ia6;
   
                 ia6 = in6_ifawithifp(deliverifp, &ip6->ip6_dst);                  ia6 = in6_ifawithifp(deliverifp, &ip6->ip6_dst);
                 if (ia6) {                  if (ia6 != NULL && ip6_setdstifaddr(m, ia6) == NULL) {
                         if (!ip6_setdstifaddr(m, ia6)) {                          /*
                                 /*                           * XXX maybe we should drop the packet here,
                                  * XXX maybe we should drop the packet here,                           * as we could not provide enough information
                                  * as we could not provide enough information                           * to the upper layers.
                                  * to the upper layers.                           */
                                  */  
                         }  
                 }                  }
         }          }
   
Line 810  ip6_input(struct mbuf *m)
Line 808  ip6_input(struct mbuf *m)
                         /* XXX error stat??? */                          /* XXX error stat??? */
                         error = EINVAL;                          error = EINVAL;
                         DPRINTF(("ip6_input: no SP, packet discarded\n"));/*XXX*/                          DPRINTF(("ip6_input: no SP, packet discarded\n"));/*XXX*/
                         goto bad;  
                 }                  }
                 splx(s);                  splx(s);
                 if (error)                  if (error)

Legend:
Removed from v.1.98.4.1  
changed lines
  Added in v.1.109.4.2

CVSweb <webmaster@jp.NetBSD.org>