diff options
Diffstat (limited to 'aports/ifupdown-ng/01-add-onlink-to-default-route.patch')
-rw-r--r-- | aports/ifupdown-ng/01-add-onlink-to-default-route.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/aports/ifupdown-ng/01-add-onlink-to-default-route.patch b/aports/ifupdown-ng/01-add-onlink-to-default-route.patch new file mode 100644 index 0000000..e663cdf --- /dev/null +++ b/aports/ifupdown-ng/01-add-onlink-to-default-route.patch @@ -0,0 +1,30 @@ +From: Dermot Bradley <dermot_bradley@yahoo.com> +Date: Wed, 4 Jan 2023 00:23 +0000 +Subject: [PATCH] for static executor add "onlink" option to default route + +Add the "onlink" next-hop option to the default route. This is required +for situations like some VPS/Cloud Providers where they provide a /32 IPv4 +address or a /128 IPv6 address and obviously the router to use as the gateway +for the default route is not in the same subnet. + +The ifupdown package has been adding the "onlink" option for the past 7 +years when Debian added it: + +https://salsa.debian.org/debian/ifupdown/-/commit/8b7bca9597d2f75670b182f0fc149cdbaec3544c + +This patch has been submitted upstream to ifupdown-ng as PR #207. + +--- + +diff -aur a/executor-scripts/linux/static b/executor-scripts/linux/static +--- a/executor-scripts/linux/static ++++ b/executor-scripts/linux/static +@@ -33,7 +33,7 @@ + configure_gateways() { + for gw in ${IF_GATEWAYS}; do + addrfam=$(addr_family ${gw}) +- ${MOCK} ip "${addrfam}" route add default via "${gw}" ${VRF_TABLE} ${METRIC} dev "${IFACE}" ++ ${MOCK} ip "${addrfam}" route add default via "${gw}" ${VRF_TABLE} ${METRIC} dev "${IFACE}" onlink + done + } + |