[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <632c6fd4-e060-4b8e-a80e-5d545a6c6b6c@kernel.org>
Date: Tue, 13 Feb 2024 08:56:00 -0700
From: David Ahern <dsahern@...nel.org>
To: Jason Xing <kerneljasonxing@...il.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, kuniyu@...zon.com
Cc: netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v4 3/5] tcp: use drop reasons in cookie check for
ipv4
On 2/13/24 6:42 AM, Jason Xing wrote:
> diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
> index 38f331da6677..07e201cc3d6a 100644
> --- a/net/ipv4/syncookies.c
> +++ b/net/ipv4/syncookies.c
> @@ -452,8 +456,10 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
> ireq->ir_loc_addr, th->source, th->dest, sk->sk_uid);
> security_req_classify_flow(req, flowi4_to_flowi_common(&fl4));
> rt = ip_route_output_key(net, &fl4);
> - if (IS_ERR(rt))
> + if (IS_ERR(rt)) {
> + SKB_DR_SET(reason, IP_ROUTEOUTPUTKEY);
Reason names should be based on functional failures, not function names
which will change over time. In this case the failure is an output route
lookup which is basically SKB_DROP_REASON_IP_OUTNOROUTES
Powered by blists - more mailing lists