* [PATCH] ipv6: delete useless dst check in ip6_dst_lookup_tail
@ 2021-06-24 3:09 zhang kai
2021-06-24 22:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: zhang kai @ 2021-06-24 3:09 UTC (permalink / raw)
To: David S . Miller
Cc: Hideaki YOSHIFUJI, David Ahern, Jakub Kicinski,
Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, netdev, linux-kernel, bpf, zhang kai
parameter dst always points to null.
Signed-off-by: zhang kai <zhangkaiheb@126.com>
---
net/ipv6/ip6_output.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index ff4f9ebcf..3b632e469 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1055,13 +1055,11 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk,
* ip6_route_output will fail given src=any saddr, though, so
* that's why we try it again later.
*/
- if (ipv6_addr_any(&fl6->saddr) && (!*dst || !(*dst)->error)) {
+ if (ipv6_addr_any(&fl6->saddr)) {
struct fib6_info *from;
struct rt6_info *rt;
- bool had_dst = *dst != NULL;
- if (!had_dst)
- *dst = ip6_route_output(net, sk, fl6);
+ *dst = ip6_route_output(net, sk, fl6);
rt = (*dst)->error ? NULL : (struct rt6_info *)*dst;
rcu_read_lock();
@@ -1078,7 +1076,7 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk,
* never existed and let the SA-enabled version take
* over.
*/
- if (!had_dst && (*dst)->error) {
+ if ((*dst)->error) {
dst_release(*dst);
*dst = NULL;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv6: delete useless dst check in ip6_dst_lookup_tail
2021-06-24 3:09 [PATCH] ipv6: delete useless dst check in ip6_dst_lookup_tail zhang kai
@ 2021-06-24 22:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-24 22:50 UTC (permalink / raw)
To: zhang kai
Cc: davem, yoshfuji, dsahern, kuba, ast, daniel, andrii, kafai,
songliubraving, yhs, john.fastabend, kpsingh, netdev,
linux-kernel, bpf
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 24 Jun 2021 11:09:14 +0800 you wrote:
> parameter dst always points to null.
>
> Signed-off-by: zhang kai <zhangkaiheb@126.com>
> ---
> net/ipv6/ip6_output.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
Here is the summary with links:
- ipv6: delete useless dst check in ip6_dst_lookup_tail
https://git.kernel.org/netdev/net-next/c/c305b9e6d553
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-24 22:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 3:09 [PATCH] ipv6: delete useless dst check in ip6_dst_lookup_tail zhang kai
2021-06-24 22:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).