mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
Fixes #25801. Adds the following commits to fix DHCP behaviour on Strongswan 5.9.14: -abbf9d28b0-00d8c36d6f-a50ed3006eSigned-off-by: Joel Low <joel@joelsplace.sg>
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From abbf9d28b0032cf80b79bcacea3146a60800a6dd Mon Sep 17 00:00:00 2001
|
|
From: Tobias Brunner <tobias@strongswan.org>
|
|
Date: Mon, 27 Jan 2025 09:40:56 +0100
|
|
Subject: [PATCH 1/3] pf-handler: Accept loopback interfaces as packet source
|
|
|
|
In some setups the responses from the DHCP server are sent via lo, which
|
|
does not have an address of type `ARPHRD_ETHER` (the address length is
|
|
the same, though, just all zeros, by default). Note that the dhcp plugin
|
|
doesn't actually care for the MAC address or interface details, that's
|
|
only used by the farp plugin.
|
|
|
|
Fixes: 187c72d1afdc ("dhcp: Port the plugin to FreeBSD/macOS")
|
|
---
|
|
src/libcharon/network/pf_handler.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/src/libcharon/network/pf_handler.c
|
|
+++ b/src/libcharon/network/pf_handler.c
|
|
@@ -176,7 +176,8 @@ static cached_iface_t *find_interface(pr
|
|
|
|
if (ioctl(fd, SIOCGIFNAME, &req) == 0 &&
|
|
ioctl(fd, SIOCGIFHWADDR, &req) == 0 &&
|
|
- req.ifr_hwaddr.sa_family == ARPHRD_ETHER)
|
|
+ (req.ifr_hwaddr.sa_family == ARPHRD_ETHER ||
|
|
+ req.ifr_hwaddr.sa_family == ARPHRD_LOOPBACK))
|
|
{
|
|
idx = find_least_used_cache_entry(this);
|
|
|