diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-03-12 19:25:03 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-03-12 19:25:03 +0000 |
commit | 9836e949a58484a83d40a10570c3dab919770d6a (patch) | |
tree | 21fd8e18a46917c684b3ee79f79c1cd993097ffa | |
parent | 945076c895cce30a862c68bd32205b74f30098cd (diff) |
libs/sys: disregard ::/0 routes on "lo" in luci.sys.net.defaultroute6()
-rw-r--r-- | libs/sys/luasrc/sys.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 8b05d44d8d..cc29fa37bb 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) |