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.294 retrieving revision 1.295 diff -u -p -r1.294 -r1.295 --- src/sys/netinet/ip_input.c 2011/04/14 20:32:04 1.294 +++ src/sys/netinet/ip_input.c 2011/05/03 17:44:31 1.295 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.294 2011/04/14 20:32:04 dyoung Exp $ */ +/* $NetBSD: ip_input.c,v 1.295 2011/05/03 17:44:31 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.294 2011/04/14 20:32:04 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.295 2011/05/03 17:44:31 dyoung Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -278,6 +278,8 @@ static struct ip_srcrt { struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)]; } ip_srcrt; +static int ip_drainwanted; + static void save_rte(u_char *, struct in_addr); #ifdef MBUFTRACE @@ -1282,6 +1284,21 @@ const int inetctlerrmap[PRC_NCMDS] = { [PRC_PARAMPROB] = ENOPROTOOPT, }; +void +ip_fasttimo(void) +{ + if (ip_drainwanted) { + ip_drain(); + ip_drainwanted = 0; + } +} + +void +ip_drainstub(void) +{ + ip_drainwanted = 1; +} + /* * Forward a packet. If some error occurs return the sender * an icmp packet. Note we can't always generate a meaningful