Limiting the length of the source and dest paramters helps to avoid
problems with iptables-restore which would not apply a rule if a
parameter is larger than the parameter buffer (1024)[0]. As the API is
already limiting this, we should also reflect that in the GUI and give
people a hint that IP sets are most likely the better approach.
[0] http://git.netfilter.org/iptables/tree/iptables/xshared.c?h=v1.8.7#n469
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
base_url: me.list_refs_url,
value: '',
fieldLabel: gettext('Source'),
-
+ maxLength: 512,
+ maxLengthText: gettext('Too long, consider using IP sets.'),
},
{
xtype: 'pveIPRefSelector',
base_url: me.list_refs_url,
value: '',
fieldLabel: gettext('Destination'),
+ maxLength: 512,
+ maxLengthText: gettext('Too long, consider using IP sets.'),
},
);