5980 in-kernel inet_ntop should format IPv4 addresses like userland one
Review Request #622 — Created July 7, 2017 and submitted
This changes the format inet_ntop() uses for IPv4 addresses to be the
same as userland one (which makes more sense).
The list of current kernel's inet_ntop() consumers with comments:
The only consumer that requires attention is
usr/src/uts/common/io/scsi/adapters/iscsi/persistent.c as it uses the IP
addresses as keys into persistent storage, so I've added a wrapper there
keeping old inet_ntop() behaviour - adding the logic which would rewrite
the nvlist names for such entries is just not worth it IMO.
Everything else is using inet_ntop() to print log messages, or was
already using a wrapper to fix the format (like SMB and iscsit).
Checked that iscsiadm can delete/update the entries in persistent storage that were created in previous BE.
Why did you remove this check? Without it
snprintf()below can silently truncate result.
With this check the function will return 'bogus_ip' if size is too small.
So this patch changes function behaviour whereas the patch should be just refactoring as I understand. Or you wanted to change this behaviour intentionally ?