[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.25 and 1.28

version 1.25, 2000/07/06 12:36:19 version 1.28, 2000/10/23 03:45:25
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
 /*      $KAME: ip6_input.c,v 1.95 2000/07/02 07:49:37 jinmei Exp $      */  /*      $KAME: ip6_input.c,v 1.121 2000/08/31 06:07:29 itojun Exp $     */
   
 /*  /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.   * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Line 503  ip6_input(m)
Line 503  ip6_input(m)
                 } else {                  } else {
                         /* address is not ready, so discard the packet. */                          /* address is not ready, so discard the packet. */
                         log(LOG_INFO,                          log(LOG_INFO,
                             "ip6_input: packet to an unready address %s->%s",                              "ip6_input: packet to an unready address %s->%s\n",
                             ip6_sprintf(&ip6->ip6_src),                              ip6_sprintf(&ip6->ip6_src),
                             ip6_sprintf(&ip6->ip6_dst));                              ip6_sprintf(&ip6->ip6_dst));
   
Line 688  ip6_input(m)
Line 688  ip6_input(m)
          * Tell launch routine the next header           * Tell launch routine the next header
          */           */
 #ifdef IFA_STATS  #ifdef IFA_STATS
         if (IFA_STATS && deliverifp != NULL) {          if (deliverifp != 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)
Line 828  ip6_process_hopopts(m, opthead, hbhlen, 
Line 828  ip6_process_hopopts(m, opthead, hbhlen, 
                         if (*(opt + 1) != IP6OPT_JUMBO_LEN - 2)                          if (*(opt + 1) != IP6OPT_JUMBO_LEN - 2)
                                  /* XXX: should we discard the packet? */                                   /* XXX: should we discard the packet? */
                                 log(LOG_ERR, "length of jumbopayload opt "                                  log(LOG_ERR, "length of jumbopayload opt "
                                     "is inconsistent(%d)",                                      "is inconsistent(%d)\n",
                                     *(opt + 1));                                      *(opt + 1));
                         optlen = IP6OPT_JUMBO_LEN;                          optlen = IP6OPT_JUMBO_LEN;
   
Line 1365  ip6_sysctl(name, namelen, oldp, oldlenp,
Line 1365  ip6_sysctl(name, namelen, oldp, oldlenp,
         void *newp;          void *newp;
         size_t newlen;          size_t newlen;
 {  {
           int old, error;
   
         /* All sysctl names at this level are terminal. */          /* All sysctl names at this level are terminal. */
         if (namelen != 1)          if (namelen != 1)
                 return ENOTDIR;                  return ENOTDIR;
Line 1416  ip6_sysctl(name, namelen, oldp, oldlenp,
Line 1418  ip6_sysctl(name, namelen, oldp, oldlenp,
                 return sysctl_int(oldp, oldlenp, newp, newlen,                  return sysctl_int(oldp, oldlenp, newp, newlen,
                                 &ip6_bindv6only);                                  &ip6_bindv6only);
 #endif  #endif
           case IPV6CTL_ANONPORTMIN:
                   old = ip6_anonportmin;
                   error = sysctl_int(oldp, oldlenp, newp, newlen,
                       &ip6_anonportmin);
                   if (ip6_anonportmin >= ip6_anonportmax || ip6_anonportmin < 0 ||
                       ip6_anonportmin > 65535
   #ifndef IPNOPRIVPORTS
                       || ip6_anonportmin < IPV6PORT_RESERVED
   #endif
                       ) {
                           ip6_anonportmin = old;
                           return (EINVAL);
                   }
                   return (error);
           case IPV6CTL_ANONPORTMAX:
                   old = ip6_anonportmax;
                   error = sysctl_int(oldp, oldlenp, newp, newlen,
                       &ip6_anonportmax);
                   if (ip6_anonportmin >= ip6_anonportmax || ip6_anonportmax < 0 ||
                       ip6_anonportmax > 65535
   #ifndef IPNOPRIVPORTS
                       || ip6_anonportmax < IPV6PORT_RESERVED
   #endif
                       ) {
                           ip6_anonportmax = old;
                           return (EINVAL);
                   }
                   return (error);
   #ifndef IPNOPRIVPORTS
           case IPV6CTL_LOWPORTMIN:
                   old = ip6_lowportmin;
                   error = sysctl_int(oldp, oldlenp, newp, newlen,
                       &ip6_lowportmin);
                   if (ip6_lowportmin >= ip6_lowportmax ||
                       ip6_lowportmin > IPV6PORT_RESERVEDMAX ||
                       ip6_lowportmin < IPV6PORT_RESERVEDMIN) {
                           ip6_lowportmin = old;
                           return (EINVAL);
                   }
                   return (error);
           case IPV6CTL_LOWPORTMAX:
                   old = ip6_lowportmax;
                   error = sysctl_int(oldp, oldlenp, newp, newlen,
                       &ip6_lowportmax);
                   if (ip6_lowportmin >= ip6_lowportmax ||
                       ip6_lowportmax > IPV6PORT_RESERVEDMAX ||
                       ip6_lowportmax < IPV6PORT_RESERVEDMIN) {
                           ip6_lowportmax = old;
                           return (EINVAL);
                   }
                   return (error);
   #endif
         default:          default:
                 return EOPNOTSUPP;                  return EOPNOTSUPP;
         }          }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.28

CVSweb <webmaster@jp.NetBSD.org>