]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/netfilter/ipvs/ip_vs_ctl.c
netfilter: nf_tables: check for overflow of rule dlen field
[karo-tx-linux.git] / net / netfilter / ipvs / ip_vs_ctl.c
index b8295a430a5600d35b6de4163ba3b98e75c5f28c..ed99448671c3003374fc947bee6e91ab0f0d3fce 100644 (file)
@@ -2887,7 +2887,8 @@ static int ip_vs_genl_dump_service(struct sk_buff *skb,
        if (ip_vs_genl_fill_service(skb, svc) < 0)
                goto nla_put_failure;
 
-       return genlmsg_end(skb, hdr);
+       genlmsg_end(skb, hdr);
+       return 0;
 
 nla_put_failure:
        genlmsg_cancel(skb, hdr);
@@ -3079,7 +3080,8 @@ static int ip_vs_genl_dump_dest(struct sk_buff *skb, struct ip_vs_dest *dest,
        if (ip_vs_genl_fill_dest(skb, dest) < 0)
                goto nla_put_failure;
 
-       return genlmsg_end(skb, hdr);
+       genlmsg_end(skb, hdr);
+       return 0;
 
 nla_put_failure:
        genlmsg_cancel(skb, hdr);
@@ -3215,7 +3217,8 @@ static int ip_vs_genl_dump_daemon(struct sk_buff *skb, __u32 state,
        if (ip_vs_genl_fill_daemon(skb, state, mcast_ifn, syncid))
                goto nla_put_failure;
 
-       return genlmsg_end(skb, hdr);
+       genlmsg_end(skb, hdr);
+       return 0;
 
 nla_put_failure:
        genlmsg_cancel(skb, hdr);
@@ -3399,7 +3402,7 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info)
                if (udest.af == 0)
                        udest.af = svc->af;
 
-               if (udest.af != svc->af) {
+               if (udest.af != svc->af && cmd != IPVS_CMD_DEL_DEST) {
                        /* The synchronization protocol is incompatible
                         * with mixed family services
                         */