[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.178.2.1 and 1.179

version 1.178.2.1, 2017/10/21 19:43:54 version 1.179, 2017/07/06 17:08:57
Line 69  __KERNEL_RCSID(0, "$NetBSD$");
Line 69  __KERNEL_RCSID(0, "$NetBSD$");
 #include "opt_inet.h"  #include "opt_inet.h"
 #include "opt_inet6.h"  #include "opt_inet6.h"
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
 #include "opt_compat_netbsd.h"  
 #include "opt_net_mpsafe.h"  #include "opt_net_mpsafe.h"
 #endif  #endif
   
Line 120  __KERNEL_RCSID(0, "$NetBSD$");
Line 119  __KERNEL_RCSID(0, "$NetBSD$");
 #include <netipsec/key.h>  #include <netipsec/key.h>
 #endif /* IPSEC */  #endif /* IPSEC */
   
 #ifdef COMPAT_50  
 #include <compat/sys/time.h>  
 #include <compat/sys/socket.h>  
 #endif  
   
 #include <netinet6/ip6protosw.h>  #include <netinet6/ip6protosw.h>
   
 #include "faith.h"  #include "faith.h"
Line 796  ip6_input(struct mbuf *m, struct ifnet *
Line 790  ip6_input(struct mbuf *m, struct ifnet *
                             & PR_LASTHDR) != 0) {                              & PR_LASTHDR) != 0) {
                                 int error;                                  int error;
   
                                   SOFTNET_LOCK();
                                 error = ipsec6_input(m);                                  error = ipsec6_input(m);
                                   SOFTNET_UNLOCK();
                                 if (error)                                  if (error)
                                         goto bad;                                          goto bad;
                         }                          }
                 }                  }
 #endif /* IPSEC */  #endif /* IPSEC */
   
                   SOFTNET_LOCK();
                 nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt);                  nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt);
                   SOFTNET_UNLOCK();
         }          }
         return;          return;
   
Line 1081  void
Line 1079  void
 ip6_savecontrol(struct in6pcb *in6p, struct mbuf **mp,  ip6_savecontrol(struct in6pcb *in6p, struct mbuf **mp,
         struct ip6_hdr *ip6, struct mbuf *m)          struct ip6_hdr *ip6, struct mbuf *m)
 {  {
           struct socket *so = in6p->in6p_socket;
 #ifdef RFC2292  #ifdef RFC2292
 #define IS2292(x, y)    ((in6p->in6p_flags & IN6P_RFC2292) ? (x) : (y))  #define IS2292(x, y)    ((in6p->in6p_flags & IN6P_RFC2292) ? (x) : (y))
 #else  #else
 #define IS2292(x, y)    (y)  #define IS2292(x, y)    (y)
 #endif  #endif
   
         if (in6p->in6p_socket->so_options & SO_TIMESTAMP          if (SOOPT_TIMESTAMP(so->so_options))
 #ifdef SO_OTIMESTAMP                  mp = sbsavetimestamp(so->so_options, m, mp);
             || in6p->in6p_socket->so_options & SO_OTIMESTAMP  
 #endif  
         ) {  
                 struct timeval tv;  
   
                 microtime(&tv);  
 #ifdef SO_OTIMESTAMP  
                 if (in6p->in6p_socket->so_options & SO_OTIMESTAMP) {  
                         struct timeval50 tv50;  
                         timeval_to_timeval50(&tv, &tv50);  
                         *mp = sbcreatecontrol((void *) &tv50, sizeof(tv50),  
                             SCM_OTIMESTAMP, SOL_SOCKET);  
                 } else  
 #endif  
                 *mp = sbcreatecontrol((void *) &tv, sizeof(tv),  
                     SCM_TIMESTAMP, SOL_SOCKET);  
                 if (*mp)  
                         mp = &(*mp)->m_next;  
         }  
   
         /* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */          /* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */
         if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION)          if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION)

Legend:
Removed from v.1.178.2.1  
changed lines
  Added in v.1.179

CVSweb <webmaster@jp.NetBSD.org>