PERFORCE change 139156 for review
Andre Oppermann
andre at FreeBSD.org
Tue Apr 1 13:05:40 PDT 2008
http://perforce.freebsd.org/chv.cgi?CH=139156
Change 139156 by andre at 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__));
More information about the p4-projects
mailing list