net: RTNETLINK adjusting values of min_ifinfo_dump_size
authorStefan Gula <steweg@gmail.com>
Thu, 26 Jan 2012 11:01:06 +0000 (11:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jan 2012 21:35:57 +0000 (16:35 -0500)
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>
net/core/rtnetlink.c

index f16444bc6cbb1ca25e57df0d18e7d267ceedf1f9..65aebd45002786f4c00f6a5b4bc6ac45026f7f86 100644 (file)
@@ -1509,6 +1509,9 @@ errout:
 
        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;
 }