[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.73.2.1.2.1 and 1.75

version 1.73.2.1.2.1, 2006/05/24 02:37:11 version 1.75, 2004/06/01 03:13:22
Line 997  ip6_savecontrol(in6p, mp, ip6, m)
Line 997  ip6_savecontrol(in6p, mp, ip6, m)
         struct ip6_hdr *ip6;          struct ip6_hdr *ip6;
         struct mbuf *m;          struct mbuf *m;
 {  {
         struct proc *p = curproc;       /* XXX */  
         int privileged;  
   
         privileged = 0;  
         if (p && !suser(p->p_ucred, &p->p_acflag))  
                 privileged++;  
   
 #ifdef SO_TIMESTAMP  #ifdef SO_TIMESTAMP
         if (in6p->in6p_socket->so_options & SO_TIMESTAMP) {          if (in6p->in6p_socket->so_options & SO_TIMESTAMP) {
Line 1015  ip6_savecontrol(in6p, mp, ip6, m)
Line 1009  ip6_savecontrol(in6p, mp, ip6, m)
                         mp = &(*mp)->m_next;                          mp = &(*mp)->m_next;
         }          }
 #endif  #endif
   
         /* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */  
         if ((ip6->ip6_vfc & IPV6_VERSION_MASK) !=3D IPV6_VERSION)  
                 return;  
   
         if (in6p->in6p_flags & IN6P_RECVDSTADDR) {          if (in6p->in6p_flags & IN6P_RECVDSTADDR) {
                 *mp = sbcreatecontrol((caddr_t) &ip6->ip6_dst,                  *mp = sbcreatecontrol((caddr_t) &ip6->ip6_dst,
                     sizeof(struct in6_addr), IPV6_RECVDSTADDR, IPPROTO_IPV6);                      sizeof(struct in6_addr), IPV6_RECVDSTADDR, IPPROTO_IPV6);
Line 1060  ip6_savecontrol(in6p, mp, ip6, m)
Line 1049  ip6_savecontrol(in6p, mp, ip6, m)
         /* IN6P_NEXTHOP - for outgoing packet only */          /* IN6P_NEXTHOP - for outgoing packet only */
   
         /*          /*
          * IPV6_HOPOPTS socket option. We require super-user privilege           * IPV6_HOPOPTS socket option.  Recall that we required super-user
          * for the option, but it might be too strict, since there might           * privilege for the option (see ip6_ctloutput), but it might be too
          * be some hop-by-hop options which can be returned to normal user.           * strict, since there might be some hop-by-hop options which can be
          * See RFC 2292 section 6.           * returned to normal user.
            * See also RFC 2292 section 6.
          */           */
         if ((in6p->in6p_flags & IN6P_HOPOPTS) != 0 && privileged) {          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 1160  ip6_savecontrol(in6p, mp, ip6, m)
Line 1150  ip6_savecontrol(in6p, mp, ip6, m)
                                 if (!in6p->in6p_flags & IN6P_DSTOPTS)                                  if (!in6p->in6p_flags & IN6P_DSTOPTS)
                                         break;                                          break;
   
                                 /*  
                                  * We also require super-user privilege for  
                                  * the option.  
                                  * See the comments on IN6_HOPOPTS.  
                                  */  
                                 if (!privileged)  
                                         break;  
   
                                 *mp = sbcreatecontrol((caddr_t)ip6e, elen,                                  *mp = sbcreatecontrol((caddr_t)ip6e, elen,
                                     IPV6_DSTOPTS, IPPROTO_IPV6);                                      IPV6_DSTOPTS, IPPROTO_IPV6);
                                 if (*mp)                                  if (*mp)

Legend:
Removed from v.1.73.2.1.2.1  
changed lines
  Added in v.1.75

CVSweb <webmaster@jp.NetBSD.org>