diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-04 21:43:17 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-04 21:43:17 +0000 |
commit | 294ba6e1f796fb9da4701923ee467469f6324633 (patch) | |
tree | b3f4ddad2fd73ae44b7f292216c707cfff008521 /sys/net/pf.c | |
parent | 81dab3d72aec5ca7f1ab6f8fed0d5683a5a5a986 (diff) |
add in(6)_pcblookup_listen() and replace all calls to in_pcblookup()
with either in(6)_pcbhashlookup() or in(6)_pcblookup_listen();
in_pcblookup is now only used by bind(2); speeds up pcb lookup for
listening sockets; from Claudio Jeker
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index aebb95980c0..12954464cf9 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.398 2003/11/03 07:50:00 cedric Exp $ */ +/* $OpenBSD: pf.c,v 1.399 2003/11/04 21:43:15 markus Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2003,8 +2003,7 @@ pf_socket_lookup(uid_t *uid, gid_t *gid, int direction, sa_family_t af, case AF_INET: inp = in_pcbhashlookup(tb, saddr->v4, sport, daddr->v4, dport); if (inp == NULL) { - inp = in_pcblookup(tb, &saddr->v4, sport, &daddr->v4, - dport, INPLOOKUP_WILDCARD); + inp = in_pcblookup_listen(tb, daddr->v4, dport); if (inp == NULL) return (0); } @@ -2014,8 +2013,7 @@ pf_socket_lookup(uid_t *uid, gid_t *gid, int direction, sa_family_t af, inp = in6_pcbhashlookup(tb, &saddr->v6, sport, &daddr->v6, dport); if (inp == NULL) { - inp = in_pcblookup(tb, &saddr->v6, sport, &daddr->v6, - dport, INPLOOKUP_WILDCARD | INPLOOKUP_IPV6); + inp = in6_pcblookup_listen(tb, &daddr->v6, dport); if (inp == NULL) return (0); } |