luci-app-firewall: explicitely set 'DNAT' target on new forwards
Fixes: #2920 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
b4129640b4
commit
d25f95c93d
1 changed files with 10 additions and 0 deletions
|
@ -107,6 +107,16 @@ return L.view.extend({
|
|||
return uci.get('firewall', section_id, 'name') || _('Unnamed forward');
|
||||
};
|
||||
|
||||
s.handleAdd = function(ev) {
|
||||
var config_name = this.uciconfig || this.map.config,
|
||||
section_id = uci.add(config_name, this.sectiontype);
|
||||
|
||||
uci.set(config_name, section_id, 'target', 'DNAT');
|
||||
|
||||
this.addedSection = section_id;
|
||||
this.renderMoreOptionsModal(section_id);
|
||||
};
|
||||
|
||||
o = s.taboption('general', form.Value, 'name', _('Name'));
|
||||
o.placeholder = _('Unnamed forward');
|
||||
o.modalonly = true;
|
||||
|
|
Loading…
Reference in a new issue