[conntrack-tools] conntrackd: fix wrong calculation of new maxfd on unregister_fds()

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Sat Sep 26 00:21:42 CEST 2009


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=bde8891c60cd31590b38459081886bb5d1910f97
commit bde8891c60cd31590b38459081886bb5d1910f97
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Sat Sep 26 00:19:45 2009 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Sat Sep 26 00:19:45 2009 +0200

    conntrackd: fix wrong calculation of new maxfd on unregister_fds()
    
    This patch fixes a missing calculation of maxfd when a file descriptor
    is unregistered.
    
    Reported-by: Jean Mickael Guerin <jean-mickael.guerin at 6wind.com>
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
       via  bde8891c60cd31590b38459081886bb5d1910f97 (commit)
      from  84ebcb1c96cd84d6d09f0b3fe534b9a0c5a120d8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bde8891c60cd31590b38459081886bb5d1910f97
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Sat Sep 26 00:19:45 2009 +0200

    conntrackd: fix wrong calculation of new maxfd on unregister_fds()
    
    This patch fixes a missing calculation of maxfd when a file descriptor
    is unregistered.
    
    Reported-by: Jean Mickael Guerin <jean-mickael.guerin at 6wind.com>
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

-----------------------------------------------------------------------

 src/fds.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
This patch fixes a missing calculation of maxfd when a file descriptor
is unregistered.

Reported-by: Jean Mickael Guerin <jean-mickael.guerin at 6wind.com>
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

diff --git a/src/fds.c b/src/fds.c
index 6304fcd..347eee1 100644
--- a/src/fds.c
+++ b/src/fds.c
@@ -87,6 +87,8 @@ int unregister_fd(int fd, struct fds *fds)
 			maxfd = this->fd;
 		}
 	}
+	fds->maxfd = maxfd;
+
 	return 0;
 }
 



More information about the netfilter-cvslog mailing list