projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
945076c
)
libs/sys: disregard ::/0 routes on "lo" in luci.sys.net.defaultroute6()
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 12 Mar 2011 19:25:03 +0000
(19:25 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 12 Mar 2011 19:25:03 +0000
(19:25 +0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index 8b05d44d8d0b0a5b3da99a2609fcc9ee9440d67d..cc29fa37bba5d3319c849c2e0b2ecb1a25ecfae2 100644
(file)
--- 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)