[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.82.2.3 and 1.82.4.2

version 1.82.2.3, 2006/09/09 02:58:55 version 1.82.4.2, 2006/06/01 22:39:02
Line 95  __KERNEL_RCSID(0, "$NetBSD$");
Line 95  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netinet/in_systm.h>  #include <netinet/in_systm.h>
 #include <netinet/in_pcb.h>  
 #ifdef INET  #ifdef INET
 #include <netinet/ip.h>  #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>  #include <netinet/ip_icmp.h>
Line 103  __KERNEL_RCSID(0, "$NetBSD$");
Line 102  __KERNEL_RCSID(0, "$NetBSD$");
 #include <netinet/ip6.h>  #include <netinet/ip6.h>
 #include <netinet6/in6_var.h>  #include <netinet6/in6_var.h>
 #include <netinet6/ip6_var.h>  #include <netinet6/ip6_var.h>
   #include <netinet6/in6_pcb.h>
 #include <netinet/icmp6.h>  #include <netinet/icmp6.h>
 #include <netinet6/scope6_var.h>  #include <netinet6/scope6_var.h>
 #include <netinet6/in6_ifattach.h>  #include <netinet6/in6_ifattach.h>
Line 1029  ip6_unknown_opt(optp, m, off)
Line 1029  ip6_unknown_opt(optp, m, off)
  * you are using IP6_EXTHDR_CHECK() not m_pulldown())   * you are using IP6_EXTHDR_CHECK() not m_pulldown())
  */   */
 void  void
 ip6_savecontrol(inp, mp, ip6, m)  ip6_savecontrol(in6p, mp, ip6, m)
         struct inpcb *inp;          struct in6pcb *in6p;
         struct mbuf **mp;          struct mbuf **mp;
         struct ip6_hdr *ip6;          struct ip6_hdr *ip6;
         struct mbuf *m;          struct mbuf *m;
Line 1042  ip6_savecontrol(inp, mp, ip6, m)
Line 1042  ip6_savecontrol(inp, mp, ip6, m)
 #endif  #endif
   
 #ifdef SO_TIMESTAMP  #ifdef SO_TIMESTAMP
         if (inp->inp_socket->so_options & SO_TIMESTAMP) {          if (in6p->in6p_socket->so_options & SO_TIMESTAMP) {
                 struct timeval tv;                  struct timeval tv;
   
                 microtime(&tv);                  microtime(&tv);
Line 1058  ip6_savecontrol(inp, mp, ip6, m)
Line 1058  ip6_savecontrol(inp, mp, ip6, m)
                 return;                  return;
   
         /* RFC 2292 sec. 5 */          /* RFC 2292 sec. 5 */
         if ((inp->inp_flags & IN6P_PKTINFO) != 0) {          if ((in6p->in6p_flags & IN6P_PKTINFO) != 0) {
                 struct in6_pktinfo pi6;                  struct in6_pktinfo pi6;
   
                 bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr));                  bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr));
Line 1071  ip6_savecontrol(inp, mp, ip6, m)
Line 1071  ip6_savecontrol(inp, mp, ip6, m)
                 if (*mp)                  if (*mp)
                         mp = &(*mp)->m_next;                          mp = &(*mp)->m_next;
         }          }
         if (inp->inp_flags & IN6P_HOPLIMIT) {  
           if (in6p->in6p_flags & IN6P_HOPLIMIT) {
                 int hlim = ip6->ip6_hlim & 0xff;                  int hlim = ip6->ip6_hlim & 0xff;
   
                 *mp = sbcreatecontrol((caddr_t) &hlim, sizeof(int),                  *mp = sbcreatecontrol((caddr_t) &hlim, sizeof(int),
Line 1102  ip6_savecontrol(inp, mp, ip6, m)
Line 1103  ip6_savecontrol(inp, mp, ip6, m)
          * returned to normal user.           * returned to normal user.
          * See also RFC3542 section 8 (or RFC2292 section 6).           * See also RFC3542 section 8 (or RFC2292 section 6).
          */           */
         if ((inp->inp_flags & IN6P_HOPOPTS) != 0) {          if ((in6p->in6p_flags & IN6P_HOPOPTS) != 0) {
                 /*                  /*
                  * Check if a hop-by-hop options header is contatined in the                   * Check if a hop-by-hop options header is contatined in the
                  * received packet, and if so, store the options as ancillary                   * received packet, and if so, store the options as ancillary
Line 1146  ip6_savecontrol(inp, mp, ip6, m)
Line 1147  ip6_savecontrol(inp, mp, ip6, m)
         }          }
   
         /* IPV6_DSTOPTS and IPV6_RTHDR socket options */          /* IPV6_DSTOPTS and IPV6_RTHDR socket options */
         if (inp->inp_flags & (IN6P_DSTOPTS | IN6P_RTHDR)) {          if (in6p->in6p_flags & (IN6P_DSTOPTS | IN6P_RTHDR)) {
                 struct ip6_hdr *xip6 = mtod(m, struct ip6_hdr *);                  struct ip6_hdr *xip6 = mtod(m, struct ip6_hdr *);
                 int nxt = xip6->ip6_nxt, off = sizeof(struct ip6_hdr);                  int nxt = xip6->ip6_nxt, off = sizeof(struct ip6_hdr);
   
Line 1195  ip6_savecontrol(inp, mp, ip6, m)
Line 1196  ip6_savecontrol(inp, mp, ip6, m)
   
                         switch (nxt) {                          switch (nxt) {
                         case IPPROTO_DSTOPTS:                          case IPPROTO_DSTOPTS:
                                 if (!inp->inp_flags & IN6P_DSTOPTS)                                  if (!in6p->in6p_flags & IN6P_DSTOPTS)
                                         break;                                          break;
   
                                 *mp = sbcreatecontrol((caddr_t)ip6e, elen,                                  *mp = sbcreatecontrol((caddr_t)ip6e, elen,
Line 1206  ip6_savecontrol(inp, mp, ip6, m)
Line 1207  ip6_savecontrol(inp, mp, ip6, m)
                                 break;                                  break;
   
                         case IPPROTO_ROUTING:                          case IPPROTO_ROUTING:
                                 if (!inp->inp_flags & IN6P_RTHDR)                                  if (!in6p->in6p_flags & IN6P_RTHDR)
                                         break;                                          break;
   
                                 *mp = sbcreatecontrol((caddr_t)ip6e, elen,                                  *mp = sbcreatecontrol((caddr_t)ip6e, elen,

Legend:
Removed from v.1.82.2.3  
changed lines
  Added in v.1.82.4.2

CVSweb <webmaster@jp.NetBSD.org>