ipv4: raw: check sk->sk_rcvbuf earlier
authorEric Dumazet <edumazet@google.com>
Thu, 7 Mar 2024 16:30:20 +0000 (16:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Mar 2024 19:39:44 +0000 (11:39 -0800)
commitd721812aa875a898eb38b2729abf6e96abdb357b
tree5a90e866ad5180e8d2531435f481d9d7d3506569
parent026763ece881b4c636173c25d012cde085689027
ipv4: raw: check sk->sk_rcvbuf earlier

There is no point cloning an skb and having to free the clone
if the receive queue of the raw socket is full.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240307163020.2524409-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/raw.c