[utils.inc] [is_linklocal()] Invalid LL recognition code
-
Hi,
While working on correct dynamic gateway creation algo I've noticed the subject function which is implemented as:
return (strtolower(substr($ipaddr, 0, 5)) == "fe80:");I believe this code will fail to recognise LL address in some cases because LL scope has a /10 prefix … so even "fe81:" is a correct LL address will be counted as invalid.
After some research I've noticed that this code affects the following functions in case of [FE81..FEBF] LL addresses:
[interfaces.inc] interface_configure() - Will remove all valid LL addresses on all interfaces;
[interfaces.inc] find_interface_ipv6_ll() - Will never find first LL address on the interface;
[services.inc] services_dnsmasq_configure() - dnsmasq will be unable to bind on valid LL address;
[system.inc] system_routing_configure() - Routing will not be properly configured because scope won't be added if LL address is not FE80;
[gwlb.inc] setup_gateways_monitor() - Gateway monitors will not be properly configured if LL address is not FE80;I will post a pull request soon with fix for the subject along with some fixes for dynamic gateways, but I think this fix should be merged to 2.1 branch too. Yeah, this bug is not that sensitive but you never know what can\could\will happen :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy