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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 27 Mar 2024 09:40:15 +0100
From: Lukasz Majewski <lukma@...x.de>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>, Eric Dumazet
 <edumazet@...gle.com>, Vladimir Oltean <olteanv@...il.com>, "David S.
 Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Oleksij
 Rempel <o.rempel@...gutronix.de>, <Tristram.Ha@...rochip.com>, Sebastian
 Andrzej Siewior <bigeasy@...utronix.de>, Paolo Abeni <pabeni@...hat.com>,
 Ravi Gunasekaran <r-gunasekaran@...com>, Simon Horman <horms@...nel.org>,
 Nikita Zhandarovich <n.zhandarovich@...tech.ru>, Murali Karicheri
 <m-karicheri2@...com>, Jiri Pirko <jiri@...nulli.us>, Dan Carpenter
 <dan.carpenter@...aro.org>, Ziyang Xuan <william.xuanziyang@...wei.com>,
 Shigeru Yoshida <syoshida@...hat.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 RESEND] net: hsr: Provide RedBox support

Hi Ratheesh,

> On 2024-03-26 at 14:32:20, Lukasz Majewski (lukma@...x.de) wrote:
> > --- a/net/hsr/hsr_device.h
> > +++ b/net/hsr/hsr_device.h
> > @@ -16,8 +16,8 @@
> >  void hsr_del_ports(struct hsr_priv *hsr);
> >  void hsr_dev_setup(struct net_device *dev);
> >  int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device
> > *slave[2],
> > -		     unsigned char multicast_spec, u8
> > protocol_version,
> > -		     struct netlink_ext_ack *extack);
> > +		     struct net_device *interlink, unsigned char
> > multicast_spec,
> > +		     u8 protocol_version, struct netlink_ext_ack
> > *extack); void hsr_check_carrier_and_operstate(struct hsr_priv
> > *hsr); int hsr_get_max_mtu(struct hsr_priv *hsr);
> >  #endif /* __HSR_DEVICE_H */
> > diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
> > index 5d68cb181695..7c5a4bda1cca 100644
> > --- a/net/hsr/hsr_forward.c
> > +++ b/net/hsr/hsr_forward.c
> > @@ -377,6 +377,15 @@ static int hsr_xmit(struct sk_buff *skb,
> > struct hsr_port *port, */
> >  		ether_addr_copy(eth_hdr(skb)->h_source,
> > port->dev->dev_addr); }
> > +
> > +	/* When HSR node is used as RedBox - the frame received
> > from HSR ring
> > +	 * requires source MAC address (SA) replacement to one
> > which can be
> > +	 * recognized by SAN devices (otherwise, frames are
> > dropped by switch)
> > +	 */
> > +	if (port->type == HSR_PT_INTERLINK)
> > +		memcpy(&eth_hdr(skb)->h_source,
> > port->hsr->macaddress_redbox,
> > +		       ETH_ALEN);  
> why not ether_addr_copy here too ?

Good point. I will add it here too.

Thanks for review.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@...x.de

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ