[OpenWrt-Devel] netifd , route config behavior inconsistent with Wiki

Thierry Du Tre thierry.dutre.tch at gmail.com
Mon Jul 4 09:09:41 EDT 2016

Hi Felix,

I noticed an inconsistency with following description on the Wiki page 
for network config, section type 'route' (IPv4 Routes), option 'gateway' :
"Network gateway. If omitted, the gateway from the parent interface is 
taken; if set to no gateway will be specified for the route"

It seems that in case a route is added without value for gateway set, 
this will result in creating a device route, so without a 'via' gateway ip.

For example :
config route
         option interface 'wan'
         option target ''
         option netmask ''

When wan interface is up, the following routes are created :
- default via dev pppoe-wan  proto static  metric 1
- dev pppoe-wan  proto static  scope link  metric 1

Where based on the Wiki description, I'd expect the following route : via dev pppoe-wan  proto static  metric 1

As I am trying to create a setup with multiple wan interfaces, there 
will be multiple default routes and the described behavior would be 
useful to get traffic destined for some subnets being forwarded via a 
specific interface.

Would you think, that a patch -when proposed- might be accepted ?
Or is the Wiki to be updated in order to describe the actual behavior in 
current implementation ?

Thierry Du Tre
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list