From 9684901dc27e37900d4c4cf09b1de3b836649e0e Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Sun, 9 Feb 2020 02:05:50 +0800 Subject: [PATCH] wireguard: add checkbox for `nohostroute` option This change allows to configure `nohostroute` option for wireguard to explicitely prevent creation of host routes to endpoints. By default without `option nohostroute '1'`, an explicite route to the peer's endpoint will be created in the main routing table with the next hop to the gateway. However, it causes issues with some setup. Enabling this option will inhibit this behavior. See discussions at http://lists.openwrt.org/pipermail/openwrt-devel/2019-March/016329.html. Signed-off-by: Yuxiang Zhu --- .../htdocs/luci-static/resources/protocol/wireguard.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index c9b00abde..c8e1f8403 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -60,6 +60,8 @@ return network.registerProtocol('wireguard', { o.datatype = 'ipaddr'; o.optional = true; + o = s.taboption('general', form.Flag, 'nohostroute', _('No Host Routes'), _('Optional. Do not create host routes to peers.')); + o.optional = true; // -- advanced -------------------------------------------------------------------- -- 2.25.1