aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp_packet.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/vnet/tcp/tcp_packet.h b/src/vnet/tcp/tcp_packet.h
index 9ccd8e0ceb3..f9c6db4f8c4 100644
--- a/src/vnet/tcp/tcp_packet.h
+++ b/src/vnet/tcp/tcp_packet.h
@@ -370,14 +370,10 @@ tcp_options_write (u8 * data, tcp_options_t * opts)
}
}
- /* Terminate TCP options */
- if (opts_len % 4)
- {
- *data++ = TCP_OPTION_EOL;
- opts_len += TCP_OPTION_LEN_EOL;
- }
-
- /* Pad with zeroes to a u32 boundary */
+ /* Terminate TCP options by padding with NOPs to a u32 boundary. Avoid using
+ * EOL because, it seems, it can break peers with broken option parsers that
+ * rely on options ending on a u32 boundary.
+ */
while (opts_len % 4)
{
*data++ = TCP_OPTION_NOOP;