[BACK]Return to sctputil.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/sctputil.c between version 1.1.2.4 and 1.1.2.5

version 1.1.2.4, 2016/04/22 15:44:18 version 1.1.2.5, 2016/05/29 08:44:38
Line 87  __KERNEL_RCSID(0, "$NetBSD$");
Line 87  __KERNEL_RCSID(0, "$NetBSD$");
 #include <netinet/sctp_pcb.h>  #include <netinet/sctp_pcb.h>
   
 #ifdef IPSEC  #ifdef IPSEC
 #include <netinet6/ipsec.h>  #include <netipsec/ipsec.h>
 #include <netkey/key.h>  #include <netipsec/key.h>
 #endif /* IPSEC */  #endif /* IPSEC */
   
 #include <netinet/sctputil.h>  #include <netinet/sctputil.h>
Line 2959  sctp_is_there_an_abort_here(struct mbuf 
Line 2959  sctp_is_there_an_abort_here(struct mbuf 
  * so, create this function to compare link local scopes   * so, create this function to compare link local scopes
  */   */
 uint32_t  uint32_t
 sctp_is_same_scope(struct sockaddr_in6 *addr1, struct sockaddr_in6 *addr2)  sctp_is_same_scope(const struct sockaddr_in6 *addr1, const struct sockaddr_in6 *addr2)
 {  {
         struct sockaddr_in6 a, b;          struct sockaddr_in6 a, b;
   
Line 3607  sctp_find_ifa_by_addr(struct sockaddr *s
Line 3607  sctp_find_ifa_by_addr(struct sockaddr *s
 {  {
         struct ifnet *ifn;          struct ifnet *ifn;
         struct ifaddr *ifa;          struct ifaddr *ifa;
           int s;
   
         /* go through all our known interfaces */          /* go through all our known interfaces */
         IFNET_FOREACH(ifn) {          s = pserialize_read_enter();
           IFNET_READER_FOREACH(ifn) {
                 /* go through each interface addresses */                  /* go through each interface addresses */
                 IFADDR_FOREACH(ifa, ifn) {                  IFADDR_FOREACH(ifa, ifn) {
                         /* correct family? */                          /* correct family? */
Line 3632  sctp_find_ifa_by_addr(struct sockaddr *s
Line 3634  sctp_find_ifa_by_addr(struct sockaddr *s
                                 if (memcmp(&sin1->sin6_addr, &sin2->sin6_addr,                                  if (memcmp(&sin1->sin6_addr, &sin2->sin6_addr,
                                            sizeof(struct in6_addr)) == 0) {                                             sizeof(struct in6_addr)) == 0) {
                                         /* found it */                                          /* found it */
                                           pserialize_read_exit(s);
                                         return (ifa);                                          return (ifa);
                                 }                                  }
                         } else                          } else
Line 3644  sctp_find_ifa_by_addr(struct sockaddr *s
Line 3647  sctp_find_ifa_by_addr(struct sockaddr *s
                                 if (sin1->sin_addr.s_addr ==                                  if (sin1->sin_addr.s_addr ==
                                     sin2->sin_addr.s_addr) {                                      sin2->sin_addr.s_addr) {
                                         /* found it */                                          /* found it */
                                           pserialize_read_exit(s);
                                         return (ifa);                                          return (ifa);
                                 }                                  }
                         }                          }
                         /* else, not AF_INET or AF_INET6, so skip */                          /* else, not AF_INET or AF_INET6, so skip */
                 } /* end foreach ifa */                  } /* end foreach ifa */
         } /* end foreach ifn */          } /* end foreach ifn */
           pserialize_read_exit(s);
   
         /* not found! */          /* not found! */
         return (NULL);          return (NULL);
 }  }

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

CVSweb <webmaster@jp.NetBSD.org>