diff options
author | luigi <luigi@FreeBSD.org> | 2002-02-20 17:15:57 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-02-20 17:15:57 +0000 |
commit | 565d5dddb5025450267dadaad5c7494cfcc63843 (patch) | |
tree | f3d80122d1f58447310846c1120a43dcfe97d8df /sys | |
parent | 15a3a8ab24f8a76f5293cd91ac933fdcef2c61b3 (diff) | |
download | FreeBSD-src-565d5dddb5025450267dadaad5c7494cfcc63843.zip FreeBSD-src-565d5dddb5025450267dadaad5c7494cfcc63843.tar.gz |
BUGFIX: make use of the pointer to the target of skipto rules,
so that after the first time we can follow the pointer instead
of having to scan the list.
This was the intended behaviour from day one.
PR: 34639
MFC-after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_fw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 5c6e155..01908d7 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -1512,11 +1512,13 @@ got_match: 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 */ |