[Bug / UX Issue] [Flint 4] OpenVPN client in dev tap mode silently disables LAN DHCP without any log message

Device & Firmware:

  • Model: GL.iNet Flint 4 (GL-BE14000)
  • Firmware Version: 4.9.3

Description of the Issue:
When using an OpenVPN client profile configured with dev tap (routed L3 setup over a TAP interface, not an L2 bridge), the router silently disables the LAN DHCP server (dhcp.lan.ignore='1') upon VPN connection (and after every reboot).

Guest and IoT networks continue to serve DHCP normally, while the main LAN DHCP toggle in the GL.iNet UI turns off and LuCI shows "Ignore interface" checked.

Root Cause:
In /etc/openvpn/scripts/ovpnclient-up (around line 143), the script checks if the profile mode is tap or tap-s2s, and unconditionally assumes the user wants an L2 Site-to-Site bridge where DHCP is handled by the remote server:

sh

# tap-s2s settings
if [ "$client_tap" = tap-s2s -o "$client_tap" = tap ]; then
        /usr/bin/setup_tap_s2s client
        touch /tmp/run/disconnect_lan_flag
        uci set dhcp.lan.ignore=1
        uci commit dhcp
        /etc/init.d/dnsmasq reload
        wait_for_wifi_ready
        /etc/init.d/network reload&
        disconnect_lan_clients
fi

Why this is problematic:

  1. Assumes all dev tap configs are L2 bridges: Many OpenVPN servers use dev tap simply for L3 routing (pushing an IP address and routes directly to the ovpnclient interface) without bridging br-lan to the remote LAN. Disabling local DHCP breaks internet/LAN connectivity for all local clients.
  2. Zero logging: Neither ovpnclient-up nor ovpnclient-down writes anything to syslog (logger) when modifying dhcp.lan.ignore making this behavior look like a random firmware bug where LAN DHCP turns off after reboot.

Suggested Improvements:

  1. Add a clear logger message in /etc/openvpn/scripts/ovpnclient-up and ovpnclient-down whenever dhcp.lan.ignore is toggled or disconnect_lan_clients is triggered.
  2. Separate tap (standard routed TAP client) from tap-s2s (L2 bridge mode), or provide an explicit UI toggle in the OpenVPN client settings (e.g., "Bridge TAP with LAN / Disable local DHCP") instead of forcing dhcp.lan.ignore=1 on every dev tap profile.

Workaround used:
Adding a custom route-up script in the .ovpn profile to revert dhcp.lan.ignore='0' and restart dnsmasq.


Hi,

Thank you for the detailed analysis and for pointing out the relevant script.

Our current firmware provides TUN and TAP-S2S modes for OpenVPN, and imported TAP profiles are handled as TAP-S2S.
When the VPN connects, the router bridges the VPN interface with LAN and disables its local LAN DHCP server, allowing LAN devices to obtain addresses from the remote network’s DHCP server.

We will submit your suggestions regarding clearer logging and explicit control over TAP bridging for internal discussion.

Thank you for your understanding and support.