]> err.no Git - linux-2.6/commitdiff
[RTNETLINK]: Don't return error on no-metrics.
authorDavid S. Miller <davem@sunset.davemloft.net>
Wed, 23 Aug 2006 05:20:14 +0000 (22:20 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 21:55:40 +0000 (14:55 -0700)
Instead just cancel the nested attribute and return 0.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index eeff0b23e944cfa5802205e46fe423665df22f58..8f225499e32e12cb654b2904245877d12adbc9a2 100644 (file)
@@ -202,8 +202,10 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
                }
        }
 
-       if (!valid)
-               goto nla_put_failure;
+       if (!valid) {
+               nla_nest_cancel(skb, mx);
+               return 0;
+       }
 
        return nla_nest_end(skb, mx);