Commit ba3f7f04ef2b19aace38f855aedd17fe43035d50

Authored by David S. Miller
1 parent d2d68ba9fe

ipv4: Kill FLOWI_FLAG_RT_NOCACHE and associated code.

Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 6 changed files with 5 additions and 13 deletions Side-by-side Diff

... ... @@ -21,7 +21,6 @@
21 21 __u8 flowic_flags;
22 22 #define FLOWI_FLAG_ANYSRC 0x01
23 23 #define FLOWI_FLAG_CAN_SLEEP 0x02
24   -#define FLOWI_FLAG_RT_NOCACHE 0x04
25 24 __u32 flowic_secid;
26 25 };
27 26  
include/net/inet_connection_sock.h
... ... @@ -250,8 +250,7 @@
250 250  
251 251 extern struct dst_entry* inet_csk_route_req(struct sock *sk,
252 252 struct flowi4 *fl4,
253   - const struct request_sock *req,
254   - bool nocache);
  253 + const struct request_sock *req);
255 254 extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk,
256 255 struct sock *newsk,
257 256 const struct request_sock *req);
... ... @@ -508,7 +508,7 @@
508 508 struct dst_entry *dst;
509 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 512 if (dst == NULL)
513 513 goto out;
514 514  
net/ipv4/inet_connection_sock.c
... ... @@ -368,8 +368,7 @@
368 368  
369 369 struct dst_entry *inet_csk_route_req(struct sock *sk,
370 370 struct flowi4 *fl4,
371   - const struct request_sock *req,
372   - bool nocache)
  371 + const struct request_sock *req)
373 372 {
374 373 struct rtable *rt;
375 374 const struct inet_request_sock *ireq = inet_rsk(req);
... ... @@ -377,8 +376,6 @@
377 376 struct net *net = sock_net(sk);
378 377 int flags = inet_sk_flowi_flags(sk);
379 378  
380   - if (nocache)
381   - flags |= FLOWI_FLAG_RT_NOCACHE;
382 379 flowi4_init_output(fl4, sk->sk_bound_dev_if, sk->sk_mark,
383 380 RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
384 381 sk->sk_protocol,
... ... @@ -1836,9 +1836,6 @@
1836 1836  
1837 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 1839 return rth;
1843 1840 }
1844 1841  
... ... @@ -824,7 +824,7 @@
824 824 struct sk_buff * skb;
825 825  
826 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 828 return -1;
829 829  
830 830 skb = tcp_make_synack(sk, dst, req, rvp);
... ... @@ -1378,7 +1378,7 @@
1378 1378 */
1379 1379 if (tmp_opt.saw_tstamp &&
1380 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 1382 fl4.daddr == saddr) {
1383 1383 if (!tcp_peer_is_proven(req, dst, true)) {
1384 1384 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_PAWSPASSIVEREJECTED);