PERFORCE change 143761 for review
Rui Paulo
rpaulo at FreeBSD.org
Thu Jun 19 13:20:03 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143761
Change 143761 by rpaulo at rpaulo_sigma on 2008/06/19 13:19:41
Ignore syn/ack for connections we have seen no syn.
Affected files ...
.. //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 edit
Differences ...
==== //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 (text+ko) ====
@@ -23,7 +23,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#6 $
+ * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 $
*/
#include <stdio.h>
@@ -99,6 +99,12 @@
TAILQ_INIT(cp->pktshead);
dumper_addpkt(cp->pktshead, ph, bytes);
} else if ((tcp->th_flags & TH_FLAGS) == (TH_SYN|TH_ACK)) {
+ if (rcp == NULL) {
+ /* ignore this syn+ack because we missed
+ the earlier syn.
+ */
+ return;
+ }
if (cp) {
DPRINTF("connection already being tracked!\n");
print_packet(bytes, linkhlen);
More information about the p4-projects
mailing list