diff options
Diffstat (limited to 'net/core/rtnetlink.c')
-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 0958c7be2c22..f679c7a7d761 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -3333,6 +3333,7 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) | |||
3333 | int idx; | 3333 | int idx; |
3334 | int s_idx = cb->family; | 3334 | int s_idx = cb->family; |
3335 | int type = cb->nlh->nlmsg_type - RTM_BASE; | 3335 | int type = cb->nlh->nlmsg_type - RTM_BASE; |
3336 | int ret = 0; | ||
3336 | 3337 | ||
3337 | if (s_idx == 0) | 3338 | if (s_idx == 0) |
3338 | s_idx = 1; | 3339 | s_idx = 1; |
@@ -3365,12 +3366,13 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) | |||
3365 | cb->prev_seq = 0; | 3366 | cb->prev_seq = 0; |
3366 | cb->seq = 0; | 3367 | cb->seq = 0; |
3367 | } | 3368 | } |
3368 | if (dumpit(skb, cb)) | 3369 | ret = dumpit(skb, cb); |
3370 | if (ret < 0) | ||
3369 | break; | 3371 | break; |
3370 | } | 3372 | } |
3371 | cb->family = idx; | 3373 | cb->family = idx; |
3372 | 3374 | ||
3373 | return skb->len; | 3375 | return skb->len ? : ret; |
3374 | } | 3376 | } |
3375 | 3377 | ||
3376 | struct sk_buff *rtmsg_ifinfo_build_skb(int type, struct net_device *dev, | 3378 | struct sk_buff *rtmsg_ifinfo_build_skb(int type, struct net_device *dev, |