Hi ,

I have two OPT interfaces:
OPT1: 10.0.1.2/24, gateway: 10.0.1.1
OPT2: 10.0.2.2/24, gateway: 10.0.2.1

If I configure new OPT3 interface with IP 10.0.3.2/24, gateway 10.0.3.1, pfSense
1.0.1 throws the following error when I click the "Save" button.  The gateway
for OPT3 is not getting set.

---
The following input errors were detected:

   * Cannot change 10.0.2.1 gateway. It is currently referenced by
the filter rules via policy based routing.
---

Please note that I have never directly used the 10.0.2.1 gateway directly in
any of my filter rules.  I have defined only one single pass all
filter rule that
uses OPT1 and OPT2 (slbd load balanced gateways), and have never explicitly
used policy based routing to specify 10.0.2.1 as my gateway.

Digging through interfaces_opt.php show that the "if" condition in line 101
does not check for empty ("") gateways:

Changing:
   101: if($rule['gateway'] == $pconfig['gateway']) {
to
   101: if($pconfig['gateway'] != "" and $rule['gateway'] ==
$pconfig['gateway']) {

fixes my problem.

The same bug also exists in interfaces_wan.php.

Regards
Mahabub Basha

Reply via email to