[BACK]Return to ip_input.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/ip_input.c between version 1.130.2.16 and 1.156

version 1.130.2.16, 2002/12/11 06:46:37 version 1.156, 2002/09/11 02:41:19
Line 257  do {         \
Line 257  do {         \
                 printf("%s:%d: ipq already locked\n", __FILE__, __LINE__); \                  printf("%s:%d: ipq already locked\n", __FILE__, __LINE__); \
                 panic("ipq_lock");                                      \                  panic("ipq_lock");                                      \
         }                                                               \          }                                                               \
 } while (/*CONSTCOND*/ 0)  } while (0)
 #define IPQ_LOCK_CHECK()                                                \  #define IPQ_LOCK_CHECK()                                                \
 do {                                                                    \  do {                                                                    \
         if (ipq_locked == 0) {                                          \          if (ipq_locked == 0) {                                          \
                 printf("%s:%d: ipq lock not held\n", __FILE__, __LINE__); \                  printf("%s:%d: ipq lock not held\n", __FILE__, __LINE__); \
                 panic("ipq lock check");                                \                  panic("ipq lock check");                                \
         }                                                               \          }                                                               \
 } while (/*CONSTCOND*/ 0)  } while (0)
 #else  #else
 #define IPQ_LOCK()              (void) ipq_lock_try()  #define IPQ_LOCK()              (void) ipq_lock_try()
 #define IPQ_LOCK_CHECK()        /* nothing */  #define IPQ_LOCK_CHECK()        /* nothing */
Line 338  ip_init()
Line 338  ip_init()
         TAILQ_INIT(&in_ifaddr);          TAILQ_INIT(&in_ifaddr);
         in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR,          in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR,
             M_WAITOK, &in_ifaddrhash);              M_WAITOK, &in_ifaddrhash);
         ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout);          if (ip_mtudisc != 0)
                   ip_mtudisc_timeout_q =
                       rt_timer_queue_create(ip_mtudisc_timeout);
 #ifdef GATEWAY  #ifdef GATEWAY
         ipflow_init();          ipflow_init();
 #endif  #endif
Line 1826  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 1828  ip_sysctl(name, namelen, oldp, oldlenp, 
         case IPCTL_MTUDISC:          case IPCTL_MTUDISC:
                 error = sysctl_int(oldp, oldlenp, newp, newlen,                  error = sysctl_int(oldp, oldlenp, newp, newlen,
                     &ip_mtudisc);                      &ip_mtudisc);
                 if (error == 0 && ip_mtudisc == 0)                  if (ip_mtudisc != 0 && ip_mtudisc_timeout_q == NULL) {
                         rt_timer_queue_remove_all(ip_mtudisc_timeout_q, TRUE);                          ip_mtudisc_timeout_q =
                               rt_timer_queue_create(ip_mtudisc_timeout);
                   } else if (ip_mtudisc == 0 && ip_mtudisc_timeout_q != NULL) {
                           rt_timer_queue_destroy(ip_mtudisc_timeout_q, TRUE);
                           ip_mtudisc_timeout_q = NULL;
                   }
                 return error;                  return error;
         case IPCTL_ANONPORTMIN:          case IPCTL_ANONPORTMIN:
                 old = anonportmin;                  old = anonportmin;
Line 1856  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 1863  ip_sysctl(name, namelen, oldp, oldlenp, 
                 }                  }
                 return (error);                  return (error);
         case IPCTL_MTUDISCTIMEOUT:          case IPCTL_MTUDISCTIMEOUT:
                 old = ip_mtudisc_timeout;  
                 error = sysctl_int(oldp, oldlenp, newp, newlen,                  error = sysctl_int(oldp, oldlenp, newp, newlen,
                    &ip_mtudisc_timeout);                     &ip_mtudisc_timeout);
                 if (ip_mtudisc_timeout < 0) {                  if (ip_mtudisc_timeout < 0)
                         ip_mtudisc_timeout = old;  
                         return (EINVAL);                          return (EINVAL);
                 }                  if (ip_mtudisc_timeout_q != NULL)
                 if (error == 0)  
                         rt_timer_queue_change(ip_mtudisc_timeout_q,                          rt_timer_queue_change(ip_mtudisc_timeout_q,
                                               ip_mtudisc_timeout);                                                ip_mtudisc_timeout);
                 return (error);                  return (error);
Line 1885  ip_sysctl(name, namelen, oldp, oldlenp, 
Line 1889  ip_sysctl(name, namelen, oldp, oldlenp, 
                     &hostzeroisbroadcast));                      &hostzeroisbroadcast));
 #if NGIF > 0  #if NGIF > 0
         case IPCTL_GIF_TTL:          case IPCTL_GIF_TTL:
                 return (sysctl_int(oldp, oldlenp, newp, newlen,                  return(sysctl_int(oldp, oldlenp, newp, newlen,
                                   &ip_gif_ttl));                                    &ip_gif_ttl));
 #endif  #endif
   
 #if NGRE > 0  #if NGRE > 0
         case IPCTL_GRE_TTL:          case IPCTL_GRE_TTL:
                 return (sysctl_int(oldp, oldlenp, newp, newlen,                  return(sysctl_int(oldp, oldlenp, newp, newlen,
                                   &ip_gre_ttl));                                    &ip_gre_ttl));
 #endif  #endif
   

Legend:
Removed from v.1.130.2.16  
changed lines
  Added in v.1.156

CVSweb <webmaster@jp.NetBSD.org>