aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-20 16:51:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-04-20 16:51:10 +0000
commitd0c78c4c9b92d4f87757e717de889b271e710a78 (patch)
tree1a749f4f21c4e4721b28a4a935fb5f879120c048
parent3bf0f97a5ce05a5c6d81cee4245fbe69dc71e44e (diff)
parent5e6f6115ed6f2368610c6386339cf18543c02aff (diff)
downloadmdnsresponder-d0c78c4c9b92d4f87757e717de889b271e710a78.tar.gz
Merge "Snap for 9979206 from 3b23452722a47212502217e5f4822899408c17db to sdk-release" into sdk-releaseplatform-tools-34.0.3
-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)