Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / net / core / neighbour.c
index fe2113f..50a8c73 100644 (file)
@@ -15,6 +15,7 @@
  *     Harald Welte            Add neighbour cache statistics like rtstat
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -29,7 +30,6 @@
 #include <net/neighbour.h>
 #include <net/dst.h>
 #include <net/sock.h>
-#include <net/netevent.h>
 #include <linux/rtnetlink.h>
 #include <linux/random.h>
 #include <linux/string.h>
@@ -755,7 +755,6 @@ static void neigh_timer_handler(unsigned long arg)
                        neigh->nud_state = NUD_STALE;
                        neigh->updated = jiffies;
                        neigh_suspect(neigh);
-                       notify = 1;
                }
        } else if (state & NUD_DELAY) {
                if (time_before_eq(now, 
@@ -764,7 +763,6 @@ static void neigh_timer_handler(unsigned long arg)
                        neigh->nud_state = NUD_REACHABLE;
                        neigh->updated = jiffies;
                        neigh_connect(neigh);
-                       notify = 1;
                        next = neigh->confirmed + neigh->parms->reachable_time;
                } else {
                        NEIGH_PRINTK2("neigh %p is probed.\n", neigh);
@@ -822,8 +820,6 @@ static void neigh_timer_handler(unsigned long arg)
 out:
                write_unlock(&neigh->lock);
        }
-       if (notify)
-               call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh);
 
 #ifdef CONFIG_ARPD
        if (notify && neigh->parms->app_probes)
@@ -931,7 +927,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
 {
        u8 old;
        int err;
+#ifdef CONFIG_ARPD
        int notify = 0;
+#endif
        struct net_device *dev;
        int update_isrouter = 0;
 
@@ -951,7 +949,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
                        neigh_suspect(neigh);
                neigh->nud_state = new;
                err = 0;
+#ifdef CONFIG_ARPD
                notify = old & NUD_VALID;
+#endif
                goto out;
        }
 
@@ -1023,7 +1023,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
                if (!(new & NUD_CONNECTED))
                        neigh->confirmed = jiffies -
                                      (neigh->parms->base_reachable_time << 1);
+#ifdef CONFIG_ARPD
                notify = 1;
+#endif
        }
        if (new == old)
                goto out;
@@ -1055,9 +1057,6 @@ out:
                        (neigh->flags & ~NTF_ROUTER);
        }
        write_unlock_bh(&neigh->lock);
-
-       if (notify)
-               call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh);
 #ifdef CONFIG_ARPD
        if (notify && neigh->parms->app_probes)
                neigh_app_notify(neigh);
@@ -1432,9 +1431,6 @@ int neigh_table_clear(struct neigh_table *tbl)
        kfree(tbl->phash_buckets);
        tbl->phash_buckets = NULL;
 
-       free_percpu(tbl->stats);
-       tbl->stats = NULL;
-
        return 0;
 }