* Patrick McHardy ([email protected]) wrote: > This is the updated patch, it changes the eviction strategy > to LRU and fixes a bug related to TTL handling, the TTL stored > in the entry should only be overwritten if the IPT_RECENT_TTL > flag is set. This looks like least-recently-added as opposed to least-recently-used (or, really, least-recently-updated). Not sure how you move an entry in the lru list (perhaps just delete/add?) but I'm pretty sure recent_entry_update() needs to be modified to move the updated entry to the end of the list for correct operation. You also don't appear to check if 't' (the table following the recent_table_lookup() call) is valid in the 'match' (around line 191). recent_entry_lookup() doesn't check that either. It seems like you should be guarenteed to always get a table back but it might be prudent to check anyway. I thought that I had convinced myself that the TTL handling was okay and that where it was overwritten wasn't harmful. Oh well. Thanks, Stephen
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: [PATCH] fix mem-leak in netfilter
- From: Stephen Frost <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- References:
- Re: [PATCH] fix mem-leak in netfilter
- From: "David S. Miller" <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: "Jesper Juhl" <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Stephen Frost <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Stephen Frost <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- From: Patrick McHardy <[email protected]>
- Re: [PATCH] fix mem-leak in netfilter
- Prev by Date: Re: [FIXED] Re: Total machine lockup w/ current kernels while installing from CD
- Next by Date: Re: openpromfs issue
- Previous by thread: Re: [PATCH] fix mem-leak in netfilter
- Next by thread: Re: [PATCH] fix mem-leak in netfilter
- Index(es):