LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] FRA_{DST,SRC} are le16 for decnet
@ 2007-02-09 18:13 Al Viro
  2007-02-09 23:47 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-02-09 18:13 UTC (permalink / raw)
  To: torvalds; +Cc: davem, linux-kernel


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 net/decnet/dn_rules.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index e32d0c3..b6c98ac 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -151,10 +151,10 @@ static int dn_fib_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
 	}
 
 	if (tb[FRA_SRC])
-		r->src = nla_get_u16(tb[FRA_SRC]);
+		r->src = nla_get_le16(tb[FRA_SRC]);
 
 	if (tb[FRA_DST])
-		r->dst = nla_get_u16(tb[FRA_DST]);
+		r->dst = nla_get_le16(tb[FRA_DST]);
 
 	r->src_len = frh->src_len;
 	r->srcmask = dnet_make_mask(r->src_len);
@@ -176,10 +176,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
 	if (frh->dst_len && (r->dst_len != frh->dst_len))
 		return 0;
 
-	if (tb[FRA_SRC] && (r->src != nla_get_u16(tb[FRA_SRC])))
+	if (tb[FRA_SRC] && (r->src != nla_get_le16(tb[FRA_SRC])))
 		return 0;
 
-	if (tb[FRA_DST] && (r->dst != nla_get_u16(tb[FRA_DST])))
+	if (tb[FRA_DST] && (r->dst != nla_get_le16(tb[FRA_DST])))
 		return 0;
 
 	return 1;
@@ -214,9 +214,9 @@ static int dn_fib_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
 	frh->tos = 0;
 
 	if (r->dst_len)
-		NLA_PUT_U16(skb, FRA_DST, r->dst);
+		NLA_PUT_LE16(skb, FRA_DST, r->dst);
 	if (r->src_len)
-		NLA_PUT_U16(skb, FRA_SRC, r->src);
+		NLA_PUT_LE16(skb, FRA_SRC, r->src);
 
 	return 0;
 
-- 
1.5.0-rc2.GIT



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] FRA_{DST,SRC} are le16 for decnet
  2007-02-09 18:13 [PATCH] FRA_{DST,SRC} are le16 for decnet Al Viro
@ 2007-02-09 23:47 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-02-09 23:47 UTC (permalink / raw)
  To: viro; +Cc: torvalds, linux-kernel

From: Al Viro <viro@ftp.linux.org.uk>
Date: Fri, 09 Feb 2007 18:13:37 +0000

> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>  net/decnet/dn_rules.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-09 23:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 18:13 [PATCH] FRA_{DST,SRC} are le16 for decnet Al Viro
2007-02-09 23:47 ` David 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).