: Fix refreshing of overlapping expectations
PATCH 7/8 : Fix refreshing of overlapping expectations
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/03/04 01:03:49+01:00 [email protected]
# [NETFILTER]: Fix refreshing of overlapping expectations
#
# Backport from 2.6, original patch from Rusty:
#
# More importantly, a previous expectation should only be refreshed and return
# EEXIST if it's owned by the same connection (nfsim found this bug).
#
# Slightly different from 2.6 patch, it had a bug that was corrected # in a different patch. We still want to return -EEXIST if the # expectation is owned by a different connection as the expectation # list is global. # # Signed-off-by: Patrick McHardy <[email protected]> # # net/ipv4/netfilter/ip_conntrack_core.c # 2005/03/04 01:03:48+01:00 [email protected] +2 -1 # [NETFILTER]: Fix refreshing of overlapping expectations # # Backport from 2.6, original patch from Rusty: # # More importantly, a previous expectation should only be refreshed and return # EEXIST if it's owned by the same connection (nfsim found this bug). # # Slightly different from 2.6 patch, it had a bug that was corrected # in a different patch. We still want to return -EEXIST if the # expectation is owned by a different connection as the expectation # list is global. # # Signed-off-by: Patrick McHardy <[email protected]> # diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c 2005-03-04 01:52:08 +01:00 +++ b/net/ipv4/netfilter/ip_conntrack_core.c 2005-03-04 01:52:08 +01:00 @@ -973,7 +973,8 @@ pointing into the payload - otherwise we should have to copy the data filled out by the helper over the old one */ DEBUGP("expect_related: resent packet\n"); - if (related_to->helper->timeout) { + if (old->expectant == related_to && + related_to->helper->timeout) { if (!del_timer(&old->timeout)) { /* expectation is dying. Fall through */ old = NULL;