Bugzilla – Attachment 59102 Details for
Bug 117749
IPsec crashes kernel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Test Patch
xfrm-endless-loop (text/plain), 1.92 KB, created by
Olaf Kirch
on 2005-11-30 10:47:20 UTC
(
hide
)
Description:
Test Patch
Filename:
MIME Type:
Creator:
Olaf Kirch
Created:
2005-11-30 10:47:20 UTC
Size:
1.92 KB
patch
obsolete
>Index: xfrm/xfrm_policy.c >=================================================================== >--- xfrm.orig/xfrm_policy.c 2005-11-17 10:38:26.000000000 +0100 >+++ xfrm/xfrm_policy.c 2005-11-30 11:44:53.000000000 +0100 >@@ -742,7 +742,14 @@ int xfrm_lookup(struct dst_entry **dst_p > int err; > u32 genid; > u16 family = dst_orig->ops->family; >+ int loops = 0; >+ > restart: >+ if (unlikely(++loops > 10)) { >+ err = -EHOSTUNREACH; >+ goto error; >+ } >+ > genid = atomic_read(&flow_cache_genid); > policy = NULL; > if (sk && sk->sk_policy[1]) >@@ -844,6 +851,8 @@ restart: > */ > write_unlock_bh(&policy->lock); > >+ printk(KERN_NOTICE "xfrm_lookup: newly created bundle is stale\n"); >+ > xfrm_pol_put(policy); > if (dst) > dst_free(dst); >@@ -1140,18 +1149,24 @@ int xfrm_bundle_ok(struct xfrm_dst *firs > u32 mtu; > > if (!dst_check(dst->path, ((struct xfrm_dst *)dst)->path_cookie) || >- (dst->dev && !netif_running(dst->dev))) >+ (dst->dev && !netif_running(dst->dev))) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > > last = NULL; > > do { > struct xfrm_dst *xdst = (struct xfrm_dst *)dst; > >- if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) >+ if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >- if (dst->xfrm->km.state != XFRM_STATE_VALID) >+ } >+ if (dst->xfrm->km.state != XFRM_STATE_VALID) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > > mtu = dst_mtu(dst->child); > if (xdst->child_mtu_cached != mtu) { >@@ -1159,8 +1174,10 @@ int xfrm_bundle_ok(struct xfrm_dst *firs > xdst->child_mtu_cached = mtu; > } > >- if (!dst_check(xdst->route, xdst->route_cookie)) >+ if (!dst_check(xdst->route, xdst->route_cookie)) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > mtu = dst_mtu(xdst->route); > if (xdst->route_mtu_cached != mtu) { > last = xdst;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 117749
:
54633
|
54650
|
54652
|
59102
|
59285
|
65244
|
65245
|
65248
|
65282
|
65369
|
65417
|
65615
|
66176
|
70394
|
70395
|
86502
|
87491