1*4a64e381SAndroid Build Coastguard WorkerFrom 542c1b2ce1dcc069cf848d11978c8b6ae5982b6e Mon Sep 17 00:00:00 2001 2*4a64e381SAndroid Build Coastguard WorkerMessage-ID: <542c1b2ce1dcc069cf848d11978c8b6ae5982b6e.1687508149.git.stefan@agner.ch> 3*4a64e381SAndroid Build Coastguard WorkerIn-Reply-To: <e136dcdcdd93ef32ada981e89c195905eb809eea.1687508149.git.stefan@agner.ch> 4*4a64e381SAndroid Build Coastguard WorkerReferences: <e136dcdcdd93ef32ada981e89c195905eb809eea.1687508149.git.stefan@agner.ch> 5*4a64e381SAndroid Build Coastguard WorkerFrom: Nate Karstens <[email protected]> 6*4a64e381SAndroid Build Coastguard WorkerDate: Wed, 28 Jun 2017 17:30:00 -0500 7*4a64e381SAndroid Build Coastguard WorkerSubject: [PATCH] Track interface socket family 8*4a64e381SAndroid Build Coastguard Worker 9*4a64e381SAndroid Build Coastguard WorkerTracks the socket family associated with the interface. 10*4a64e381SAndroid Build Coastguard Worker 11*4a64e381SAndroid Build Coastguard WorkerUpstream-Status: Submitted [[email protected]] 12*4a64e381SAndroid Build Coastguard Worker 13*4a64e381SAndroid Build Coastguard WorkerSigned-off-by: Nate Karstens <[email protected]> 14*4a64e381SAndroid Build Coastguard WorkerSigned-off-by: Alex Kiernan <[email protected]> 15*4a64e381SAndroid Build Coastguard Worker--- 16*4a64e381SAndroid Build Coastguard Worker mDNSPosix/mDNSPosix.c | 1 + 17*4a64e381SAndroid Build Coastguard Worker mDNSPosix/mDNSPosix.h | 2 ++ 18*4a64e381SAndroid Build Coastguard Worker 2 files changed, 3 insertions(+) 19*4a64e381SAndroid Build Coastguard Worker 20*4a64e381SAndroid Build Coastguard Workerdiff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c 21*4a64e381SAndroid Build Coastguard Workerindex a32a880..9a5b4d7 100644 22*4a64e381SAndroid Build Coastguard Worker--- a/mDNSPosix/mDNSPosix.c 23*4a64e381SAndroid Build Coastguard Worker+++ b/mDNSPosix/mDNSPosix.c 24*4a64e381SAndroid Build Coastguard Worker@@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct 25*4a64e381SAndroid Build Coastguard Worker // Set up the extra fields in PosixNetworkInterface. 26*4a64e381SAndroid Build Coastguard Worker assert(intf->intfName != NULL); // intf->intfName already set up above 27*4a64e381SAndroid Build Coastguard Worker intf->index = intfIndex; 28*4a64e381SAndroid Build Coastguard Worker+ intf->sa_family = intfAddr->sa_family; 29*4a64e381SAndroid Build Coastguard Worker intf->multicastSocket4 = -1; 30*4a64e381SAndroid Build Coastguard Worker #if HAVE_IPV6 31*4a64e381SAndroid Build Coastguard Worker intf->multicastSocket6 = -1; 32*4a64e381SAndroid Build Coastguard Workerdiff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h 33*4a64e381SAndroid Build Coastguard Workerindex 9675591..dd7864c 100644 34*4a64e381SAndroid Build Coastguard Worker--- a/mDNSPosix/mDNSPosix.h 35*4a64e381SAndroid Build Coastguard Worker+++ b/mDNSPosix/mDNSPosix.h 36*4a64e381SAndroid Build Coastguard Worker@@ -19,6 +19,7 @@ 37*4a64e381SAndroid Build Coastguard Worker #define __mDNSPlatformPosix_h 38*4a64e381SAndroid Build Coastguard Worker 39*4a64e381SAndroid Build Coastguard Worker #include <signal.h> 40*4a64e381SAndroid Build Coastguard Worker+#include <sys/socket.h> 41*4a64e381SAndroid Build Coastguard Worker #include <sys/time.h> 42*4a64e381SAndroid Build Coastguard Worker 43*4a64e381SAndroid Build Coastguard Worker #ifdef __cplusplus 44*4a64e381SAndroid Build Coastguard Worker@@ -40,6 +41,7 @@ struct PosixNetworkInterface 45*4a64e381SAndroid Build Coastguard Worker char * intfName; 46*4a64e381SAndroid Build Coastguard Worker PosixNetworkInterface * aliasIntf; 47*4a64e381SAndroid Build Coastguard Worker int index; 48*4a64e381SAndroid Build Coastguard Worker+ sa_family_t sa_family; 49*4a64e381SAndroid Build Coastguard Worker int multicastSocket4; 50*4a64e381SAndroid Build Coastguard Worker #if HAVE_IPV6 51*4a64e381SAndroid Build Coastguard Worker int multicastSocket6; 52*4a64e381SAndroid Build Coastguard Worker-- 53*4a64e381SAndroid Build Coastguard Worker2.41.0 54*4a64e381SAndroid Build Coastguard Worker 55