Skip to content

Commit 3d3f075

Browse files
edumazetkuba-moo
authored andcommitted
ipv6: use np->final in inet6_sk_rebuild_header()
Instead of using an automatic variable, use np->final to get rid of the stack canary in inet6_sk_rebuild_header(). Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260206173426.1638518-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 03ff0cb commit 3d3f075

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/ipv6/af_inet6.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ int inet6_sk_rebuild_header(struct sock *sk)
825825
{
826826
struct ipv6_pinfo *np = inet6_sk(sk);
827827
struct inet_sock *inet = inet_sk(sk);
828-
struct in6_addr *final_p, final;
828+
struct in6_addr *final_p;
829829
struct dst_entry *dst;
830830
struct flowi6 *fl6;
831831

@@ -847,7 +847,7 @@ int inet6_sk_rebuild_header(struct sock *sk)
847847
security_sk_classify_flow(sk, flowi6_to_flowi_common(fl6));
848848

849849
rcu_read_lock();
850-
final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final);
850+
final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &np->final);
851851
rcu_read_unlock();
852852

853853
dst = ip6_dst_lookup_flow(sock_net(sk), sk, fl6, final_p);

0 commit comments

Comments
 (0)