]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
net: rtnetlink: ignore NETDEV_PRE_TYPE_CHANGE in rtnetlink_event()
authorPatrick McHardy <kaber@trash.net>
Fri, 19 Mar 2010 04:42:24 +0000 (04:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2010 01:31:34 +0000 (18:31 -0700)
Ignore the new NETDEV_PRE_TYPE_CHANGE event in rtnetlink_event() since
there have been no changes userspace needs to be notified of.

Also add a comment to the netdev notifier event definitions to remind
people to update the exclusion list when adding new event types.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/notifier.h
net/core/rtnetlink.c

index f3635fc6e9427198a5908b6d9c6eb0ad104b1265..9c5d3fad01f37d99174d372beec1aac21ff6eaa0 100644 (file)
@@ -182,7 +182,10 @@ static inline int notifier_to_errno(int ret)
  *     VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
  */
  
-/* netdevice notifier chain */
+/* netdevice notifier chain. Please remember to update the rtnetlink
+ * notification exclusion list in rtnetlink_event() when adding new
+ * types.
+ */
 #define NETDEV_UP      0x0001  /* For now you can't veto a device up/down */
 #define NETDEV_DOWN    0x0002
 #define NETDEV_REBOOT  0x0003  /* Tell a protocol stack a network interface
index e1121f0bca6aa89f5dab8e5ad1e13c4d19d1d109..ffc6cf3495acd6f2e4d75a03e13169ed1215452a 100644 (file)
@@ -1513,6 +1513,7 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi
        case NETDEV_POST_INIT:
        case NETDEV_REGISTER:
        case NETDEV_CHANGE:
+       case NETDEV_PRE_TYPE_CHANGE:
        case NETDEV_GOING_DOWN:
        case NETDEV_UNREGISTER:
        case NETDEV_UNREGISTER_BATCH: