]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ip: make ip_route_input_noref() return drop reasons
authorMenglong Dong <menglong8.dong@gmail.com>
Thu, 7 Nov 2024 12:55:58 +0000 (20:55 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Nov 2024 10:24:51 +0000 (11:24 +0100)
commit82d9983ebeb871cb5abd27c12a950c14c68772e1
treebb8a6aa49d56e66a4b5d6f19b75fdf3ded5f162c
parent61b95c70f3449c1c0bd1415c8ef37e2959cf1c41
net: ip: make ip_route_input_noref() return drop reasons

In this commit, we make ip_route_input_noref() return drop reasons, which
come from ip_route_input_rcu().

We need adjust the callers of ip_route_input_noref() to make sure the
return value of ip_route_input_noref() is used properly.

The errno that ip_route_input_noref() returns comes from ip_route_input
and bpf_lwt_input_reroute in the origin logic, and we make them return
-EINVAL on error instead. In the following patch, we will make
ip_route_input() returns drop reasons too.

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/route.h
net/core/lwt_bpf.c
net/ipv4/ip_fragment.c
net/ipv4/ip_input.c
net/ipv4/route.c