mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-07-19 15:29:08 +02:00

Apple's default implementation of the Posix backend for mDNSResponder has a number of weaknesses. Address several of them, most notably: * Improve interface tracking, preventing confusion to mdns's state machine. Prevents spurious removal/republication cycles whenever network interfaces are added or removed. * Support network interfaces whose indeces are great than 31. Indices grow past that range surprisingly quickly, especially with multi- homed, mobile, wifi, Bluetooth, VPN, VLANs, or other interfaces present. * Correctly handle edge cases during removal of a network interface. The fixes are kept as a patch series for clarity. Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
From 0fcc0f210f3a9310a1963de640b384ce866410fd Mon Sep 17 00:00:00 2001
|
|
From: Nate Karstens <nate.karstens@garmin.com>
|
|
Date: Wed, 9 Aug 2017 09:16:58 -0500
|
|
Subject: [PATCH 08/11] Mark deleted interfaces as being changed
|
|
|
|
Netlink notification handling ignores messages for deleted links,
|
|
RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu-
|
|
mentation (http://www.infradead.org/~tgr/libnl/doc/route.html)
|
|
RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot.
|
|
There was likely a mixup in the original implementation, so this
|
|
change replaces handling for RTM_GETLINK with RTM_DELLINK.
|
|
|
|
Testing and Verification Instructions:
|
|
1. Use ip-link to add and remove a VLAN interface and verify
|
|
that mDNSResponder handles the deleted link.
|
|
|
|
Upstream-Status: Submitted [dts@apple.com]
|
|
|
|
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
|
|
---
|
|
mDNSPosix/mDNSPosix.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
|
|
index 798ab10..a8a57df 100644
|
|
--- a/mDNSPosix/mDNSPosix.c
|
|
+++ b/mDNSPosix/mDNSPosix.c
|
|
@@ -1163,7 +1163,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change
|
|
#endif
|
|
|
|
// Process the NetLink message
|
|
- if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
|
|
+ if (pNLMsg->nlmsg_type == RTM_DELLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
|
|
AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index);
|
|
else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
|
|
AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index);
|
|
--
|
|
2.17.1
|
|
|