aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-01-09 03:10:30 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-01-09 03:10:30 +0000
commit65450f2f77f82c5083ecd137a9c02767423cdf13 (patch)
tree64facfa9c9b18745ab9b25598b0ff4a09c5b70cd /sbin/ipfw
parent3fc3cadde6a0b1b77bbc03a69abbffe4c6d8d339 (diff)
downloadsrc-65450f2f77f82c5083ecd137a9c02767423cdf13.tar.gz
src-65450f2f77f82c5083ecd137a9c02767423cdf13.zip
o IPFW incorrectly handled filtering in the presence of previously
reserved and now allocated TCP flags in incoming packets. This patch stops overloading those bits in the IP firewall rules, and moves colliding flags to a seperate field, ipflg. The IPFW userland management tool, ipfw(8), is updated to reflect this change. New TCP flags related to ECN are now included in tcp.h for reference, although we don't currently implement TCP+ECN. o To use this fix without completely rebuilding, it is sufficient to copy ip_fw.h and tcp.h into your appropriate include directory, then rebuild the ipfw kernel module, and ipfw tool, and install both. Note that a mismatch between module and userland tool will result in incorrect installation of firewall rules that may have unexpected effects. This is an MFC candidate, following shakedown. This bug does not appear to affect ipfilter. Reviewed by: security-officer, billf Reported by: Aragon Gouveia <aragon@phat.za.net>
Notes
Notes: svn path=/head/; revision=70826
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index d24280a3c3e1..d8f49340b125 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -453,7 +453,7 @@ show_ipfw(struct ip_fw *chain, int pcwidth, int bcwidth)
if (chain->fw_ipflg & IP_FW_IF_IPVER)
printf(" ipversion %u", chain->fw_ipver);
- if (chain->fw_tcpf & IP_FW_TCPF_ESTAB)
+ if (chain->fw_ipflg & IP_FW_IF_TCPEST)
printf(" established");
else if (chain->fw_tcpf == IP_FW_TCPF_SYN &&
chain->fw_tcpnf == IP_FW_TCPF_ACK)
@@ -2025,8 +2025,7 @@ badviacombo:
}
if (rule.fw_prot == IPPROTO_TCP) {
if (!strncmp(*av,"established",strlen(*av))) {
- rule.fw_tcpf |= IP_FW_TCPF_ESTAB;
- rule.fw_ipflg |= IP_FW_IF_TCPFLG;
+ rule.fw_ipflg |= IP_FW_IF_TCPEST;
av++; ac--; continue;
}
if (!strncmp(*av,"setup",strlen(*av))) {