Commit a57d27fc authored by David S. Miller's avatar David S. Miller

[RTNETLINK]: Don't return error on no-metrics.

Instead just cancel the nested attribute and return 0.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28094864
...@@ -202,8 +202,10 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics) ...@@ -202,8 +202,10 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
} }
} }
if (!valid) if (!valid) {
goto nla_put_failure; nla_nest_cancel(skb, mx);
return 0;
}
return nla_nest_end(skb, mx); return nla_nest_end(skb, mx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment