Entering Static IP Mappings

All about firmwares for routers. Support for RouterTech firmwares is here too.
Post Reply
chrisjk
Newbie
Newbie
Posts: 5
Joined: Mon Dec 05, 2011 4:14 pm

Entering Static IP Mappings

Post by chrisjk » Wed Mar 12, 2014 5:44 pm

Router Safecom SART2-4115 (see guides/info/routers/sart2-4115-review/), Routertech V2.97 Lite

I'm not including full diagnostic dumps unless required - this seems to be a generic problem.

I am trying to enter reserved IP-MAC mappings under Advanced-LAN Clients page. There seems to be a problem parsing and/or validating the entered MAC address. MAC addresses with the first byte >= 0x80 are rejected with "ERROR: Error found on page", for example 7f:ff:ff:ff:ff:ff is accepted, but 80:00:00:00:00:00 is rejected.

I have a device where the first byte of the MAC address is 0xdc. I can add this device to the reserved pool after it has been assigned by DHCP, but cannot enter it afresh in order to choose an IP address for it.

There are a couple of functions visible in the page source to do with validating MACs


function valDoValidateMAC(Addr)
{
if(Name.match("[^0-9a-fA-F_-]") != null) { return("A mac address can only have characters 0 to 9 and A to F octet separated by -"); }
return null;
}


//Aids,050811 add MAC check using ":"{
function valDoValidateMAC3(Addr)
{
if((Addr.match("^[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[0-9a-fA-F]{1,2}\:[[0-9a-fA-F]{1,2}\:[[0-9a-fA-F]{1,2}$")== null) || (Addr.length)!=17)
{
return("A mac address can only have characters 0 to 9 and A to F octet separated by -,EX: 00:11:22:33:AA:BB");
}
return null;
}
//Aids,050811 add MAC check using ":"}

which look OK (valDoValidateMAC3 looks relevant) but there is presumably a further check elsewhere giving the problem. I'm not familiar enough with the scripting tools to investigate further. Looks like a classic signed/unsigned compare problem but I don't know where to look :cry: .

Can anyone confirm this as a generic problem? Is there a work around for this? Are there any configuration files that can be edited directly, or is there a command line entry to reserve IP addresses?

Chris K
Post Reply