Fix spurious white space introduced in r301059

r301059 accidently introduced a subtle change for point to point interfaces
where an extra space is inserted before the netmask. This can cause issues
for scripts that parse ifconfig output.

Submitted by:	Kevin Bowling <kevin.bowling@kev009.com>
Reviewed by:	hiren
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8199
This commit is contained in:
Allan Jude 2016-10-09 03:20:58 +00:00
parent 3f3d4d6100
commit b91a14131c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306896
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ in_status(int s __unused, const struct ifaddrs *ifa)
sin = (struct sockaddr_in *)ifa->ifa_dstaddr;
if (sin == NULL)
sin = &null_sin;
printf(" --> %s ", inet_ntoa(sin->sin_addr));
printf(" --> %s", inet_ntoa(sin->sin_addr));
}
sin = (struct sockaddr_in *)ifa->ifa_netmask;

View file

@ -237,7 +237,7 @@ in6_status(int s __unused, const struct ifaddrs *ifa)
if (error != 0)
inet_ntop(AF_INET6, &sin->sin6_addr, addr_buf,
sizeof(addr_buf));
printf(" --> %s ", addr_buf);
printf(" --> %s", addr_buf);
}
}