Opened 4 years ago

Closed 10 months ago

#39 closed Bug / Defect (worksforme)

Linux gateway detection does not respect flags

Reported by: samuli Owned by:
Priority: major Milestone:
Component: Networking Version: 2.1.0 / 2.1.1
Severity: Not set (if unsure, select this one) Keywords: gateway linux
Cc:

Description (last modified by samuli)

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.

Change History (4)

comment:1 Changed 4 years ago by samuli

  • Description modified (diff)

Originally reported to SF.net bug tracker by sven-ola (https://sourceforge.net/users/sven-ola).

comment:2 Changed 13 months ago by samuli

This bug report was filed against a very old OpenVPN version. Can somebody confirm that this is still an issue with latest OpenVPN and Linux kernel versions?

comment:3 Changed 13 months ago by samuli

  • Keywords gateway linux added

comment:4 Changed 10 months ago by samuli

  • Resolution set to worksforme
  • Status changed from new to closed

No confirmation that this is still valid. Closing, reopen if necessary.

Note: See TracTickets for help on using tickets.