aboutsummaryrefslogtreecommitdiff
path: root/mDNSPosix
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2016-07-29 17:25:23 -0700
committerEtan Cohen <etancohen@google.com>2016-09-08 17:08:08 -0700
commitb2ac0e08433eb1221321ac799629784a93843d9a (patch)
tree9c9fc4090a22e3cc2c32e2a02910d1079764dcee /mDNSPosix
parentf93d4864cddabf602f78069e35fdc7431536d26f (diff)
downloadmdnsresponder-b2ac0e08433eb1221321ac799629784a93843d9a.tar.gz
[mDNS] Support interface names larger than 8 characters
Interface names >8 character would cause the IPv6 interface enumeration for mDNS to fail. None of those interfaces would get mDNS packets. (cherry-pick of commit db3e830f3f3dbc8e4d545785db4ed01e3e1cc382) Bug: 30101764 Change-Id: I761422e53d787c7e50866c1bc87eb5d2a4e95b0e
Diffstat (limited to 'mDNSPosix')
-rwxr-xr-xmDNSPosix/mDNSUNP.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
index c3d3366..5379b6b 100755
--- a/mDNSPosix/mDNSUNP.c
+++ b/mDNSPosix/mDNSUNP.c
@@ -86,7 +86,7 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
FILE *fp = NULL;
char addr[8][5];
int flags, myflags, index, plen, scope;
- char ifname[9], lastname[IFNAMSIZ];
+ char ifname[IFNAMSIZ], lastname[IFNAMSIZ];
char addr6[32+7+1]; /* don't forget the seven ':' */
struct addrinfo hints, *res0;
struct sockaddr_in6 *sin6;
@@ -106,7 +106,7 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
goto gotError;
}
while (fscanf(fp,
- "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %8s\n",
+ "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %15s\n",
addr[0],addr[1],addr[2],addr[3],
addr[4],addr[5],addr[6],addr[7],
&index, &plen, &scope, &flags, ifname) != EOF) {