Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet put it the way we had it before; since we check ...



details:   https://anonhg.NetBSD.org/src/rev/1e056ace46be
branches:  trunk
changeset: 820219:1e056ace46be
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jan 03 15:07:59 2017 +0000

description:
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.

diffstat:

 sys/netinet/tcp_output.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 00fad33ad104 -r 1e056ace46be sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c  Tue Jan 03 13:21:40 2017 +0000
+++ b/sys/netinet/tcp_output.c  Tue Jan 03 15:07:59 2017 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index