netfilter: ipset: Fix sparse warning
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sat, 2 May 2015 17:27:56 +0000 (19:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 May 2015 11:25:44 +0000 (13:25 +0200)
"warning: cast to restricted __be32" warnings are fixed

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_hash_ipmark.c

index 7abf9788cfa850705bc2e5240751d8443a2a558e..2ec4ac5bc672323c3a41ef407556dd805d564d9c 100644 (file)
@@ -128,7 +128,7 @@ hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[],
        if (ret)
                return ret;
 
-       e.mark = ntohl(nla_get_u32(tb[IPSET_ATTR_MARK]));
+       e.mark = ntohl(nla_get_be32(tb[IPSET_ATTR_MARK]));
        e.mark &= h->markmask;
 
        if (adt == IPSET_TEST ||
@@ -263,7 +263,7 @@ hash_ipmark6_uadt(struct ip_set *set, struct nlattr *tb[],
        if (ret)
                return ret;
 
-       e.mark = ntohl(nla_get_u32(tb[IPSET_ATTR_MARK]));
+       e.mark = ntohl(nla_get_be32(tb[IPSET_ATTR_MARK]));
        e.mark &= h->markmask;
 
        if (adt == IPSET_TEST) {