diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-10 16:38:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-10 16:38:49 +0000 |
commit | 3dd33aa0b7a6a0cf80a402331d890764f673db96 (patch) | |
tree | ae03dbb04b1f0d7fd885a0faf78204e6daa1f08f | |
parent | 3bf0f97a5ce05a5c6d81cee4245fbe69dc71e44e (diff) | |
parent | 1b6a5209da2fb1a5dcc611aa530611bb7eaa0f43 (diff) | |
download | mdnsresponder-busytown-mac-infra-release.tar.gz |
Merge "Snap for 11819167 from 16b8fe9dd61436cc0941f256c9e3ed1321381393 to busytown-mac-infra-release" into busytown-mac-infra-releasebusytown-mac-infra-release
-rw-r--r-- | Android.bp | 20 | ||||
-rw-r--r-- | OWNERS | 2 | ||||
-rw-r--r-- | mDNSPosix/mDNSPosix.c | 14 | ||||
-rw-r--r-- | mDNSShared/PlatformCommon.c | 7 |
4 files changed, 22 insertions, 21 deletions
@@ -180,22 +180,8 @@ cc_library { "//apex_available:platform", "com.android.adbd", ], -} - -//########################### - -cc_binary { - name: "dnssd", - defaults: ["mdnsresponder_default_cflags"], - srcs: [ - "Clients/dns-sd.c", - "Clients/ClientCommon.c", - ], - - system_shared_libs: ["libc", "libdl"], - shared_libs: [ - "libmdnssd", - "libcutils", - "liblog", + visibility: [ + "//bootable/recovery/minadbd:__subpackages__", + "//packages/modules/adb:__subpackages__", ], } @@ -1,4 +1,4 @@ set noparent -file:platform/packages/modules/Connectivity:master:/OWNERS_core_networking +sanglardf@google.com include platform/packages/modules/adb:/OWNERS diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c index 28f4e06..fe899a6 100644 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c @@ -55,6 +55,7 @@ #if USES_NETLINK #include <asm/types.h> +#include <linux/if_arp.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> #else // USES_NETLINK @@ -1144,9 +1145,18 @@ mDNSlocal mDNSBool ProcessRoutingNotification(int sd) #endif // Process the NetLink message - if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK || - pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR) + if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_DELADDR || + pNLMsg->nlmsg_type == RTM_NEWADDR) + { result = mDNStrue; + } + else if (pNLMsg->nlmsg_type == RTM_NEWLINK) + { + // Fix for UWB start/stop causing mdns drop. See b/265207453 + struct ifinfomsg *pIfInfo = (struct ifinfomsg*) NLMSG_DATA(pNLMsg); + if (pIfInfo->ifi_family != AF_UNSPEC || pIfInfo->ifi_type != ARPHRD_IEEE802154) + result = mDNStrue; + } // Advance pNLMsg to the next message in the buffer if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) diff --git a/mDNSShared/PlatformCommon.c b/mDNSShared/PlatformCommon.c index 2fb530e..607a7e7 100644 --- a/mDNSShared/PlatformCommon.c +++ b/mDNSShared/PlatformCommon.c @@ -66,7 +66,12 @@ mDNSexport void mDNSPlatformSourceAddrForDest(mDNSAddr *const src, const mDNSAdd addr.a6.sin6_addr = *(struct in6_addr*)&dst->ip.v6; addr.a6.sin6_scope_id = 0; } - else return; + else + { + // __ANDROID__ : Fix fd leak + goto exit; + } + if ((connect(sock, &addr.s, inner_len)) < 0) { LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno)); goto exit; } |