aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch
blob: 8c0e6bf3976a16a02815e63599a827b348aa05cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 71a7c728ae0d8143b66aa40decca74ebaa9aa2ce Mon Sep 17 00:00:00 2001
From: Nate Karstens <nate.karstens@garmin.com>
Date: Wed, 28 Jun 2017 17:30:00 -0500
Subject: [PATCH 03/11] Track interface socket family

Tracks the socket family associated with the interface.

Upstream-Status: Submitted [dts@apple.com]

Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
---
 mDNSPosix/mDNSPosix.c | 1 +
 mDNSPosix/mDNSPosix.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
index 5e5b2cd..8fe22be 100644
--- a/mDNSPosix/mDNSPosix.c
+++ b/mDNSPosix/mDNSPosix.c
@@ -918,6 +918,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
         // Set up the extra fields in PosixNetworkInterface.
         assert(intf->intfName != NULL);         // intf->intfName already set up above
         intf->index                = intfIndex;
+        intf->sa_family            = intfAddr->sa_family;
         intf->multicastSocket4     = -1;
 #if HAVE_IPV6
         intf->multicastSocket6     = -1;
diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h
index ca60d80..f77c185 100644
--- a/mDNSPosix/mDNSPosix.h
+++ b/mDNSPosix/mDNSPosix.h
@@ -19,6 +19,7 @@
 #define __mDNSPlatformPosix_h
 
 #include <signal.h>
+#include <sys/socket.h>
 #include <sys/time.h>
 
 #ifdef  __cplusplus
@@ -40,6 +41,7 @@ struct PosixNetworkInterface
     const char *            intfName;
     PosixNetworkInterface * aliasIntf;
     int index;
+    sa_family_t sa_family;
     int multicastSocket4;
 #if HAVE_IPV6
     int multicastSocket6;
-- 
2.17.1