lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJmmxOfgJAz=COR8-PLEFarogLs1H2vjp0tWLf0R=dxxg@mail.gmail.com>
Date: Fri, 26 Apr 2024 17:16:27 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: David Ahern <dsahern@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] ipv6: introduce dst_rt6_info() helper

On Fri, Apr 26, 2024 at 5:09 PM David Ahern <dsahern@...nel.org> wrote:
>
> On 4/25/24 10:57 AM, Eric Dumazet wrote:
> > Instead of (struct rt6_info *)dst casts, we can use :
> >
> >  #define dst_rt6_info(_ptr) \
> >          container_of_const(_ptr, struct rt6_info, dst)
> >
> > Some places needed missing const qualifiers :
> >
> > ip6_confirm_neigh(), ipv6_anycast_destination(),
> > ipv6_unicast_destination(), has_gateway()
> >
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > ---
> >  drivers/infiniband/core/addr.c                |  6 ++--
> >  .../ethernet/mellanox/mlxsw/spectrum_span.c   |  2 +-
> >  drivers/net/vrf.c                             |  2 +-
>
> missing drivers/net/vxlan/vxlan_core.c, vxlan_xmit_one

Thanks, I will squash in v2 the following:

diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 4bbfb516ac05bc8fd86177851bf29b98d48fa164..a9a85d0f5a5d8b07dc24bbe6ebc84e68b8d604d4
100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2513,7 +2513,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct
net_device *dev,
                }

                if (!info) {
-                       u32 rt6i_flags = ((struct rt6_info *)ndst)->rt6i_flags;
+                       u32 rt6i_flags = dst_rt6_info(ndst)->rt6i_flags;

                        err = encap_bypass_if_local(skb, dev, vxlan, AF_INET6,
                                                    dst_port, ifindex, vni,
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 1de942d7abc70d66c31023657c3a1745e5cdbb20..5f17a2a5d0e33780f59d85238b14b971b5ab0eda
100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -956,7 +956,7 @@ static inline struct dst_entry
*qeth_dst_check_rcu(struct sk_buff *skb,
        struct dst_entry *dst = skb_dst(skb);
        struct rt6_info *rt;

-       rt = (struct rt6_info *) dst;
+       rt = dst_rt6_info(dst);
        if (dst) {
                if (proto == htons(ETH_P_IPV6))
                        dst = dst_check(dst, rt6_get_cookie(rt));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ