“The MAC address can not be the multicast address” fix for Cisco routers WAG160N

We have one (a bit old) Linksys / Cisco ADSL router of the type WAG160N. Recently we decided to set up MAC filtering (in addition to a WPA password of course). We only allow access to the WiFi after we know which MAC the person’s device has. The reason is that we have only a very narrow connection speed and want to be able to see if anybody is (unintentionally) using to much bandwidth – due example by automatic updates.

All was fine for some days until we tried to add another MAC address to the filter and got the message “The MAC address can not be the multicast address”. It was an address starting with “5C: …” which does not seem to be a multicast address at all according to Wikipedia.

bug

I digged into the webinterface and found that there is a JavaScript function isMacMulticast


function isMacMulticast(mac)
{
var mac1=mac.toUpperCase();
var byte=parseInt(mac1.substr(0,2));
if((byte&0x1)==0x1)//if lowest bit of first byte is 1, then it is multicast address.
return true;
else
return false;
}

While I think it shouldn’t it does return “true” for the mac address starting with 5C – but the lowest bit of the hexadecimal value 5C is not 1! The should have used

byte=parseInt("0x" + mac1.substr(0,2));

Quickly I found a workaround for this problem.

Just open your browser’s developer’s console and enter


isMacMulticast = function(e) { return false; }

After this you can save the settings. There is no router-side validation at all.

Leave a Reply

Your email address will not be published.