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 rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.65 retrieving revision 1.67 diff -u -p -r1.65 -r1.67 --- src/sys/netinet/ip_input.c 1998/05/04 19:24:53 1.65 +++ src/sys/netinet/ip_input.c 1998/06/01 00:39:37 1.67 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.65 1998/05/04 19:24:53 matt Exp $ */ +/* $NetBSD: ip_input.c,v 1.67 1998/06/01 00:39:37 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -891,7 +891,7 @@ ip_dooptions(m) break; case IPOPT_TS_TSANDADDR: - if (ipt->ipt_ptr + sizeof(n_time) + + if (ipt->ipt_ptr - 1 + sizeof(n_time) + sizeof(struct in_addr) > ipt->ipt_len) goto bad; ipaddr.sin_addr = dst; @@ -905,7 +905,7 @@ ip_dooptions(m) break; case IPOPT_TS_PRESPEC: - if (ipt->ipt_ptr + sizeof(n_time) + + if (ipt->ipt_ptr - 1 + sizeof(n_time) + sizeof(struct in_addr) > ipt->ipt_len) goto bad; bcopy((caddr_t)sin, (caddr_t)&ipaddr.sin_addr, @@ -1400,10 +1400,16 @@ ip_sysctl(name, namelen, oldp, oldlenp, return (error); #ifdef GATEWAY case IPCTL_MAXFLOWS: + { + int s; + error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_maxflows); + s = splsoftnet(); ipflow_reap(0); + splx(s); return (error); + } #endif default: return (EOPNOTSUPP);