net: ip: make ip_mc_validate_source() return drop reason
authorMenglong Dong <menglong8.dong@gmail.com>
Thu, 7 Nov 2024 12:55:55 +0000 (20:55 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Nov 2024 10:24:50 +0000 (11:24 +0100)
commitd46f827016d891dbc234cb05c406180f77fb3b2d
tree3b23db3d9cdad649ee0366c4bc65a94cdf1d9ef3
parentc6c670784b862878deba7e16210ca4b2a2966ca0
net: ip: make ip_mc_validate_source() return drop reason

Make ip_mc_validate_source() return drop reason, and adjust the call of
it in ip_route_input_mc().

Another caller of it is ip_rcv_finish_core->udp_v4_early_demux, and the
errno is not checked in detail, so we don't do more adjustment for it.

The drop reason "SKB_DROP_REASON_IP_LOCALNET" is added in this commit.

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