===== include/net/dst.h 1.27 vs edited ===== --- 1.27/include/net/dst.h 2005-03-07 16:33:59 +11:00 +++ edited/include/net/dst.h 2005-03-07 21:06:13 +11:00 @@ -259,6 +259,15 @@ } } +static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) +{ + dst_hold(dst); + if (dst->obsolete) + dst = dst->ops->check(dst, cookie); + dst_release(dst); + return dst; +} + extern void dst_init(void); struct flowi; ===== net/xfrm/xfrm_policy.c 1.70 vs edited ===== --- 1.70/net/xfrm/xfrm_policy.c 2005-03-07 21:17:35 +11:00 +++ edited/net/xfrm/xfrm_policy.c 2005-03-07 21:26:28 +11:00 @@ -1147,7 +1147,7 @@ struct xfrm_dst *last; u32 mtu; - if (dst->path->obsolete > 0 || + if (!dst_check(dst->path, 0) || (dst->dev && !netif_running(dst->dev))) return 0; @@ -1167,6 +1167,8 @@ xdst->child_mtu_cached = mtu; } + if (!dst_check(xdst->route, 0)) + return 0; mtu = dst_pmtu(xdst->route); if (xdst->route_mtu_cached != mtu) { last = xdst;