]> git.eshelyaron.com Git - emacs.git/commit
Fix network test failure when using VPN client
authorRobert Pluim <rpluim@gmail.com>
Wed, 18 Dec 2024 13:50:06 +0000 (14:50 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:16:50 +0000 (16:16 +0100)
commite68791f5ab1e920680ae4db01c2c80867cda9e8c
treea3ff4072775d2b5178222d8dac00909d2fe1b475
parentdad85cb256be0ff3591e4167ff56b11f4812eb67
Fix network test failure when using VPN client

When using certain VPN clients, the interface info returned by
'getifaddrs' does not have the address family filled in for the
ifa_netmask component (this is allowed by the standard, since
the value is not specified).  The resulting address info causes
network tests suite failures.  Fix by copying the address family
from the returned interface address.

* src/process.c (network_interface_list): Copy the interface address
sa_family to the netmask address.
(Fnetwork_lookup_address_info): Fix test for non-IP addresses to
properly account for IPv6.

* test/src/process-tests.el (process-tests-check-bug-74907): New
test, checks that 'network-interface-list' output is as
expected.

(Bug#74907)

(cherry picked from commit d8e8e1d5ed260222e2630141d26572a361a5c75f)
src/process.c
test/src/process-tests.el