route: sort by priority to identify the default one
route: sort by priority to identify the default one

In lookupDefaultRoute(), to determine the default route for a given IP
family we list all routes filtering just by the 0.0.0.0 destination.

On some EKS setups where multilple NICs are attached to an instance,
this is not enough to identify a single route, since each interface has
its own default route.

The following example illustrates the problem:

    $ ks exec ds/cilium -- ip route list
    default via 10.100.1.1 dev eth0
    default via 10.100.255.65 dev eth1 metric 10001
    169.254.169.254 dev eth0

This will cause the agent to report a fatal error, as it can't find a
single gateway:

    cilium-agent level=fatal msg="Error while creating daemon" error="unable to install ip rule for ENI multi-node NodePort: failed to find interface with default route: Found default routes with different netdev ifindices: 2 vs 3" subsys=daemon

To address this issue, this commit changes the logic of
lookupDefaultRoute() to pick the one with the lowest priority.

Signed-off-by: Gilberto Bertin <e45dca12016e9fd4d68d2c7903502c5e1a1f4f1b@isovalent.com>

cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,cilium/cilium,cilium/cilium