Skip to content

Commit

Permalink
net: RTNETLINK adjusting values of min_ifinfo_dump_size
Browse files Browse the repository at this point in the history
Setting link parameters on a netdevice changes the value
of if_nlmsg_size(), therefore it is necessary to recalculate
min_ifinfo_dump_size.

Signed-off-by: Stefan Gula <steweg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
steweg authored and davem330 committed Jan 26, 2012
1 parent f2b3ee9 commit f18da14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,9 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,

if (send_addr_notify)
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
min_ifinfo_dump_size = max_t(u16, if_nlmsg_size(dev),
min_ifinfo_dump_size);

return err;
}

Expand Down

0 comments on commit f18da14

Please sign in to comment.