Project

General

Profile

Actions

Bug #3433

closed

Case-sensitive detection of link local addresses

Added by Brian Candler over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/04/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1-IPv6
Affected Architecture:

Description

Trying to add a gateway address FE80::5:73FF:FEA0:2 (which is a Cisco HSRP address, copy-pasted directly from output of "show standby")

"The following input errors were detected:

The gateway address FE80::5:73FF:FEA0:2 does not lie within one of the chosen interface's subnets."

The test in system_gateways_edit.php calls

if(!is_linklocal($_POST['gateway']))

and the code in /etc/inc/util.inc

function is_linklocal($ipaddr) {
        return (substr($ipaddr, 0, 5) == "fe80:");
}

So the problem is simply that the string started "FE80" instead of "fe80". This should be a straightforward fix with a call to strtolower() somewhere.

Related: bug #2841

Actions

Also available in: Atom PDF