diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-08-23 09:20:14 +0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-23 01:55:40 +0400 |
commit | a57d27fc7107ddcc655ba2812cfebfce3163fd62 (patch) | |
tree | 98f5e6816bf1771e9489aa50e781c21bb36d21ca /net/core | |
parent | 2809486424df58043b380aeb9d7f402c031c46f6 (diff) | |
download | linux-a57d27fc7107ddcc655ba2812cfebfce3163fd62.tar.xz |
[RTNETLINK]: Don't return error on no-metrics.
Instead just cancel the nested attribute and return 0.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index eeff0b23e944..8f225499e32e 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); |