Annotation of /trunk/glibc/patches/glibc-2.17-sync-netinet-tcp-with-linux37.patch
Parent Directory | Revision Log
Revision 2050 -
(hide annotations)
(download)
Mon Jan 28 12:51:30 2013 UTC (11 years, 8 months ago) by niro
File size: 5224 byte(s)
Mon Jan 28 12:51:30 2013 UTC (11 years, 8 months ago) by niro
File size: 5224 byte(s)
-fixed patches, removed changelog entries
1 | niro | 2031 | From b5407047839c1f0df26196597c9ec6fbbde4cac1 Mon Sep 17 00:00:00 2001 |
2 | From: David S. Miller <davem@davemloft.net> | ||
3 | Date: Wed, 9 Jan 2013 23:04:32 -0800 | ||
4 | Subject: [PATCH] Sync netinet/tcp.h with upstream Linux kernel. | ||
5 | |||
6 | [BZ# 15003] | ||
7 | * sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS, | ||
8 | TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT, | ||
9 | TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS, | ||
10 | TCP_FASTOPEN): Define. | ||
11 | (tcp_repair_opt): New structure. | ||
12 | (TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New | ||
13 | enum values. | ||
14 | (TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE, | ||
15 | TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN, | ||
16 | TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define. | ||
17 | (tcp_cookie_transactions): New structure. | ||
18 | |||
19 | diff --git a/NEWS b/NEWS | ||
20 | index 3a15555..619d0f2 100644 | ||
21 | --- a/NEWS | ||
22 | +++ b/NEWS | ||
23 | @@ -23,7 +23,7 @@ Version 2.17 | ||
24 | 14767, 14783, 14784, 14785, 14793, 14796, 14797, 14801, 14803, 14805, | ||
25 | 14807, 14811, 14815, 14821, 14822, 14824, 14828, 14831, 14833, 14835, | ||
26 | 14838, 14856, 14863, 14865, 14866, 14868, 14869, 14871, 14872, 14879, | ||
27 | - 14889, 14893, 14898, 14914. | ||
28 | + 14889, 14893, 14898, 14914, 15003. | ||
29 | |||
30 | * Optimization of memcpy for MIPS. | ||
31 | |||
32 | diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h | ||
33 | index 278fc9d..b62a696 100644 | ||
34 | --- a/sysdeps/gnu/netinet/tcp.h | ||
35 | +++ b/sysdeps/gnu/netinet/tcp.h | ||
36 | @@ -37,20 +37,29 @@ | ||
37 | /* | ||
38 | * User-settable options (used with setsockopt). | ||
39 | */ | ||
40 | -#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */ | ||
41 | -#define TCP_MAXSEG 2 /* Set maximum segment size */ | ||
42 | -#define TCP_CORK 3 /* Control sending of partial frames */ | ||
43 | -#define TCP_KEEPIDLE 4 /* Start keeplives after this period */ | ||
44 | -#define TCP_KEEPINTVL 5 /* Interval between keepalives */ | ||
45 | -#define TCP_KEEPCNT 6 /* Number of keepalives before death */ | ||
46 | -#define TCP_SYNCNT 7 /* Number of SYN retransmits */ | ||
47 | -#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ | ||
48 | -#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ | ||
49 | -#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ | ||
50 | -#define TCP_INFO 11 /* Information about this connection. */ | ||
51 | -#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ | ||
52 | -#define TCP_CONGESTION 13 /* Congestion control algorithm. */ | ||
53 | -#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ | ||
54 | +#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */ | ||
55 | +#define TCP_MAXSEG 2 /* Set maximum segment size */ | ||
56 | +#define TCP_CORK 3 /* Control sending of partial frames */ | ||
57 | +#define TCP_KEEPIDLE 4 /* Start keeplives after this period */ | ||
58 | +#define TCP_KEEPINTVL 5 /* Interval between keepalives */ | ||
59 | +#define TCP_KEEPCNT 6 /* Number of keepalives before death */ | ||
60 | +#define TCP_SYNCNT 7 /* Number of SYN retransmits */ | ||
61 | +#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ | ||
62 | +#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ | ||
63 | +#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ | ||
64 | +#define TCP_INFO 11 /* Information about this connection. */ | ||
65 | +#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ | ||
66 | +#define TCP_CONGESTION 13 /* Congestion control algorithm. */ | ||
67 | +#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ | ||
68 | +#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ | ||
69 | +#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ | ||
70 | +#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ | ||
71 | +#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ | ||
72 | +#define TCP_REPAIR 19 /* TCP sock is under repair right now */ | ||
73 | +#define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */ | ||
74 | +#define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */ | ||
75 | +#define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */ | ||
76 | +#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ | ||
77 | |||
78 | #ifdef __USE_MISC | ||
79 | # include <sys/types.h> | ||
80 | @@ -243,6 +252,49 @@ struct tcp_md5sig | ||
81 | u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ | ||
82 | }; | ||
83 | |||
84 | +/* For socket repair options. */ | ||
85 | +struct tcp_repair_opt | ||
86 | +{ | ||
87 | + u_int32_t opt_code; | ||
88 | + u_int32_t opt_val; | ||
89 | +}; | ||
90 | + | ||
91 | +/* Queue to repair, for TCP_REPAIR_QUEUE. */ | ||
92 | +enum | ||
93 | +{ | ||
94 | + TCP_NO_QUEUE, | ||
95 | + TCP_RECV_QUEUE, | ||
96 | + TCP_SEND_QUEUE, | ||
97 | + TCP_QUEUES_NR, | ||
98 | +}; | ||
99 | + | ||
100 | +/* For cookie transactions socket options. */ | ||
101 | +#define TCP_COOKIE_MIN 8 /* 64-bits */ | ||
102 | +#define TCP_COOKIE_MAX 16 /* 128-bits */ | ||
103 | +#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX) | ||
104 | + | ||
105 | +/* Flags for both getsockopt and setsockopt */ | ||
106 | +#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */ | ||
107 | +#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies, | ||
108 | + * supercedes everything. */ | ||
109 | + | ||
110 | +/* Flags for getsockopt */ | ||
111 | +#define TCP_S_DATA_IN (1 << 2) /* Was data received? */ | ||
112 | +#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */ | ||
113 | + | ||
114 | +#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */ | ||
115 | +#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */ | ||
116 | + | ||
117 | +struct tcp_cookie_transactions | ||
118 | +{ | ||
119 | + u_int16_t tcpct_flags; | ||
120 | + u_int8_t __tcpct_pad1; | ||
121 | + u_int8_t tcpct_cookie_desired; | ||
122 | + u_int16_t tcpct_s_data_desired; | ||
123 | + u_int16_t tcpct_used; | ||
124 | + u_int8_t tcpct_value[TCP_MSS_DEFAULT]; | ||
125 | +}; | ||
126 | + | ||
127 | #endif /* Misc. */ | ||
128 | |||
129 | #endif /* netinet/tcp.h */ | ||
130 | -- | ||
131 | 1.7.3.4 | ||
132 |