lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Jul 2013 19:16:14 -0700
From:	Joe Perches <joe@...ches.com>
To:	Cong Wang <amwang@...hat.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next 0/7] net: introduce generic type and helpers
 for IP address

On Tue, 2013-07-23 at 10:00 +0800, Cong Wang wrote:
> On Mon, 2013-07-22 at 13:44 -0700, Joe Perches wrote:
> > 
> > I see no reason why vsprint's support for
> > "struct sockaddr *" %pIS should be removed.
> > 
> > %pIS and %pIA can both exist.

> Because there is no need to keep both of them, struct sockaddr can be
> safely converted to union inet_addr.

That's a bit fragile.
The cost of keeping %pIS is pretty low.

Also, if there is ever a check for %p<type>,
then using:

	struct sockaddr *foo = bar;
	...
	snprintf(buf, len, "%pIA", foo)

would need foo to be cast first to union inet_addr *

	snprintf(buf, len, "%pIA", (union inet_addr *)foo);


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ