From 46f90cb05312e7cb67558aa845343d73e37bb428 Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 14 Jul 1999 22:08:52 +0000 Subject: [PATCH] make sending of keepalive messages work again: -remove bogus sanity check involving an uninitialized variable -correct mbuf cluster allocation -(non-critical) remove redundant check in cleanup after error --- sys/netinet/tcp_subr.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 4a5366bb6b68..ae847288049d 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_subr.c,v 1.70 1999/07/09 22:57:22 thorpej Exp $ */ +/* $NetBSD: tcp_subr.c,v 1.71 1999/07/14 22:08:52 drochner Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -391,13 +391,6 @@ tcp_respond(tp, template, m, ack, seq, flags) ip6 = NULL; #endif if (m == 0) { - if (template - && template->m_len < hlen + sizeof(struct tcphdr)) { - if (m) - m_freem(m); - return EINVAL; - } - /* get family information from template */ switch (mtod(template, struct ip *)->ip_v) { case 4: @@ -411,15 +404,13 @@ tcp_respond(tp, template, m, ack, seq, flags) break; #endif default: - if (m) - m_freem(m); return EAFNOSUPPORT; } MGETHDR(m, M_DONTWAIT, MT_HEADER); if (m) { MCLGET(m, M_DONTWAIT); - if ((m->m_flags & M_EXT)) { + if (!(m->m_flags & M_EXT)) { m_free(m); m = NULL; }