Skip to content

Commit ba3f7f0

Browse files
committed
ipv4: Kill FLOWI_FLAG_RT_NOCACHE and associated code.
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d2d68ba commit ba3f7f0

6 files changed

Lines changed: 5 additions & 13 deletions

File tree

‎include/net/flow.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct flowi_common {
2121
__u8 flowic_flags;
2222
#define FLOWI_FLAG_ANYSRC 0x01
2323
#define FLOWI_FLAG_CAN_SLEEP 0x02
24-
#define FLOWI_FLAG_RT_NOCACHE 0x04
2524
__u32 flowic_secid;
2625
};
2726

‎include/net/inet_connection_sock.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ extern int inet_csk_get_port(struct sock *sk, unsigned short snum);
250250

251251
extern struct dst_entry* inet_csk_route_req(struct sock *sk,
252252
struct flowi4 *fl4,
253-
const struct request_sock *req,
254-
bool nocache);
253+
const struct request_sock *req);
255254
extern struct dst_entry* inet_csk_route_child_sock(struct sock *sk,
256255
struct sock *newsk,
257256
const struct request_sock *req);

‎net/dccp/ipv4.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
508508
struct dst_entry *dst;
509509
struct flowi4 fl4;
510510

511-
dst = inet_csk_route_req(sk, &fl4, req, false);
511+
dst = inet_csk_route_req(sk, &fl4, req);
512512
if (dst == NULL)
513513
goto out;
514514

‎net/ipv4/inet_connection_sock.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,14 @@ EXPORT_SYMBOL(inet_csk_reset_keepalive_timer);
368368

369369
struct dst_entry *inet_csk_route_req(struct sock *sk,
370370
struct flowi4 *fl4,
371-
const struct request_sock *req,
372-
bool nocache)
371+
const struct request_sock *req)
373372
{
374373
struct rtable *rt;
375374
const struct inet_request_sock *ireq = inet_rsk(req);
376375
struct ip_options_rcu *opt = inet_rsk(req)->opt;
377376
struct net *net = sock_net(sk);
378377
int flags = inet_sk_flowi_flags(sk);
379378

380-
if (nocache)
381-
flags |= FLOWI_FLAG_RT_NOCACHE;
382379
flowi4_init_output(fl4, sk->sk_bound_dev_if, sk->sk_mark,
383380
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
384381
sk->sk_protocol,

‎net/ipv4/route.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,9 +1836,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
18361836

18371837
rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0);
18381838

1839-
if (fl4->flowi4_flags & FLOWI_FLAG_RT_NOCACHE)
1840-
rth->dst.flags |= DST_NOCACHE;
1841-
18421839
return rth;
18431840
}
18441841

‎net/ipv4/tcp_ipv4.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static int tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst,
824824
struct sk_buff * skb;
825825

826826
/* 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)
828828
return -1;
829829

830830
skb = tcp_make_synack(sk, dst, req, rvp);
@@ -1378,7 +1378,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
13781378
*/
13791379
if (tmp_opt.saw_tstamp &&
13801380
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 &&
13821382
fl4.daddr == saddr) {
13831383
if (!tcp_peer_is_proven(req, dst, true)) {
13841384
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_PAWSPASSIVEREJECTED);

0 commit comments

Comments
 (0)