]> granicus.if.org Git - ipset/commitdiff
Fix sparse warning
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 27 Nov 2014 06:47:06 +0000 (07:47 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 27 Nov 2014 06:47:06 +0000 (07:47 +0100)
"warning: cast to restricted __be32" warnings are fixed

kernel/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) {