diff options
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 56a20f014b8..63bd8866518 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -178,14 +178,14 @@ rtattr_failure: | |||
178 | 178 | ||
179 | 179 | ||
180 | static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | 180 | static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, |
181 | int type, u32 pid, u32 seq, u32 change) | 181 | int type, u32 pid, u32 seq, u32 change, |
182 | unsigned int flags) | ||
182 | { | 183 | { |
183 | struct ifinfomsg *r; | 184 | struct ifinfomsg *r; |
184 | struct nlmsghdr *nlh; | 185 | struct nlmsghdr *nlh; |
185 | unsigned char *b = skb->tail; | 186 | unsigned char *b = skb->tail; |
186 | 187 | ||
187 | nlh = NLMSG_PUT(skb, pid, seq, type, sizeof(*r)); | 188 | nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); |
188 | if (pid) nlh->nlmsg_flags |= NLM_F_MULTI; | ||
189 | r = NLMSG_DATA(nlh); | 189 | r = NLMSG_DATA(nlh); |
190 | r->ifi_family = AF_UNSPEC; | 190 | r->ifi_family = AF_UNSPEC; |
191 | r->ifi_type = dev->type; | 191 | r->ifi_type = dev->type; |
@@ -275,7 +275,10 @@ static int rtnetlink_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *c | |||
275 | for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) { | 275 | for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) { |
276 | if (idx < s_idx) | 276 | if (idx < s_idx) |
277 | continue; | 277 | continue; |
278 | if (rtnetlink_fill_ifinfo(skb, dev, RTM_NEWLINK, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 0) <= 0) | 278 | if (rtnetlink_fill_ifinfo(skb, dev, RTM_NEWLINK, |
279 | NETLINK_CB(cb->skb).pid, | ||
280 | cb->nlh->nlmsg_seq, 0, | ||
281 | NLM_F_MULTI) <= 0) | ||
279 | break; | 282 | break; |
280 | } | 283 | } |
281 | read_unlock(&dev_base_lock); | 284 | read_unlock(&dev_base_lock); |
@@ -449,7 +452,7 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change) | |||
449 | if (!skb) | 452 | if (!skb) |
450 | return; | 453 | return; |
451 | 454 | ||
452 | if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0, change) < 0) { | 455 | if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0, change, 0) < 0) { |
453 | kfree_skb(skb); | 456 | kfree_skb(skb); |
454 | return; | 457 | return; |
455 | } | 458 | } |