Opened 14 years ago
Last modified 11 years ago
#39 closed Bug / Defect
Linux gateway detection does not respect flags — at Version 1
Reported by: | Samuli Seppänen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Networking | Version: | OpenVPN 2.1.0 / 2.1.1 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | gateway linux |
Cc: |
Description (last modified by )
In route.c::get_default_gateway, the /proc/net/route file is examined.
One of the fields is the "FLAGS" field which contiain various status flags about a route. Because OpenVPN does not evaluate the flags field, it may find an invalid gateway entry with (Flags & RTNH_F_DEAD == 0).
At least valid with Kernel-2.4, e.g. "ip r del default" does not delete the entry from /proc/net/route, instead it's marked dead. May be true with Kernel-2.6 also, e.g. with the "dead gateway detection": if 2 gw's with same metric exist, this semi-automatically switches from a dead gw to a functioning one. I presume this is done by marking with Flags, but I haven't checked that.
Originally reported to SF.net bug tracker by sven-ola (https://sourceforge.net/users/sven-ola).