* [PATCH] Right prototype of __raw_v4_lookup()
@ 2006-05-27 21:09 Alexey Dobriyan
2006-06-06 4:07 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2006-05-27 21:09 UTC (permalink / raw)
To: netdev
All users pass 32-bit values as addresses and internally they're compared with
32-bit entities. So, change "laddr" and "raddr" types to __be32.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
include/net/raw.h | 2 +-
net/ipv4/raw.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/include/net/raw.h
+++ 1/include/net/raw.h
@@ -36,7 +36,7 @@ extern rwlock_t raw_v4_lock;
extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
- unsigned long raddr, unsigned long laddr,
+ __be32 raddr, __be32 laddr,
int dif);
extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash);
--- linux-vanilla/net/ipv4/raw.c
+++ linux-1/net/ipv4/raw.c
@@ -103,7 +103,7 @@ static void raw_v4_unhash(struct sock *s
}
struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
- unsigned long raddr, unsigned long laddr,
+ __be32 raddr, __be32 laddr,
int dif)
{
struct hlist_node *node;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Right prototype of __raw_v4_lookup()
2006-05-27 21:09 [PATCH] Right prototype of __raw_v4_lookup() Alexey Dobriyan
@ 2006-06-06 4:07 ` David Miller
2006-06-07 11:38 ` Alexey Dobriyan
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2006-06-06 4:07 UTC (permalink / raw)
To: adobriyan; +Cc: netdev
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sun, 28 May 2006 01:09:32 +0400
> All users pass 32-bit values as addresses and internally they're compared with
> 32-bit entities. So, change "laddr" and "raddr" types to __be32.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied.
Doesn't this mean that, at least eventually, we should change
the address members of inet_sock to __be32 as well?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Right prototype of __raw_v4_lookup()
2006-06-06 4:07 ` David Miller
@ 2006-06-07 11:38 ` Alexey Dobriyan
2006-06-19 1:34 ` Al Viro
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2006-06-07 11:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Mon, Jun 05, 2006 at 09:07:07PM -0700, David Miller wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> Date: Sun, 28 May 2006 01:09:32 +0400
>
> > All users pass 32-bit values as addresses and internally they're compared with
> > 32-bit entities. So, change "laddr" and "raddr" types to __be32.
> Applied.
>
> Doesn't this mean that, at least eventually, we should change
> the address members of inet_sock to __be32 as well?
I think, yes. Al Viro is sitting on terabytes of endian annotations in
networking code. See net-endian.b* branches at
git://git.kernel.org/pub/scm/linux/kernel/git/viro/bird.git
I don't know if he considers them ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Right prototype of __raw_v4_lookup()
2006-06-07 11:38 ` Alexey Dobriyan
@ 2006-06-19 1:34 ` Al Viro
0 siblings, 0 replies; 4+ messages in thread
From: Al Viro @ 2006-06-19 1:34 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: David Miller, netdev
On Wed, Jun 07, 2006 at 03:38:39PM +0400, Alexey Dobriyan wrote:
> I think, yes. Al Viro is sitting on terabytes of endian annotations in
> networking code. See net-endian.b* branches at
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/bird.git
> I don't know if he considers them ready.
I do not. I _am_ going to finish that in this cycle, though; this stuff
got stalled on some sparse modifications needed to teach the sucker how
to deal with the next biggest bunch of annotation problems. Need to
sort that out first; I do know how to deal with that mess, just need to
find time and do so.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-19 1:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 21:09 [PATCH] Right prototype of __raw_v4_lookup() Alexey Dobriyan
2006-06-06 4:07 ` David Miller
2006-06-07 11:38 ` Alexey Dobriyan
2006-06-19 1:34 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox