diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-09-29 06:16:02 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-09-29 06:16:02 +0000 |
commit | fc9b0a15300853effa2d9791e8bc06db62f83d19 (patch) | |
tree | 53cc55309ab166cf90460f78e526f61d7b1d0915 /sys | |
parent | ac4485e0d9c9874642c25626aa2b556935139b18 (diff) | |
download | FreeBSD-src-fc9b0a15300853effa2d9791e8bc06db62f83d19.zip FreeBSD-src-fc9b0a15300853effa2d9791e8bc06db62f83d19.tar.gz |
Make the INADDR_TO_IFP macro use the IP address hash lookup instead of
walking the entire list of IP addresses.
Pointed out by: bfumerola
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/in_var.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 968eb2d..74e1a3f 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -112,7 +112,7 @@ extern u_long in_ifaddrhmask; /* mask for hash table */ { \ struct in_ifaddr *ia; \ \ - TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) \ + LIST_FOREACH(ia, INADDR_HASH((addr).s_addr), ia_hash) \ if (IA_SIN(ia)->sin_addr.s_addr == (addr).s_addr) \ break; \ (ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \ |