]> Pileus Git - ~andy/linux/blobdiff - include/net/dst.h
Merge Trond's bugfixes
[~andy/linux] / include / net / dst.h
index 621e3513ef5ed2c833a16902761b3d5c1ed2ebaf..9a7881066fb316b02fdd7ed52aaf84d038ded1f6 100644 (file)
@@ -396,11 +396,15 @@ static inline void dst_confirm(struct dst_entry *dst)
 static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,
                                   struct sk_buff *skb)
 {
-       struct hh_cache *hh;
+       const struct hh_cache *hh;
+
+       if (dst->pending_confirm) {
+               unsigned long now = jiffies;
 
-       if (unlikely(dst->pending_confirm)) {
-               n->confirmed = jiffies;
                dst->pending_confirm = 0;
+               /* avoid dirtying neighbour */
+               if (n->confirmed != now)
+                       n->confirmed = now;
        }
 
        hh = &n->hh;