aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-10 16:38:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-10 16:38:49 +0000
commit3dd33aa0b7a6a0cf80a402331d890764f673db96 (patch)
treeae03dbb04b1f0d7fd885a0faf78204e6daa1f08f
parent3bf0f97a5ce05a5c6d81cee4245fbe69dc71e44e (diff)
parent1b6a5209da2fb1a5dcc611aa530611bb7eaa0f43 (diff)
downloadmdnsresponder-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.bp20
-rw-r--r--OWNERS2
-rw-r--r--mDNSPosix/mDNSPosix.c14
-rw-r--r--mDNSShared/PlatformCommon.c7
4 files changed, 22 insertions, 21 deletions
diff --git a/Android.bp b/Android.bp
index 0aba986..1d44087 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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__",
],
}
diff --git a/OWNERS b/OWNERS
index d95f549..5065af7 100644
--- a/OWNERS
+++ b/OWNERS
@@ -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; }