Closed Shad0wGeneral closed 6 years ago
Hi @Shad0wGeneral, I'm away from home for the next week but will look into this when I am back at home. Thanks.
Ok, I've had a quick look at it and I can reproduce it. There was a similar issue previously, so I will see if that provides any insight.
Exploring whether this has any links to bug #36 , commits 7008037737d5fd483d1ccb51d6e72cea54d364f5 and fde8b92114dce02654c9cd08728190121793ef60
Some background info:
stdAction(this.form,'newfile')
triggers the call to rule_in. stdAction
sets the field todo
to have the desired value (in this case 'newfile'), tidies up the data and then does the actual submit.radioTable(this.form,this.form.in_sel,'edit')
triggers the action.radioTable
is in the orginal netgear code, file lnux.js:
function radioTable(fObj,radioObj,act_str)
{
if (radioSelectedIndex(radioObj) > -1)
stdAction(fObj,act_str);
else alert(getErrorMsgByVar("gsm_msg_fw_no_select"));
}
Looking at it from the other end, when rule_in.htm is sent out following the request from FW_forward, it has a value ruleSelect
telling it which array index rule is being edited or created. So, if you edit the first rule, it should have the value 0, the second rule 1, and so on. So for a new rule it should have the a value one higher the the highest index currently used. So if you have one rule and add a second, it should have the value 1. Tests, on a system with currently one rule:
edit
is there but has no value.)
edit
). This is bad.So, need to investigate why when rule_in.htm is issued on the edit sequence there is no value given to rulseSelect
.
So, FW_forward calls for rule_in:
todo
set to 'edit', ruleSelect
set to the index for the row to edit and this works: <input type="hidden" name="h_ruleSelect" value="1">
todo
set to 'newfile', but with no value given to ruleSelect
. <input type="hidden" name="h_ruleSelect" value>
. Although the lack of =""
may be an artefact from the chrome debugger elements renderer.In both cases our render_page
attempts to render rather than passing it off to the netgear page renderer.
So, adding:
this.form.h_ruleSelect.value = document.getElementsByName('in_sel').length
to the onClick
for Add before stdAction
forces it to provide a correct ruleSelect value.
However, while we are here, doesn't doesn't seem to work, so that's next ...
First step is to add the concept of ACTION_DELETE
to render-page.c ...
OK, I think that the version in github on the master (only!) branch solves this, but not quite releasing it yet. If an active tester is out there I can throw an alpha up.
This is now working as far as I can see so I will close this issue. Future problems should be openede as new issues please.
Ok so as the title says I'm trying to forward more then one port but every time I try to it just updates the first one it doesn't add a new forwarded port to the list. https://i.gyazo.com/d42c2abd908cea692d885736238ba7c9.png