Skip to content

Commit

Permalink
Fix spurious white space introduced in r301059
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed by:	hiren
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8199
  • Loading branch information
allanjude committed Oct 9, 2016
1 parent 3f3d4d6 commit b91a141
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sbin/ifconfig/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sbin/ifconfig/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b91a141

Please sign in to comment.