diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-17 17:02:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-20 16:36:54 -0400 |
commit | ba3f7f04ef2b19aace38f855aedd17fe43035d50 (patch) | |
tree | 223992e7b2a180042ca9d024c315346ca08454ec | |
parent | d2d68ba9fe8b38eb03124b3176a013bb8aa2b5e5 (diff) |
ipv4: Kill FLOWI_FLAG_RT_NOCACHE and associated code.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/flow.h | 1 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 3 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 5 | ||||
-rw-r--r-- | net/ipv4/route.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
6 files changed, 5 insertions, 13 deletions
diff --git a/include/net/flow.h b/include/net/flow.h index ce9cb7656b47..e1dd5082ec7e 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -21,7 +21,6 @@ struct flowi_common { | |||
21 | __u8 flowic_flags; | 21 | __u8 flowic_flags; |
22 | #define FLOWI_FLAG_ANYSRC 0x01 | 22 | #define FLOWI_FLAG_ANYSRC 0x01 |
23 | #define FLOWI_FLAG_CAN_SLEEP 0x02 | 23 | #define FLOWI_FLAG_CAN_SLEEP 0x02 |
24 | #define FLOWI_FLAG_RT_NOCACHE 0x04 | ||
25 | __u32 flowic_secid; | 24 | __u32 flowic_secid; |
26 | }; | 25 | }; |
27 | 26 | ||
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 2cf44b4ed2e6..5ee66f517b4f 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -250,8 +250,7 @@ extern int inet_csk_get_port(struct sock *sk, unsigned short snum); | |||
250 | 250 | ||
251 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, | 251 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, |
252 | struct flowi4 *fl4, | 252 | struct flowi4 *fl4, |
253 | const struct request_sock *req, | 253 | const struct request_sock *req); |
254 | bool nocache); | ||
255 | extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk, | 254 | extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk, |
256 | struct sock *newsk, | 255 | struct sock *newsk, |
257 | const struct request_sock *req); | 256 | const struct request_sock *req); |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index ab4f44c9bb21..25428d0c50c9 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -508,7 +508,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req, | |||
508 | struct dst_entry *dst; | 508 | struct dst_entry *dst; |
509 | struct flowi4 fl4; | 509 | struct flowi4 fl4; |
510 | 510 | ||
511 | dst = inet_csk_route_req(sk, &fl4, req, false); | 511 | dst = inet_csk_route_req(sk, &fl4, req); |
512 | if (dst == NULL) | 512 | if (dst == NULL) |
513 | goto out; | 513 | goto out; |
514 | 514 | ||
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 0a290d719bc7..db0cf17c00f7 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -368,8 +368,7 @@ EXPORT_SYMBOL(inet_csk_reset_keepalive_timer); | |||
368 | 368 | ||
369 | struct dst_entry *inet_csk_route_req(struct sock *sk, | 369 | struct dst_entry *inet_csk_route_req(struct sock *sk, |
370 | struct flowi4 *fl4, | 370 | struct flowi4 *fl4, |
371 | const struct request_sock *req, | 371 | const struct request_sock *req) |
372 | bool nocache) | ||
373 | { | 372 | { |
374 | struct rtable *rt; | 373 | struct rtable *rt; |
375 | const struct inet_request_sock *ireq = inet_rsk(req); | 374 | const struct inet_request_sock *ireq = inet_rsk(req); |
@@ -377,8 +376,6 @@ struct dst_entry *inet_csk_route_req(struct sock *sk, | |||
377 | struct net *net = sock_net(sk); | 376 | struct net *net = sock_net(sk); |
378 | int flags = inet_sk_flowi_flags(sk); | 377 | int flags = inet_sk_flowi_flags(sk); |
379 | 378 | ||
380 | if (nocache) | ||
381 | flags |= FLOWI_FLAG_RT_NOCACHE; | ||
382 | flowi4_init_output(fl4, sk->sk_bound_dev_if, sk->sk_mark, | 379 | flowi4_init_output(fl4, sk->sk_bound_dev_if, sk->sk_mark, |
383 | RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE, | 380 | RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE, |
384 | sk->sk_protocol, | 381 | sk->sk_protocol, |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 97cca8a03d94..7e1c0ed0ef70 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1836,9 +1836,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
1836 | 1836 | ||
1837 | rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); | 1837 | rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); |
1838 | 1838 | ||
1839 | if (fl4->flowi4_flags & FLOWI_FLAG_RT_NOCACHE) | ||
1840 | rth->dst.flags |= DST_NOCACHE; | ||
1841 | |||
1842 | return rth; | 1839 | return rth; |
1843 | } | 1840 | } |
1844 | 1841 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 1d8b75a58981..59110caeb074 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -824,7 +824,7 @@ static int tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst, | |||
824 | struct sk_buff * skb; | 824 | struct sk_buff * skb; |
825 | 825 | ||
826 | /* First, grab a route. */ | 826 | /* First, grab a route. */ |
827 | if (!dst && (dst = inet_csk_route_req(sk, &fl4, req, nocache)) == NULL) | 827 | if (!dst && (dst = inet_csk_route_req(sk, &fl4, req)) == NULL) |
828 | return -1; | 828 | return -1; |
829 | 829 | ||
830 | skb = tcp_make_synack(sk, dst, req, rvp); | 830 | skb = tcp_make_synack(sk, dst, req, rvp); |
@@ -1378,7 +1378,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1378 | */ | 1378 | */ |
1379 | if (tmp_opt.saw_tstamp && | 1379 | if (tmp_opt.saw_tstamp && |
1380 | tcp_death_row.sysctl_tw_recycle && | 1380 | tcp_death_row.sysctl_tw_recycle && |
1381 | (dst = inet_csk_route_req(sk, &fl4, req, want_cookie)) != NULL && | 1381 | (dst = inet_csk_route_req(sk, &fl4, req)) != NULL && |
1382 | fl4.daddr == saddr) { | 1382 | fl4.daddr == saddr) { |
1383 | if (!tcp_peer_is_proven(req, dst, true)) { | 1383 | if (!tcp_peer_is_proven(req, dst, true)) { |
1384 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_PAWSPASSIVEREJECTED); | 1384 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_PAWSPASSIVEREJECTED); |