projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
going to drop'll free free mbuf; be sure and discard tcp options
[unix-history]
/
usr
/
src
/
sys
/
netinet
/
tcp_input.c
diff --git
a/usr/src/sys/netinet/tcp_input.c
b/usr/src/sys/netinet/tcp_input.c
index
7ff357e
..
eece52e
100644
(file)
--- a/
usr/src/sys/netinet/tcp_input.c
+++ b/
usr/src/sys/netinet/tcp_input.c
@@
-1,4
+1,4
@@
-/* tcp_input.c 1.90 83/03/2
5
*/
+/* tcp_input.c 1.90 83/03/2
7
*/
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-78,8
+78,6
@@
tcp_input(m0)
ti->ti_len = htons((u_short)ti->ti_len);
if (ti->ti_sum = in_cksum(m, len)) {
tcpstat.tcps_badsum++;
ti->ti_len = htons((u_short)ti->ti_len);
if (ti->ti_sum = in_cksum(m, len)) {
tcpstat.tcps_badsum++;
- if (tcpprintfs)
- printf("tcp cksum %x\n", ti->ti_sum);
goto drop;
}
}
goto drop;
}
}
@@
-98,7
+96,7
@@
tcp_input(m0)
if (off > sizeof (struct tcphdr)) {
if ((m = m_pullup(m, sizeof (struct ip) + off)) == 0) {
tcpstat.tcps_hdrops++;
if (off > sizeof (struct tcphdr)) {
if ((m = m_pullup(m, sizeof (struct ip) + off)) == 0) {
tcpstat.tcps_hdrops++;
-
goto drop
;
+
return
;
}
ti = mtod(m, struct tcpiphdr *);
om = m_get(M_DONTWAIT, MT_DATA);
}
ti = mtod(m, struct tcpiphdr *);
om = m_get(M_DONTWAIT, MT_DATA);
@@
-728,6
+726,8
@@
dropwithreset:
return;
drop:
return;
drop:
+ if (om)
+ (void) m_free(om);
/*
* Drop space held by incoming segment and return.
*/
/*
* Drop space held by incoming segment and return.
*/