resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

Fix Route for IPv6 default gateway

Open tbe opened this issue 8 years ago • 4 comments

The IPv6 ressource checks the "destination" paramter for a ":" to decide if the route is IPv4 or IPv6. If the destination is "default", it always assumes that IPv4 is given, even it the gateway has a ":" in it.

The "gateway" parameter is more failsave for this, so we changed the logic to it.

tbe avatar Feb 05 '17 14:02 tbe

Obviously the "default" case wasn't covered correctly. But what if the gateway is not specified (the route could also be via a device)? Could the user provide a name instead of an IP address for gateway? Would perhaps something like this be better:

case "$OCF_RESKEY_destination $OCF_RESKEY_gateway" in :) addr_family="-6" ;; *) addr_family="-4" ;; esac

dmuhamedagic avatar Feb 13 '17 08:02 dmuhamedagic

if names are a supported usecase, we would need an additional parameter like "addr_family".

If both, the destination and the gateway are names, we can not decide if the route is ipv4 or ipv6.

tbe avatar Feb 13 '17 14:02 tbe

Yes, obviously.

However, you neither responded to other questions nor commented on the proposed alternative.

dmuhamedagic avatar Mar 02 '17 15:03 dmuhamedagic

This wil fail if destination is an aliased network interface, eg 'ip route add default dev eth0:4'

CAPSLOCK2000 avatar Aug 23 '17 22:08 CAPSLOCK2000