From 108ee0be919d8f160d3e7a4fc748c997aa343574 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 16 Jun 2007 14:27:02 +0000 Subject: [PATCH] Add TCPMSS Match detection and fix bug in maclist handling git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6560 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/changelog.txt | 4 + Shorewall-common/lib.base | 3 + Shorewall-common/releasenotes.txt | 207 +++++++++++++-------------- Shorewall-common/shorewall.conf | 2 +- Shorewall-perl/Shorewall/Chains.pm | 3 +- Shorewall-perl/Shorewall/Config.pm | 6 +- Shorewall-perl/Shorewall/Rules.pm | 4 +- docs/shorewall_extension_scripts.xml | 102 +++++++++++-- 8 files changed, 204 insertions(+), 127 deletions(-) diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index 0cf3b702a..4b1b4c38d 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -1,3 +1,7 @@ +Changes in 4.0.0 Beta 6 + +1) Validate the DISPOSITION in /etc/shorewall/maclist entries. + Changes in 4.0.0 Beta 5 1) Fix undefined function call when both an input interface and an diff --git a/Shorewall-common/lib.base b/Shorewall-common/lib.base index fc611e9b8..63abfdda6 100644 --- a/Shorewall-common/lib.base +++ b/Shorewall-common/lib.base @@ -998,6 +998,7 @@ determine_capabilities() { MANGLE_FORWARD= COMMENTS= ADDRTYPE= + TCPMSS_MATCH= qt $IPTABLES -N fooX1234 qt $IPTABLES -A fooX1234 -m conntrack --ctorigdst 192.168.1.1 -j ACCEPT && CONNTRACK_MATCH=Yes @@ -1065,6 +1066,7 @@ determine_capabilities() { qt $IPTABLES -A fooX1234 -m pkttype --pkt-type broadcast -j ACCEPT && USEPKTTYPE=Yes qt $IPTABLES -A fooX1234 -m addrtype --src-type BROADCAST -j ACCEPT && ADDRTYPE=Yes + qt $IPTABLES -A fooX1234 -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1000:1500 -j ACCEPT && TCPMSS_MATCH=Yes qt $IPTABLES -F fooX1234 qt $IPTABLES -X fooX1234 @@ -1109,6 +1111,7 @@ report_capabilities() { report_capability "Mangle FORWARD Chain" $MANGLE_FORWARD report_capability "Comments" $COMMENTS report_capability "Address Type Match" $ADDRTYPE + report_capability "TCPMSS Match" $TCPMSS_MATCH fi [ -n "$PKTTYPE" ] || USEPKTTYPE= diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index e3f38ff39..41f1fe190 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -1,4 +1,4 @@ -Shorewall 4.0.0 Beta 5 +Shorewall 4.0.0 Beta 6 ---------------------------------------------------------------------------- R E L E A S E H I G H L I G H T S ---------------------------------------------------------------------------- @@ -15,115 +15,15 @@ Shorewall 4.0.0 Beta 5 You must install Shorewall and at least one of the compiler packages (you may install them both). -Problems corrected in 4.0.0 Beta 5. +Problems corrected in 4.0.0 Beta 6. -1) With Shorewall-perl, if a bridge port was used to qualify the SOURCE - in a rule where there was also a DEST interface, then the following - diagnostic was produced: +1) With Shorewall-perl, an invalid DISPOSITION in an + /etc/shorewall/maclist entry would cause Perl error messages to be + issued. - Undefined subroutine &Shorewall::Chains::source_port_to_bridge called - at /usr/share/shorewall-perl/Shorewall/Chains.pm line 1521, <$currentfile> - line 363. +Other changes in Shorewall 4.0.0 Beta 6 -2) 'shorewall dump', 'shorewall show log' and 'shorewall logwatch' - work again. - -3) The 'mss' zone option and the CLAMPMSS= option in - shorewall.conf could previously *increase* the MSS in a - packet; this possibility has been eliminated. - -Other changes in Shorewall 4.0.0 Beta 5. - -1) The Perl compiler is now externalized. Both the compiler.pl program - and the Perl Module interface are documented. - - The compiler program is /usr/share/shorewall-perl/compiler.pl: - - compiler.pl [