Skip to content
Permalink
Browse files

rc: fix missing default route when in non-router mode

  • Loading branch information...
RMerl committed Jul 11, 2019
1 parent e2a9e59 commit 27d5212801063567e9e6ed5b1a3be5575043af88
Showing with 8 additions and 7 deletions.
  1. +8 −7 release/src/router/rc/lan.c
@@ -4213,19 +4213,20 @@ lan_up(char *lan_ifname)

/* Set default route to gateway if specified */
if(access_point_mode()
|| (((repeater_mode() && (nvram_get_int("wlc_state") == WLC_STATE_CONNECTED))
|| ((repeater_mode()
#if defined(RTCONFIG_BCMWL6) && defined(RTCONFIG_PROXYSTA)
|| psr_mode() || mediabridge_mode())
#elif defined(RTCONFIG_REALTEK)
|| mediabridge_mode())
|| psr_mode() || mediabridge_mode()
#elif defined(RTCONFIG_REALTEK) || defined(RTCONFIG_QCA)
|| mediabridge_mode()
#endif
#ifdef RTCONFIG_DPSTA
&& !(dpsta_mode() && nvram_get_int("re_mode") == 0)
|| (dpsta_mode() && nvram_get_int("re_mode") == 0)
#endif
) && nvram_get_int("wlc_state") == WLC_STATE_CONNECTED)
#if defined(RTCONFIG_AMAS)
&& !(nvram_get_int("re_mode") == 1)
|| (nvram_get_int("re_mode") == 1)
#endif
)) {
) {
route_add(lan_ifname, 0, "0.0.0.0", nvram_safe_get("lan_gateway"), "0.0.0.0");

refresh_ntpc();

0 comments on commit 27d5212

Please sign in to comment.
You can’t perform that action at this time.