Date: Tue, 1 Apr 2008 20:05:38 GMT From: Andre Oppermann <andre@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 139156 for review Message-ID: <200804012005.m31K5cel099234@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=139156 Change 139156 by andre@andre_flirtbox on 2008/04/01 20:05:14 Use #defines for tcp options padding. Affected files ... .. //depot/projects/tcp_reass/netinet/tcp.h#3 edit .. //depot/projects/tcp_reass/netinet/tcp_output.c#4 edit Differences ... ==== //depot/projects/tcp_reass/netinet/tcp.h#3 (text+ko) ==== @@ -78,6 +78,8 @@ #define TCPOPT_EOL 0 #define TCPOLEN_EOL 1 +#define TCPOPT_PAD 0 +#define TCPOLEN_PAD 1 #define TCPOPT_NOP 1 #define TCPOLEN_NOP 1 #define TCPOPT_MAXSEG 2 ==== //depot/projects/tcp_reass/netinet/tcp_output.c#4 (text+ko) ==== @@ -1384,8 +1384,8 @@ * people with padding of EOLs. */ while (optlen % 4) { - optlen += 1; - *optp++ = 0x00; + optlen += TCPOLEN_PAD; + *optp++ = TCPOPT_PAD; } KASSERT(optlen <= TCP_MAXOLEN, ("%s: TCP options too long", __func__));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804012005.m31K5cel099234>