Skip to content

Commit

Permalink
[RTNETLINK]: Don't return error on no-metrics.
Browse files Browse the repository at this point in the history
Instead just cancel the nested attribute and return 0.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 22, 2006
1 parent 2809486 commit a57d27f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a57d27f

Please sign in to comment.