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:	Thu, 21 Aug 2008 17:28:05 +0200
From:	"Julius Volz" <juliusv@...gle.com>
To:	"Brian Haley" <brian.haley@...com>
Cc:	netdev@...r.kernel.org, lvs-devel@...r.kernel.org,
	horms@...ge.net.au, kaber@...sh.net, vbusam@...gle.com
Subject: Re: [PATCH RFC 08/24] IPVS: Make protocol handler functions support IPv6

On Thu, Aug 21, 2008 at 5:12 PM, Brian Haley <brian.haley@...com> wrote:
> Julius Volz wrote:
>>
>> Still, I think my original interpretation was correct? It's always
>> used with constant values and there are many usages similar to this:
>>
>> skb->protocol = __constant_htons(ETH_P_802_3);
>>
>> Someone feel free to correct me.
>
> I know it's a minor point, but look at tcp_ipv6.c:
>
>        if (skb->protocol == htons(ETH_P_IP))
>                return tcp_v4_conn_request(sk, skb);
>
> That's different from the code you quoted that's doing an assignment.
> __constant_htons() isn't used anywhere in an if() statement, although I did
> find a couple in the bonding driver that should be fixed.

Ok, maybe the problem with this is more what it says before the
definition of __constant_htons() in include/linux/byteorder.h?

----
/*
 * These helpers could be phased out over time as the base version
 * handles constant folding.
 */
---

Which is probably the reason why it shouldn't be used anymore? So
although it's probably doing the right thing already, I'll just change
it to htons() and everyone should be happy...

Julius

-- 
Google Switzerland GmbH
--
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