OpenWrt Forum Archive

Topic: [Q] static routes configured manually are not installed.

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I am testing with our built image from OpenWrt trunk source codes (outdated by more than 1 year)

During checking, I observed that static routes configured manually through LUCI WEB UI are not installed.
As I traced netifd codes with debug enabled, I could see that static routes are installed but removed in some cases like "ifup wan" or "/etc/init.d/network reload".
From further trace, my understanding is as below.
-. In interface_change_config() called by interface_update(),   
   reload_ip is always true. Consequently, interface_ip_set_enabled for both config_ip and proto_ip is called with false initially. However, interface_ip_set_enabled for config_ip is not called with true. This makes static routes uninstalled.
-. Why reload_ip is always true even though nothing is changed in configuration is that ip6table value for interface is set to default value which is incremented per interface basis.
For now, IPv6 support is not included in my works. So, I blocked a line regarding ip6table default setting and could see that static routes are not lost in any cases.
However, I wonder why this unexpected problem happened. if you have helpful explanation and advices for this topic, please let me know.
(Currently, netifd-2013-05-30 is being used and some(not much) modifications are applied for our HW platform.)

Thank you in advance.

Same problem here. All my static routes configured via web-interface are not visible in route -n. However, if I type them manually they work ofc.

The configuration looks as follows:

config route                 
        option interface 'lan'        
        option gateway '192.168.1.1'
        option target '78.152.49.168'
        option netmask '255.255.255.248'
                      
config route                  
        option interface 'lan'      
        option target '206.190.151.80'
        option gateway '192.168.1.1'

(Last edited by ElLoco on 25 Jul 2014, 15:26)

Works now with barrier_breaker/14.07-rc3/

(Last edited by ElLoco on 24 Aug 2014, 11:06)

The discussion might have continued from here.