summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_rules.c
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-03-29 16:59:26 +0200
committerDavid S. Miller <davem@davemloft.net>2015-03-31 13:58:35 -0400
commit67b61f6c130a05b2cd4c3dfded49a751ff42c534 (patch)
tree2a4deef870f2c01f36a27cfb7501e726d833880c /net/ipv4/fib_rules.c
parent930345ea630405aa6e6f42efcb149c3f360a6b67 (diff)
downloadtalos-obmc-linux-67b61f6c130a05b2cd4c3dfded49a751ff42c534.tar.gz
talos-obmc-linux-67b61f6c130a05b2cd4c3dfded49a751ff42c534.zip
netlink: implement nla_get_in_addr and nla_get_in6_addr
Those are counterparts to nla_put_in_addr and nla_put_in6_addr. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r--net/ipv4/fib_rules.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index edfea0deec43..8162dd8e86d7 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -194,10 +194,10 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
}
if (frh->src_len)
- rule4->src = nla_get_be32(tb[FRA_SRC]);
+ rule4->src = nla_get_in_addr(tb[FRA_SRC]);
if (frh->dst_len)
- rule4->dst = nla_get_be32(tb[FRA_DST]);
+ rule4->dst = nla_get_in_addr(tb[FRA_DST]);
#ifdef CONFIG_IP_ROUTE_CLASSID
if (tb[FRA_FLOW]) {
@@ -260,10 +260,10 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh,
return 0;
#endif
- if (frh->src_len && (rule4->src != nla_get_be32(tb[FRA_SRC])))
+ if (frh->src_len && (rule4->src != nla_get_in_addr(tb[FRA_SRC])))
return 0;
- if (frh->dst_len && (rule4->dst != nla_get_be32(tb[FRA_DST])))
+ if (frh->dst_len && (rule4->dst != nla_get_in_addr(tb[FRA_DST])))
return 0;
return 1;
OpenPOWER on IntegriCloud