提交 55476967 编写于 作者: E Eric Dumazet 提交者: Jialin Zhang

raw: remove unused variables from raw6_icmp_error()

mainline inclusion
from mainline-v6.0-rc1
commit c4fceb46
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6ECEK
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c4fceb46add65481ef0dfb79cad24c3c269b4cad

--------------------------------

saddr and daddr are set but not used.

Fixes: ba44f818 ("raw: use more conventional iterators")
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NEric Dumazet <edumazet@google.com>
Acked-by: NJonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/r/20220622032303.159394-1-edumazet@google.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 98a45425
...@@ -332,7 +332,6 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb, ...@@ -332,7 +332,6 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb,
void raw6_icmp_error(struct sk_buff *skb, int nexthdr, void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
u8 type, u8 code, int inner_offset, __be32 info) u8 type, u8 code, int inner_offset, __be32 info)
{ {
const struct in6_addr *saddr, *daddr;
struct net *net = dev_net(skb->dev); struct net *net = dev_net(skb->dev);
struct hlist_nulls_head *hlist; struct hlist_nulls_head *hlist;
struct hlist_nulls_node *hnode; struct hlist_nulls_node *hnode;
...@@ -345,8 +344,6 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, ...@@ -345,8 +344,6 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
sk_nulls_for_each(sk, hnode, hlist) { sk_nulls_for_each(sk, hnode, hlist) {
/* Note: ipv6_hdr(skb) != skb->data */ /* Note: ipv6_hdr(skb) != skb->data */
const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data; const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data;
saddr = &ip6h->saddr;
daddr = &ip6h->daddr;
if (!raw_v6_match(net, sk, nexthdr, &ip6h->saddr, &ip6h->daddr, if (!raw_v6_match(net, sk, nexthdr, &ip6h->saddr, &ip6h->daddr,
inet6_iif(skb), inet6_iif(skb))) inet6_iif(skb), inet6_iif(skb)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册