summaryrefslogtreecommitdiff
path: root/aports/ifupdown-ng
diff options
context:
space:
mode:
Diffstat (limited to 'aports/ifupdown-ng')
-rw-r--r--aports/ifupdown-ng/01-add-onlink-to-default-route.patch30
-rw-r--r--aports/ifupdown-ng/APKBUILD6
2 files changed, 34 insertions, 2 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
+ }
+
diff --git a/aports/ifupdown-ng/APKBUILD b/aports/ifupdown-ng/APKBUILD
index 2881383..a523fa4 100644
--- a/aports/ifupdown-ng/APKBUILD
+++ b/aports/ifupdown-ng/APKBUILD
@@ -2,7 +2,7 @@
pkgname=ifupdown-ng
pkgver=0.12.1
-pkgrel=0 # base: 1
+pkgrel=1 # base: 2
pkgdesc="tools for managing network configuration"
url="https://github.com/ifupdown-ng/ifupdown-ng"
arch="all"
@@ -12,9 +12,10 @@ makedepends=
install=""
subpackages=
source="https://distfiles.dereferenced.org/ifupdown-ng/ifupdown-ng-$pkgver.tar.xz
+ 01-add-onlink-to-default-route.patch
no-examples.patch
interfaces
-"
+ "
builddir="$srcdir/ifupdown-ng-$pkgver"
provides="ifupdown-any"
provider_priority=900
@@ -36,6 +37,7 @@ package() {
sha512sums="
c2c1e27fbd53eeb4150e544a893352f13845b491850e982a5880160c3be03b628794f7989c802ff823ac3e8c6c34dc4ab97c0abcefdda85f06fcd64ced8ac60c ifupdown-ng-0.12.1.tar.xz
+5a4900356cf4ea48d5088d98328cf3f8a821a52a3b9518987a6432fc1349c3a314bbe20d46736ec8781e2a675398e15183c1ab8c0ba617c3e49b164fbbb48baf 01-add-onlink-to-default-route.patch
e261fd3f185372bf8f2075216b9dd3e2d8090e978654ee742122ee7869017d309eac54b1415e79878015f312a39fa8fdd4b0d8c2bed8515e5a94c15da1b7b844 no-examples.patch
cde5422ed19c79f970b24fde267f9bef34f069f806e7ed671fb443df6ff169e81791baaeebbe02595218f30224add65dabfd0337f9984d2387965001872a1038 interfaces
"