aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-26 10:15:17 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-26 10:15:17 +0000
commit0cf27e145758fa416ace9983c451c6484c103f40 (patch)
tree1a749f4f21c4e4721b28a4a935fb5f879120c048
parente992580e78820db1d891e9754e3ec25fec1c8d06 (diff)
parent7036dd3feed7a39d123a3243d66e849dcacb3e11 (diff)
downloadmdnsresponder-0cf27e145758fa416ace9983c451c6484c103f40.tar.gz
Snap for 10209341 from 7036dd3feed7a39d123a3243d66e849dcacb3e11 to mainline-healthfitness-release
Change-Id: I3042e44e281adb280e2bedf94cd094f9f9b1c6f0
-rw-r--r--mDNSPosix/mDNSPosix.c14
1 files changed, 12 insertions, 2 deletions
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)