From: Jo-Philipp Wich Date: Sat, 12 Mar 2011 19:25:03 +0000 (+0000) Subject: libs/sys: disregard ::/0 routes on "lo" in luci.sys.net.defaultroute6() X-Git-Tag: 0.11.0~2218 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=9836e949a58484a83d40a10570c3dab919770d6a libs/sys: disregard ::/0 routes on "lo" in luci.sys.net.defaultroute6() --- diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 8b05d44d8..cc29fa37b 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -302,7 +302,9 @@ function net.defaultroute6() local route net.routes6(function(rt) - if rt.dest:prefix() == 0 and (not route or route.metric > rt.metric) then + if rt.dest:prefix() == 0 and rt.device ~= "lo" and + (not route or route.metric > rt.metric) + then route = rt end end)