* [PATCH]: fixed typo of reassembly.c
@ 2004-09-30 10:23 Yasuyuki Kozakai
2004-10-01 22:19 ` David S. Miller
0 siblings, 1 reply; 4+ messages in thread
From: Yasuyuki Kozakai @ 2004-09-30 10:23 UTC (permalink / raw)
To: netdev; +Cc: usagi-core
Hi,
This patch fixes byte ordering. Please apply this.
Signed-off-by: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Regards,
diff -X dontdiff -Nurp linux-2.6.9-rc3/net/ipv6/reassembly.c linux-2.6.9-rc3-fixed/net/ipv6/reassembly.c
--- linux-2.6.9-rc3/net/ipv6/reassembly.c 2004-09-30 18:45:24.014851224 +0900
+++ linux-2.6.9-rc3-fixed/net/ipv6/reassembly.c 2004-09-30 18:51:58.019953344 +0900
@@ -665,7 +665,7 @@ static int ip6_frag_reasm(struct frag_qu
head->next = NULL;
head->dev = dev;
head->stamp = fq->stamp;
- head->nh.ipv6h->payload_len = ntohs(payload_len);
+ head->nh.ipv6h->payload_len = htons(payload_len);
*skb_in = head;
-----------------------------------------------------------------
Yasuyuki KOZAKAI @ USAGI Project <yasuyuki.kozakai@toshiba.co.jp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]: fixed typo of reassembly.c
2004-09-30 10:23 [PATCH]: fixed typo of reassembly.c Yasuyuki Kozakai
@ 2004-10-01 22:19 ` David S. Miller
2004-10-02 5:02 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: David S. Miller @ 2004-10-01 22:19 UTC (permalink / raw)
To: Yasuyuki Kozakai; +Cc: netdev, usagi-core
On Thu, 30 Sep 2004 19:23:26 +0900 (JST)
Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> wrote:
> This patch fixes byte ordering. Please apply this.
It is textual fix only, do you realize this?
Both ntohs() and htons() perform the same transformation
on a 16-bit data item. It really does not matter which
one you actually use, in practice.
I will apply your patch anyways, I just wanted to be
clear that this does not actually fix any bug. :-)
THanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]: fixed typo of reassembly.c
2004-10-01 22:19 ` David S. Miller
@ 2004-10-02 5:02 ` Herbert Xu
2004-10-02 6:38 ` David S. Miller
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2004-10-02 5:02 UTC (permalink / raw)
To: David S. Miller; +Cc: yasuyuki.kozakai, netdev, usagi-core
David S. Miller <davem@davemloft.net> wrote:
>
> It is textual fix only, do you realize this?
> Both ntohs() and htons() perform the same transformation
> on a 16-bit data item. It really does not matter which
> one you actually use, in practice.
It might make a difference in future if the sparse people decide to
annotate its arguments/return values.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]: fixed typo of reassembly.c
2004-10-02 5:02 ` Herbert Xu
@ 2004-10-02 6:38 ` David S. Miller
0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-10-02 6:38 UTC (permalink / raw)
To: Herbert Xu; +Cc: yasuyuki.kozakai, netdev, usagi-core
On Sat, 02 Oct 2004 15:02:22 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> David S. Miller <davem@davemloft.net> wrote:
> >
> > It is textual fix only, do you realize this?
> > Both ntohs() and htons() perform the same transformation
> > on a 16-bit data item. It really does not matter which
> > one you actually use, in practice.
>
> It might make a difference in future if the sparse people decide to
> annotate its arguments/return values.
That's true. Al Viro has done this on the filesystems
and "cpu_to_{be,le}{16,32,64}()" et al. interfaces.
I'm sure he'll hit the networking before long.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-02 6:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-30 10:23 [PATCH]: fixed typo of reassembly.c Yasuyuki Kozakai
2004-10-01 22:19 ` David S. Miller
2004-10-02 5:02 ` Herbert Xu
2004-10-02 6:38 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).