diff options
author | ru <ru@FreeBSD.org> | 2000-10-03 12:18:11 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-10-03 12:18:11 +0000 |
commit | 6922fb3fac2572ba001a739d9a4ae7d549e370d6 (patch) | |
tree | 05289db947a6d7138710e819bccf0a22bd065de7 /sys | |
parent | 9d7b8375a5cac73e09a88d8852c67dcb3eb70546 (diff) | |
download | FreeBSD-src-6922fb3fac2572ba001a739d9a4ae7d549e370d6.zip FreeBSD-src-6922fb3fac2572ba001a739d9a4ae7d549e370d6.tar.gz |
Added the missing ntohs() conversion when matching IP packet with
the IP_FW_IF_IPID rule. (We have recently decided to keep the
ip_id field in network byte order inside the kernel, see revision
1.140 of src/sys/netinet/ip_input.c).
I did not like to have the conversion happen in userland, and I
think that the similar conversions for fw_tcp(seq|ack|win) should
be moved out of userland (src/sbin/ipfw/ipfw.c) into the kernel.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_fw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index a1e9eb9..57bc845 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -1141,7 +1141,7 @@ again: continue; if (f->fw_ipflg & IP_FW_IF_IPLEN && f->fw_iplen != ip->ip_len) continue; - if (f->fw_ipflg & IP_FW_IF_IPID && f->fw_ipid != ip->ip_id) + if (f->fw_ipflg & IP_FW_IF_IPID && f->fw_ipid != ntohs(ip->ip_id)) continue; if (f->fw_ipflg & IP_FW_IF_IPTOS && !iptos_match(ip, f)) continue; |