Module Name:    src
Committed By:   christos
Date:           Tue Jan  3 15:07:59 UTC 2017

Modified Files:
        src/sys/netinet: tcp_output.c

Log Message:
put it the way we had it before; since we check for the resulting size after
we added the extra space we can be equal to the size of the buffer.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/netinet/tcp_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.190 src/sys/netinet/tcp_output.c:1.191
--- src/sys/netinet/tcp_output.c:1.190	Tue Jan  3 08:09:33 2017
+++ src/sys/netinet/tcp_output.c	Tue Jan  3 10:07:59 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.190 2017/01/03 13:09:33 christos Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.191 2017/01/03 15:07:59 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.190 2017/01/03 13:09:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.191 2017/01/03 15:07:59 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -566,8 +566,8 @@ tcp_output(struct tcpcb *tp)
 	struct ip6_hdr *ip6;
 #endif
 	struct tcphdr *th;
-	u_char opt[MAX_TCPOPTLEN + 1], *optp;
-#define OPT_FITS(more)	((optlen + (more)) < sizeof(opt))
+	u_char opt[MAX_TCPOPTLEN], *optp;
+#define OPT_FITS(more)	((optlen + (more)) <= sizeof(opt))
 	unsigned optlen, hdrlen, packetlen;
 	unsigned int sack_numblks;
 	int idle, sendalot, txsegsize, rxsegsize;

Reply via email to