diff options
| author | Matt Hoosier <matt.hoosier@garmin.com> | 2020-02-05 16:04:49 -0600 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-02-06 07:20:03 -0800 |
| commit | a44430fe9115f58aa72f211cb114a2e1f63bf4c5 (patch) | |
| tree | 8e7fe886e280dfe9e92a554b474fa32924ec85ef /meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch | |
| parent | fd2765bb16d6a895d3d6d4886add4b8b6a1baa20 (diff) | |
| download | meta-openembedded-a44430fe9115f58aa72f211cb114a2e1f63bf4c5.tar.gz | |
mdns: improve numerous aspects of Posix backend
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>
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch')
| -rw-r--r-- | meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch b/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch new file mode 100644 index 0000000000..fdc5105cb9 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 0fcc0f210f3a9310a1963de640b384ce866410fd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nate Karstens <nate.karstens@garmin.com> | ||
| 3 | Date: Wed, 9 Aug 2017 09:16:58 -0500 | ||
| 4 | Subject: [PATCH 08/11] Mark deleted interfaces as being changed | ||
| 5 | |||
| 6 | Netlink notification handling ignores messages for deleted links, | ||
| 7 | RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu- | ||
| 8 | mentation (http://www.infradead.org/~tgr/libnl/doc/route.html) | ||
| 9 | RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot. | ||
| 10 | There was likely a mixup in the original implementation, so this | ||
| 11 | change replaces handling for RTM_GETLINK with RTM_DELLINK. | ||
| 12 | |||
| 13 | Testing and Verification Instructions: | ||
| 14 | 1. Use ip-link to add and remove a VLAN interface and verify | ||
| 15 | that mDNSResponder handles the deleted link. | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [dts@apple.com] | ||
| 18 | |||
| 19 | Signed-off-by: Nate Karstens <nate.karstens@garmin.com> | ||
| 20 | --- | ||
| 21 | mDNSPosix/mDNSPosix.c | 2 +- | ||
| 22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 23 | |||
| 24 | diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c | ||
| 25 | index 798ab10..a8a57df 100644 | ||
| 26 | --- a/mDNSPosix/mDNSPosix.c | ||
| 27 | +++ b/mDNSPosix/mDNSPosix.c | ||
| 28 | @@ -1163,7 +1163,7 @@ mDNSlocal void ProcessRoutingNotification(int sd, GenLinkedList *change | ||
| 29 | #endif | ||
| 30 | |||
| 31 | // Process the NetLink message | ||
| 32 | - if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) | ||
| 33 | + if (pNLMsg->nlmsg_type == RTM_DELLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) | ||
| 34 | AddInterfaceIndexToList(changedInterfaces, ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index); | ||
| 35 | else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR) | ||
| 36 | AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index); | ||
| 37 | -- | ||
| 38 | 2.17.1 | ||
| 39 | |||
