diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-28 01:40:27 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-29 01:02:24 (GMT) |
commit | 45d60b9e29556a7831812ec338d82f4d3a4145f8 (patch) | |
tree | 9a75754845b8935483464dc6470ac5b340385c12 /net/ipv4 | |
parent | 81f7bf6cbaca02c034b0393c51fc22b29cba20f7 (diff) | |
download | linux-fsl-qoriq-45d60b9e29556a7831812ec338d82f4d3a4145f8.tar.xz |
[IPV4]: FRA_{DST,SRC} annotated
use be32 netlink accessors for those
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_rules.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index f2d4070..0852b9c 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -215,10 +215,10 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb, } if (tb[FRA_SRC]) - rule4->src = nla_get_u32(tb[FRA_SRC]); + rule4->src = nla_get_be32(tb[FRA_SRC]); if (tb[FRA_DST]) - rule4->dst = nla_get_u32(tb[FRA_DST]); + rule4->dst = nla_get_be32(tb[FRA_DST]); #ifdef CONFIG_IP_ROUTE_FWMARK if (tb[FRA_FWMARK]) { @@ -277,10 +277,10 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, return 0; #endif - if (tb[FRA_SRC] && (rule4->src != nla_get_u32(tb[FRA_SRC]))) + if (tb[FRA_SRC] && (rule4->src != nla_get_be32(tb[FRA_SRC]))) return 0; - if (tb[FRA_DST] && (rule4->dst != nla_get_u32(tb[FRA_DST]))) + if (tb[FRA_DST] && (rule4->dst != nla_get_be32(tb[FRA_DST]))) return 0; return 1; @@ -305,10 +305,10 @@ static int fib4_rule_fill(struct fib_rule *rule, struct sk_buff *skb, #endif if (rule4->dst_len) - NLA_PUT_U32(skb, FRA_DST, rule4->dst); + NLA_PUT_BE32(skb, FRA_DST, rule4->dst); if (rule4->src_len) - NLA_PUT_U32(skb, FRA_SRC, rule4->src); + NLA_PUT_BE32(skb, FRA_SRC, rule4->src); #ifdef CONFIG_NET_CLS_ROUTE if (rule4->tclassid) |