ntadmin / DGND3700v2

Custom firmware for the Netgear DGND3700v2
12 stars 4 forks source link

Cant forward more then a single port #48

Closed Shad0wGeneral closed 6 years ago

Shad0wGeneral commented 6 years ago

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

ntadmin commented 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.

ntadmin commented 6 years ago

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.

ntadmin commented 6 years ago

Exploring whether this has any links to bug #36 , commits 7008037737d5fd483d1ccb51d6e72cea54d364f5 and fde8b92114dce02654c9cd08728190121793ef60

Some background info:

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:

So, need to investigate why when rule_in.htm is issued on the edit sequence there is no value given to rulseSelect.

ntadmin commented 6 years ago

So, FW_forward calls for rule_in:

In both cases our render_page attempts to render rather than passing it off to the netgear page renderer.

ntadmin commented 6 years ago

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 ...

ntadmin commented 6 years ago

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.

ntadmin commented 6 years ago

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.