summaryrefslogtreecommitdiff
path: root/lib/Vyatta/IpTables/Rule.pm
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-02-05 13:46:33 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2009-02-05 13:46:33 -0800
commit251e142fb8a454a6f2eaab8ebc85ab6e343098e1 (patch)
tree1889d173da1a54f518a775625e4e9093efd30eb1 /lib/Vyatta/IpTables/Rule.pm
parent0c56b3c8ddc8a32a5408c5c1d86ac7b4bd089789 (diff)
downloadvyatta-cfg-firewall-251e142fb8a454a6f2eaab8ebc85ab6e343098e1.tar.gz
vyatta-cfg-firewall-251e142fb8a454a6f2eaab8ebc85ab6e343098e1.zip
display appropriate anywhere address depending on IPv4 or IPv6
protocol should be displayed as all when no protocol set
Diffstat (limited to 'lib/Vyatta/IpTables/Rule.pm')
-rw-r--r--lib/Vyatta/IpTables/Rule.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Vyatta/IpTables/Rule.pm b/lib/Vyatta/IpTables/Rule.pm
index 78b97e7..7575061 100644
--- a/lib/Vyatta/IpTables/Rule.pm
+++ b/lib/Vyatta/IpTables/Rule.pm
@@ -529,6 +529,9 @@ sub outputXmlElem {
sub outputXml {
my ($self, $fh) = @_;
+ if (!defined($self->{_protocol})) {
+ $self->{_protocol} = "all";
+ }
outputXmlElem("protocol", $self->{_protocol}, $fh);
my $state_str = get_state_str($self);
if ($state_str ne "") {