Date: Wed, 20 Feb 2002 08:30:07 -0800 (PST) From: Luigi Rizzo <rizzo@icir.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/34639: IPFW skipto works too slow Message-ID: <200202201630.g1KGU7D89019@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/34639; it has been noted by GNATS.
From: Luigi Rizzo <rizzo@icir.org>
To: freebsd-gnats-submit@freebsd.org
Cc: wawa@yandex.team.ru, billf@mu.org
Subject: Re: kern/34639: IPFW skipto works too slow
Date: Wed, 20 Feb 2002 08:25:22 -0800
Vladimir is indeed right, the code to cache skipto targets
somehow is not there!
A fix is attached below, I should commit it briefly as
I have a chance to test it.
thanks for the report
luigi
> lcvs diff -u ip_fw.c
Index: ip_fw.c
===================================================================
RCS file: /home/xorpc/u2/freebsd/src/sys/netinet/ip_fw.c,v
retrieving revision 1.180
diff -u -r1.180 ip_fw.c
--- ip_fw.c 10 Feb 2002 22:22:05 -0000 1.180
+++ ip_fw.c 20 Feb 2002 16:05:38 -0000
@@ -1512,11 +1512,13 @@
return(f->fw_divert_port | IP_FW_PORT_TEE_FLAG);
#endif
case IP_FW_F_SKIPTO: /* XXX check */
- f = f->next_rule_ptr ? f->next_rule_ptr :
- lookup_next_rule(f) ;
+ if (f->next_rule_ptr == NULL)
+ f->next_rule_ptr = lookup_next_rule(f) ;
+ f = f->next_rule_ptr;
if (!f)
goto dropit;
goto again ;
+
case IP_FW_F_PIPE:
case IP_FW_F_QUEUE:
*flow_id = f; /* XXX set flow id */
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202201630.g1KGU7D89019>
