diff options
| author | Menglong Dong <menglong8.dong@gmail.com> | 2024-11-07 15:55:59 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2024-11-12 13:24:51 +0300 |
| commit | 50038bf38e6577a15d52b890d82c197cf3b163a0 (patch) | |
| tree | 513e1fe034894c1ed36b66b22d67eaff2b17321f /include/net | |
| parent | 82d9983ebeb871cb5abd27c12a950c14c68772e1 (diff) | |
| download | linux-50038bf38e6577a15d52b890d82c197cf3b163a0.tar.xz | |
net: ip: make ip_route_input() return drop reasons
In this commit, we make ip_route_input() return skb drop reasons that come
from ip_route_input_noref().
Meanwhile, adjust all the call to it.
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/route.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/route.h b/include/net/route.h index b85ffa3e042b..fb3433dc9c72 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -210,8 +210,9 @@ int ip_route_use_hint(struct sk_buff *skb, __be32 daddr, __be32 saddr, dscp_t dscp, struct net_device *dev, const struct sk_buff *hint); -static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, - dscp_t dscp, struct net_device *devin) +static inline enum skb_drop_reason +ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, dscp_t dscp, + struct net_device *devin) { enum skb_drop_reason reason; @@ -224,7 +225,7 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, } rcu_read_unlock(); - return reason ? -EINVAL : 0; + return reason; } void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, int oif, |
