summaryrefslogtreecommitdiff
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-11-04 16:06:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-04 16:06:46 -0500
commit90284c2bc98502362c217c01a2d71dcbb1968abe (patch)
tree511fb5930fd9d2eaeb040c901287dbc82c8d4c0d /include/net/tcp.h
parent436f7c206860729d543a457aca5887e52039a5f4 (diff)
parentf7b3bec6f5167efaf56b756abfafb924cb1d3050 (diff)
Merge branch 'ecn_via_routing_table'
Florian Westphal says: ==================== net: allow setting ecn via routing table Here is v4 of the patchset, its exactly the same as v3 except in patch3/3 where I added the missing 'const' qualifier to a function argument that Eric spotted during review. I preserved Erics Acks so that he doesn't have to resend them. v3 cover letter: When using syn cookies, then do not simply trust that the echoed timestamp was not modified to make sure that ecn is not turned on magically when it is disabled on the host. The first two patches, which were not part of earlier series, prepare the cookie code for the ecn route metrics change by allowing is to more easily use the existing dst object for ecn validation. The 3rd patch adds the ecn route metric feature support. It is almost the same as in v2, except that we'll now also test the dst_features when decoding a syn cookie timestamp that indicates ecn support. These three patches then allow turning on explicit congestion notification based on the destination network. For example, assuming the default tcp_ecn sysctl '2', the following will enable ecn (tcp_ecn=1 behaviour, i.e. request ecn to be enabled for a tcp connection) for all connections to hosts inside the 192.168.2/24 network: ip route change 192.168.2.0/24 dev eth0 features ecn Having a more fine-grained per-route setting can be beneficial for various reasons, for example 1) within data centers, or 2) local ISPs may deploy ECN support for their own video/streaming services [1], etc. Joint work with Daniel Borkmann, feature suggested by Hannes Frederic Sowa. The patch to enable this in iproute2 will be posted shortly, it is currently also available here: http://git.breakpoint.cc/cgit/fw/iproute2.git/commit/?h=iproute_features&id=8843d2d8973fb81c78a7efe6d42e3a17d739003e [1] http://www.ietf.org/proceedings/89/slides/slides-89-tsvarea-1.pdf, p.15 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 3a35b1500359..f50f29faf76f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -490,17 +490,16 @@ u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
u16 *mssp);
__u32 cookie_v4_init_sequence(struct sock *sk, const struct sk_buff *skb,
__u16 *mss);
-#endif
-
__u32 cookie_init_timestamp(struct request_sock *req);
-bool cookie_check_timestamp(struct tcp_options_received *opt, struct net *net,
- bool *ecn_ok);
+bool cookie_timestamp_decode(struct tcp_options_received *opt);
+bool cookie_ecn_ok(const struct tcp_options_received *opt,
+ const struct net *net, const struct dst_entry *dst);
/* From net/ipv6/syncookies.c */
int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th,
u32 cookie);
struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
-#ifdef CONFIG_SYN_COOKIES
+
u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
const struct tcphdr *th, u16 *mssp);
__u32 cookie_v6_init_sequence(struct sock *sk, const struct sk_buff *skb,