Skip to content

Commit

Permalink
Set high metric on anygw prefix route
Browse files Browse the repository at this point in the history
Make sure anygw is not used for communication with hosts in the same
network.
Fixes #1078
  • Loading branch information
pony1k committed Feb 8, 2024
1 parent e322985 commit 5e735d8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ function anygw.configure(args)
anygw_ipv4:prefix(ipv4:prefix())
local baseIfname = "br-lan"
local argsDev = { macaddr = anygw_mac }
local argsIf = { proto = "static" }
local argsIf = {
proto = "static",
-- Set high metric for anygw prefix route, so that br-lan is chosen for
-- communication with hosts in the same mesh cloud.
metric = '2147483647',
}
argsIf.ip6addr = anygw_ipv6:string()
argsIf.ipaddr = anygw_ipv4:host():string()
argsIf.netmask = anygw_ipv4:mask():string()
Expand Down

0 comments on commit 5e735d8

Please sign in to comment.