diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-08-17 10:51:47 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-08-17 10:57:20 -0700 |
commit | 10e9b2ee1035ba4ff75896db58caa83a2de61ee7 (patch) | |
tree | 79c70c65a86c8fd1293844d64cb57ef72dc1433c /templates/firewall | |
parent | 013f44048b37cf5b3deb1ba8a97182442232cd4b (diff) | |
download | vyatta-cfg-firewall-10e9b2ee1035ba4ff75896db58caa83a2de61ee7.tar.gz vyatta-cfg-firewall-10e9b2ee1035ba4ff75896db58caa83a2de61ee7.zip |
Fix 5917: FW: Max characters exceeded for ipset rule when using "set firewall
group address-group" command
- handle special case where temp group begins with a '-'.
(cherry picked from commit fa22559d3baa7ae5443f14e0ff774c4d6a49cc36)
Diffstat (limited to 'templates/firewall')
-rw-r--r-- | templates/firewall/group/address-group/node.tag/address/node.def | 3 | ||||
-rw-r--r-- | templates/firewall/group/port-group/node.tag/port/node.def | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/templates/firewall/group/address-group/node.tag/address/node.def b/templates/firewall/group/address-group/node.tag/address/node.def index 389a057..b0bd955 100644 --- a/templates/firewall/group/address-group/node.tag/address/node.def +++ b/templates/firewall/group/address-group/node.tag/address/node.def @@ -14,6 +14,9 @@ create: tmpgrp=$VAR(../@)-$PPID len=${#tmpgrp} if [ "$len" -gt 31 ]; then tmpgrp=${tmpgrp: -31}; + if [[ "$tmpgrp" =~ ^- ]]; then + tmpgrp=${tmpgrp/-/Z}; + fi fi tmpfile="/tmp/$tmpgrp"; diff --git a/templates/firewall/group/port-group/node.tag/port/node.def b/templates/firewall/group/port-group/node.tag/port/node.def index de73950..f0ab759 100644 --- a/templates/firewall/group/port-group/node.tag/port/node.def +++ b/templates/firewall/group/port-group/node.tag/port/node.def @@ -16,6 +16,9 @@ create: tmpgrp=$VAR(../@)-$PPID len=${#tmpgrp} if [ "$len" -gt 31 ]; then tmpgrp=${tmpgrp: -31}; + if [[ "$tmpgrp" =~ ^- ]]; then + tmpgrp=${tmpgrp/-/Z}; + fi fi tmpfile="/tmp/$tmpgrp"; |