luci-app-tailscale-community: fix exit node conflict
authorHan Yiming <redacted>
Fri, 13 Feb 2026 12:21:18 +0000 (20:21 +0800)
committerPaul Donald <redacted>
Fri, 13 Feb 2026 16:02:24 +0000 (17:02 +0100)
when both use advertise exitnode and use another node as exit node
will report ERR

Signed-off-by: Han Yiming <redacted>
applications/luci-app-tailscale-community/root/usr/share/rpcd/ucode/tailscale.uc

index f1e987594989e2f9b67576ef4ac7c54e5580cbb4..fe734a47c8ec4d9db7e7b031b12eb00ecf7d1f3c 100644 (file)
@@ -143,8 +143,8 @@ methods.set_settings = {
                let args = ['set'];
 
                push(args,'--accept-routes=' + (form_data.accept_routes == '1'));
-               push(args,'--advertise-exit-node=' + (form_data.advertise_exit_node == '1'));
-               push(args,'--exit-node-allow-lan-access=' + (form_data.exit_node_allow_lan_access == '1'));
+               push(args,'--advertise-exit-node=' + ((form_data.advertise_exit_node == '1')&&(form_data.exit_node == "")));
+               if (form_data.exit_node == "") push(args,'--exit-node-allow-lan-access=' + (form_data.exit_node_allow_lan_access == '1'));
                push(args,'--ssh=' + (form_data.ssh == '1'));
                push(args,'--accept-dns=' + (form_data.disable_magic_dns != '1'));
                push(args,'--shields-up=' + (form_data.shields_up == '1'));
@@ -152,7 +152,7 @@ methods.set_settings = {
                push(args,'--snat-subnet-routes=' + (form_data.nosnat != '1'));
                push(args,'--advertise-routes ' + (shell_quote(join(',',form_data.advertise_routes)) || '\"\"'));
                push(args,'--exit-node=' + (shell_quote(form_data.exit_node) || '\"\"'));
-               if (form_data.exit_node != "") push(args,' --exit-node-allow-lan-access');
+               if (form_data.exit_node != "") push(args,' --exit-node-allow-lan-access=true');
                push(args,'--hostname ' + (shell_quote(form_data.hostname) || '\"\"'));
 
                let cmd_array = 'tailscale '+join(' ', args);
git clone https://git.99rst.org/PROJECT