From 1908fb0e6a43a40b10543e14d9fcf29c75f182d7 Mon Sep 17 00:00:00 2001 From: Roamer Date: Mon, 11 Jan 2010 21:01:02 -0800 Subject: 6910514 TCP might send down non-LSO packets with LSO flags --- usr/src/uts/common/inet/tcp/tcp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr/src/uts/common/inet/tcp/tcp.c') diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c index 81fa835e3e..e1c1c60dc1 100644 --- a/usr/src/uts/common/inet/tcp/tcp.c +++ b/usr/src/uts/common/inet/tcp/tcp.c @@ -16588,10 +16588,8 @@ tcp_send(tcp_t *tcp, const int mss, const int total_hdr_len, ixa->ixa_flags &= ~IXAF_REACH_CONF; } - /* - * Append LSO information, both flags and mss, to the mp. - */ if (do_lso_send) { + /* Append LSO information to the mp. */ lso_info_set(mp, mss, HW_LSO); ixa->ixa_fragsize = IP_MAXPACKET; ixa->ixa_extra_ident = num_lso_seg - 1; @@ -16610,6 +16608,12 @@ tcp_send(tcp_t *tcp, const int mss, const int total_hdr_len, TCP_STAT(tcps, tcp_lso_times); TCP_STAT_UPDATE(tcps, tcp_lso_pkt_out, num_lso_seg); } else { + /* + * Make sure to clean up LSO information. Wherever a + * new mp uses the prepended header room after dupb(), + * lso_info_cleanup() should be called. + */ + lso_info_cleanup(mp); tcp_send_data(tcp, mp); BUMP_LOCAL(tcp->tcp_obsegs); } -- cgit v1.2.3