Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v retrieving revision 1.183 retrieving revision 1.184 diff -u -p -r1.183 -r1.184 --- src/sys/netinet/ip_input.c 2003/11/17 22:34:16 1.183 +++ src/sys/netinet/ip_input.c 2003/11/19 18:39:34 1.184 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.183 2003/11/17 22:34:16 jonathan Exp $ */ +/* $NetBSD: ip_input.c,v 1.184 2003/11/19 18:39:34 jonathan Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,8 +98,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.183 2003/11/17 22:34:16 jonathan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.184 2003/11/19 18:39:34 jonathan Exp $"); +#include "opt_inet.h" #include "opt_gateway.h" #include "opt_pfil_hooks.h" #include "opt_ipsec.h" @@ -197,6 +198,11 @@ int ip_mtudisc_timeout = IPMTUDISCTIMEOU #ifdef DIAGNOSTIC int ipprintfs = 0; #endif + +#ifdef RANDOM_IP_ID +int ip_do_randomid = 0; +#endif + /* * XXX - Setting ip_checkinterface mostly implements the receive side of * the Strong ES model described in RFC 1122, but since the routing table @@ -2066,6 +2072,14 @@ ip_sysctl(name, namelen, oldp, oldlenp, return (sysctl_ifq(name + 1, namelen - 1, oldp, oldlenp, newp, newlen, &ipintrq)); + case IPCTL_RANDOMID: +#ifdef RANDOM_IP_ID + return (sysctl_int(oldp, oldlenp, newp, newlen, + &ip_do_randomid)); +#else + return (sysctl_rdint(oldp, oldlenp, newp, newlen, 0)); +#endif + default: return (EOPNOTSUPP); }