From: David S. Miller Date: Wed, 23 Aug 2006 05:20:14 +0000 (-0700) Subject: [RTNETLINK]: Don't return error on no-metrics. X-Git-Tag: v2.6.19-rc1~1272^2~206 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a57d27fc7107ddcc655ba2812cfebfce3163fd62;p=linux-2.6 [RTNETLINK]: Don't return error on no-metrics. Instead just cancel the nested attribute and return 0. Signed-off-by: David S. Miller --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index eeff0b23e9..8f225499e3 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -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);