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:	Sun, 17 Feb 2013 02:47:18 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Cc:	netdev@...r.kernel.org, brian.haley@...com
Subject: Re: [PATCH net-next v2 1/4] ipv6: introduce new type ipv6_addr_props to hold ipv6 address type and scope

On Sun, Feb 17, 2013 at 08:31:52AM +0900, YOSHIFUJI Hideaki wrote:
> >> -extern int __ipv6_addr_type(const struct in6_addr *addr);
> >> -static inline int ipv6_addr_type(const struct in6_addr *addr)
> >> +struct ipv6_addr_props {
> >> +	u16 type;
> >> +	s16 scope;
> >> +};
> >> +
> >> +extern struct ipv6_addr_props __ipv6_addr_props(const struct in6_addr *addr);
> >> +static inline unsigned int ipv6_addr_type(const struct in6_addr *addr)
> >>  {
> >> -	return __ipv6_addr_type(addr) & 0xffff;
> >> +	return __ipv6_addr_props(addr).type;
> >>  }
> >>  
> >>  static inline int ipv6_addr_scope(const struct in6_addr *addr)
> >>  {
> >> -	return __ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK;
> >> +	return __ipv6_addr_props(addr).scope;
> >>  }
> >>  
> > 
> > NAK.  This does not return correct value as before.
> > If you are going to covert this, please do not try to
> > change usage of inlines.  
> 
> I meant
> 
> struct ipv6_addrtype {
> 	__u16 type;
> 	__s16 scope;
> };
> 
> struct ipv6_addrtype __ipv6_addr_type(const struct in6_addr *addr);
> int ipv6_addr_type(const struct in6_addr *addr)
> {
> 	return __ipv6_addr_type(addr).type;
> }
> 
> And most users should not be touched except for it type name
> (int => struct addrtype).

Sorry, I am a bit confused. The missing '& IPV6_ADDR_SCOPE_MASK' is clearly a
bug. I implied a bitmask for the IPV6_ADDR_SCOPE_* macros. But I don't
understand to what you do refer in your second mail.

--
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