Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1451
b: refs/heads/master
c: 92d63de
h: refs/heads/master
i:
  1449: e1e411f
  1447: 3dd9b84
v: v3
  • Loading branch information
Hideaki YOSHIFUJI authored and David S. Miller committed May 26, 2005
1 parent de70843 commit 60460a7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f872f0401d4b470990864fbf99c19130f25ad4d
refs/heads/master: 92d63decc0b6a5d600f792fcf5f3ff9718c09a3d
2 changes: 2 additions & 0 deletions trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ struct xfrm_dst
struct dst_entry *route;
u32 route_mtu_cached;
u32 child_mtu_cached;
u32 route_cookie;
u32 path_cookie;
};

static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv6/xfrm6_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int

xdst = (struct xfrm_dst *)dst1;
xdst->route = &rt->u.dst;
if (rt->rt6i_node)
xdst->route_cookie = rt->rt6i_node->fn_sernum;

dst1->next = dst_prev;
dst_prev = dst1;
Expand All @@ -137,6 +139,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int

dst_prev->child = &rt->u.dst;
dst->path = &rt->u.dst;
if (rt->rt6i_node)
((struct xfrm_dst *)dst)->path_cookie = rt->rt6i_node->fn_sernum;

*dst_p = dst;
dst = dst_prev;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ int xfrm_bundle_ok(struct xfrm_dst *first, struct flowi *fl, int family)
struct xfrm_dst *last;
u32 mtu;

if (!dst_check(dst->path, 0) ||
if (!dst_check(dst->path, ((struct xfrm_dst *)dst)->path_cookie) ||
(dst->dev && !netif_running(dst->dev)))
return 0;

Expand All @@ -1156,7 +1156,7 @@ int xfrm_bundle_ok(struct xfrm_dst *first, struct flowi *fl, int family)
xdst->child_mtu_cached = mtu;
}

if (!dst_check(xdst->route, 0))
if (!dst_check(xdst->route, xdst->route_cookie))
return 0;
mtu = dst_mtu(xdst->route);
if (xdst->route_mtu_cached != mtu) {
Expand Down

0 comments on commit 60460a7

Please sign in to comment.