aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index d4bcdcc68e92..5ace48926b19 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1483,7 +1483,10 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
1483 [IFLA_LINKINFO] = { .type = NLA_NESTED }, 1483 [IFLA_LINKINFO] = { .type = NLA_NESTED },
1484 [IFLA_NET_NS_PID] = { .type = NLA_U32 }, 1484 [IFLA_NET_NS_PID] = { .type = NLA_U32 },
1485 [IFLA_NET_NS_FD] = { .type = NLA_U32 }, 1485 [IFLA_NET_NS_FD] = { .type = NLA_U32 },
1486 [IFLA_IFALIAS] = { .type = NLA_STRING, .len = IFALIASZ-1 }, 1486 /* IFLA_IFALIAS is a string, but policy is set to NLA_BINARY to
1487 * allow 0-length string (needed to remove an alias).
1488 */
1489 [IFLA_IFALIAS] = { .type = NLA_BINARY, .len = IFALIASZ - 1 },
1487 [IFLA_VFINFO_LIST] = {. type = NLA_NESTED }, 1490 [IFLA_VFINFO_LIST] = {. type = NLA_NESTED },
1488 [IFLA_VF_PORTS] = { .type = NLA_NESTED }, 1491 [IFLA_VF_PORTS] = { .type = NLA_NESTED },
1489 [IFLA_PORT_SELF] = { .type = NLA_NESTED }, 1492 [IFLA_PORT_SELF] = { .type = NLA_NESTED },
@@ -2093,7 +2096,7 @@ static int do_setlink(const struct sk_buff *skb,
2093 dev->tx_queue_len = orig_len; 2096 dev->tx_queue_len = orig_len;
2094 goto errout; 2097 goto errout;
2095 } 2098 }
2096 status |= DO_SETLINK_NOTIFY; 2099 status |= DO_SETLINK_MODIFIED;
2097 } 2100 }
2098 } 2101 }
2099 2102
@@ -2248,7 +2251,7 @@ static int do_setlink(const struct sk_buff *skb,
2248 2251
2249errout: 2252errout:
2250 if (status & DO_SETLINK_MODIFIED) { 2253 if (status & DO_SETLINK_MODIFIED) {
2251 if (status & DO_SETLINK_NOTIFY) 2254 if ((status & DO_SETLINK_NOTIFY) == DO_SETLINK_NOTIFY)
2252 netdev_state_change(dev); 2255 netdev_state_change(dev);
2253 2256
2254 if (err < 0) 2257 if (err < 0)
@@ -4279,13 +4282,17 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi
4279 4282
4280 switch (event) { 4283 switch (event) {
4281 case NETDEV_REBOOT: 4284 case NETDEV_REBOOT:
4285 case NETDEV_CHANGEMTU:
4282 case NETDEV_CHANGEADDR: 4286 case NETDEV_CHANGEADDR:
4283 case NETDEV_CHANGENAME: 4287 case NETDEV_CHANGENAME:
4284 case NETDEV_FEAT_CHANGE: 4288 case NETDEV_FEAT_CHANGE:
4285 case NETDEV_BONDING_FAILOVER: 4289 case NETDEV_BONDING_FAILOVER:
4290 case NETDEV_POST_TYPE_CHANGE:
4286 case NETDEV_NOTIFY_PEERS: 4291 case NETDEV_NOTIFY_PEERS:
4292 case NETDEV_CHANGEUPPER:
4287 case NETDEV_RESEND_IGMP: 4293 case NETDEV_RESEND_IGMP:
4288 case NETDEV_CHANGEINFODATA: 4294 case NETDEV_CHANGEINFODATA:
4295 case NETDEV_CHANGE_TX_QUEUE_LEN:
4289 rtmsg_ifinfo_event(RTM_NEWLINK, dev, 0, rtnl_get_event(event), 4296 rtmsg_ifinfo_event(RTM_NEWLINK, dev, 0, rtnl_get_event(event),
4290 GFP_KERNEL); 4297 GFP_KERNEL);
4291 break; 4298 break;