diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-03-18 10:18:50 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-03-18 10:18:50 +0100 |
commit | 755405c1c775fa830b0880b4639bf4368d663832 (patch) | |
tree | 6e271298a40fe84cf8a45bb2b4737561013698cf /etc/inc | |
parent | 32d4db2e128bb736a2c3f1181b176bf4bfa1411b (diff) | |
download | pfsense-755405c1c775fa830b0880b4639bf4368d663832.zip pfsense-755405c1c775fa830b0880b4639bf4368d663832.tar.gz |
fix filter rules for requested ipv6 icmp types
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 77e27b4..6c56bc8 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1839,16 +1839,16 @@ function filter_generate_user_rule($rule) { $aline['reply'] = "reply-to ( {$ifcfg['if']} {$rg} ) "; } else { if($rule['interface'] <> "pptp") { - log_error("Could not find gateway for interface({$rule['interface']})."); + log_error("Could not find IPv6 gateway for interface({$rule['interface']})."); } } } else { $rg = get_interface_gateway($rule['interface']); - if(is_ipaddr($rg)) { + if(is_ipaddrv4($rg)) { $aline['reply'] = "reply-to ( {$ifcfg['if']} {$rg} ) "; } else { if($rule['interface'] <> "pptp") { - log_error("Could not find gateway for interface({$rule['interface']})."); + log_error("Could not find IPv4 gateway for interface({$rule['interface']})."); } } } @@ -1904,10 +1904,10 @@ function filter_generate_user_rule($rule) { $l7_structures = $l7rule->get_unique_structures(); $aline['divert'] = "divert " . $l7rule->GetRPort() . " "; } - if(($rule['protocol'] == "icmp") && $rule['icmptype']) + if(($rule['protocol'] == "icmp") && $rule['icmptype'] && ($rule['ipprotocol'] == "inet")) $aline['icmp-type'] = "icmp-type {$rule['icmptype']} "; - if(($rule['protocol'] == "icmp6") && $rule['icmptype']) - $aline['icmp6-type'] = "icmp-type {$rule['icmptype']} "; + if(($rule['protocol'] == "icmp") && $rule['icmptype'] && ($rule['ipprotocol'] == "inet6")) + $aline['icmp6-type'] = "icmp6-type {$rule['icmptype']} "; if(!empty($rule['tag'])) $aline['tag'] = " tag " .$rule['tag']. " "; if(!empty($rule['tagged'])) |