Enhancement #3242
Warning uninitialized value $fw_obj
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-firewall-base | |||
Target version: | v6.6 | |||
Resolution: | NEEDINFO: | No |
Description
After adding an alias ip on a red interface the following warning is reported:
WARNING in /etc/e-smith/templates//etc/shorewall/masq/20nat: Use of uninitialized value $fw_obj in string ne at /etc/e-smith/templates//etc/shorewall/masq/20nat line 40.
WARNING: Template processing succeeded for //etc/shorewall/masq: 1 fragment generated warnings
at /sbin/e-smith/expand-template line 45
Associated revisions
Alias on red interfaces: avoid warning. Refs #3242
History
#1 Updated by Filippo Carletti almost 6 years ago
# db networks show eth1:0 eth1:0=alias ipaddr=10.10.10.10 netmask=255.255.255.255 role=alias
Workaround: set a 1:1 nat and remove it, the FwObjectNat will be present and avoid the warning:
# db networks show eth1:0 eth1:0=alias FwObjectNat= ipaddr=10.10.10.10 netmask=255.255.255.255 role=alias
#2 Updated by Filippo Carletti almost 6 years ago
- Status changed from NEW to TRIAGED
- % Done changed from 0 to 20
To silence the warning:
- my $fw_obj = $i->prop('FwObjectNat');
+ my $fw_obj = $i->prop('FwObjectNat') || '';
But maybe it's better to adjust the db.
#3 Updated by Giacomo Sanchietti almost 6 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Giacomo Sanchietti
- % Done changed from 20 to 30
Just go with the fix on template fragment.
#4 Updated by Giacomo Sanchietti almost 6 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
#5 Updated by Giacomo Sanchietti almost 6 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 60 to 70
- nethserver-firewall-base-2.7.1-1.1.g6cda364.ns6.noarch.rpm
- Install the new package
- Create an alias on a red interface
- Expand the masq template:
expand-template /etc/shorewall/masq
- Check no warning is raised
#6 Updated by Davide Principi almost 6 years ago
- Assignee set to Davide Principi
#7 Updated by Davide Principi almost 6 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 70 to 90
VERIFIED
#8 Updated by Giacomo Sanchietti almost 6 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
- nethserver-firewall-base-2.7.2-1.ns6.noarch.rpm