kernel-netlink: Don't fallback to peer address as gateway/nexthop
This doesn't really seem useful (perhaps it was before we started to configure the outbound interface on our routes). And it can actually cause the route installation to fail e.g. for routes over point-to-point interfaces where we'd get "Error: Nexthop has invalid gateway" errors. Note that we can't return NULL if we find an interface as e.g. the updown plugin uses this method to determine the outbound interface (it ignores the nexthop), which it passes to the script. If we returned NULL, it would pass "unknown" instead, which would cause the firewall rules to mismatch. While it seems that 0.0.0.0/:: is ignored as nexthop by the kernel on the installed route, I still explicitly ignore such addresses to avoid any unintended side-effects. The automatic route installation in the ikev2/shunt-manual-prio scenario had to be disabled on the clients. The reason is that the route in table 220 won't have a nexthop set (the peers are directly connected), so when trying to reach alice or venus via SSH, which matches the port-specific bypass policies for which we don't install throw routes, the hosts will do ARP requests for the target IPs instead of routing the packets via moon. Closes strongswan/strongswan#2548
This commit is contained in:
@@ -6,4 +6,6 @@
|
||||
|
||||
charon-systemd {
|
||||
load = random nonce openssl pem pkcs1 revocation curl kernel-netlink socket-default updown vici
|
||||
# conflicts with the route via moon we have installed to reach hosts in its subnet directly
|
||||
install_routes = no
|
||||
}
|
||||
|
||||
@@ -6,4 +6,6 @@
|
||||
|
||||
charon-systemd {
|
||||
load = random nonce openssl pem pkcs1 revocation curl kernel-netlink socket-default updown vici
|
||||
# conflicts with the route via moon we have installed to reach hosts in its subnet directly
|
||||
install_routes = no
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user