diff options
author | smos <seth.mos@dds.nl> | 2011-08-16 19:06:24 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2011-08-16 19:06:50 +0200 |
commit | 2a319b4facc71c55e3b3943013300d9d5deacc79 (patch) | |
tree | fa070658f6b29eb0b4a769999b4bbea731e9405e | |
parent | 0e12792dab9d9fb080e9d9222e0a3d2af48bef09 (diff) | |
download | pfsense-2a319b4facc71c55e3b3943013300d9d5deacc79.zip pfsense-2a319b4facc71c55e3b3943013300d9d5deacc79.tar.gz |
Fix the filter rules to trigger for the right address family
-rw-r--r-- | etc/inc/filter.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 930e0bd..3809a2f 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2578,12 +2578,13 @@ EOD; $friendly = $GatewaysList[$route['gateway']]['friendlyiface']; if(is_array($FilterIflist[$friendly])) { $oc = $FilterIflist[$friendly]; + $routeent = explode("/", $route['network']); if($oc['ip']) { $sa = $oc['sa']; $sn = $oc['sn']; $if = $oc['if']; } - if($sa) { + if($sa && is_ipaddrv4($routeent[0])) { $ipfrules .= <<<EOD pass quick on \${$oc['descr']} proto tcp from {$sa}/{$sn} to {$route['network']} flags any keep state(sloppy) label "pass traffic between statically routed subnets" pass quick on \${$oc['descr']} from {$sa}/{$sn} to {$route['network']} keep state(sloppy) label "pass traffic between statically routed subnets" @@ -2597,7 +2598,7 @@ EOD; $sn = $oc['snv6']; $if = $oc['if']; } - if($sa) { + if($sa && is_ipaddrv6($routeent[0])) { $ipfrules .= <<<EOD pass quick on \${$oc['descr']} inet6 proto tcp from {$sa}/{$sn} to {$route['network']} flags any keep state(sloppy) label "pass traffic between statically routed subnets" pass quick on \${$oc['descr']} inet6 from {$sa}/{$sn} to {$route['network']} keep state(sloppy) label "pass traffic between statically routed subnets" |