summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
diff options
context:
space:
mode:
authorMatt Hoosier <matt.hoosier@garmin.com>2020-02-05 16:04:49 -0600
committerKhem Raj <raj.khem@gmail.com>2020-02-06 07:20:03 -0800
commita44430fe9115f58aa72f211cb114a2e1f63bf4c5 (patch)
tree8e7fe886e280dfe9e92a554b474fa32924ec85ef /meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
parentfd2765bb16d6a895d3d6d4886add4b8b6a1baa20 (diff)
downloadmeta-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/0006-Remove-unneeded-function.patch')
-rw-r--r--meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch b/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
new file mode 100644
index 0000000000..b461a60df7
--- /dev/null
+++ b/meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
@@ -0,0 +1,51 @@
1From 157d67f152777754c059ced7511352102f23ffae Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Mon, 24 Jul 2017 09:39:18 -0500
4Subject: [PATCH 06/11] Remove unneeded function
5
6Removes a function we no longer need by integrating it into the only
7function that calls it. This was originally separated so that we could
8only process network interfaces that netlink indicated had been changed,
9this has since been extended to test for all network intefaces.
10
11Upstream-Status: Submitted [dts@apple.com]
12
13Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
14---
15 mDNSPosix/mDNSPosix.c | 13 ++-----------
16 1 file changed, 2 insertions(+), 11 deletions(-)
17
18diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
19index 59a8b8c..3fc5451 100644
20--- a/mDNSPosix/mDNSPosix.c
21+++ b/mDNSPosix/mDNSPosix.c
22@@ -1079,24 +1079,15 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
23 return err;
24 }
25
26-mDNSlocal mDNSBool ListContainsInterfaceIndex(GenLinkedList *list, int if_index)
27+mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
28 {
29 NetworkInterfaceIndex *item;
30
31 for (item = (NetworkInterfaceIndex*)list->Head; item != NULL; item = item->Next)
32 {
33- if (if_index == item->if_index) return mDNStrue;
34+ if (if_index == item->if_index) return;
35 }
36
37- return mDNSfalse;
38-}
39-
40-mDNSlocal void AddInterfaceIndexToList(GenLinkedList *list, int if_index)
41-{
42- NetworkInterfaceIndex *item;
43-
44- if (ListContainsInterfaceIndex(list, if_index)) return;
45-
46 item = malloc(sizeof *item);
47 if (item == NULL) return;
48
49--
502.17.1
51