[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 0.0.0.0 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 '1.2.3.0'
         option netmask '255.255.255.0'

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

Where based on the Wiki description, I'd expect the following route :
1.2.3.0/24 via 172.18.16.1 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 ?

Regards,
Thierry Du Tre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list