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:	Fri, 10 Jul 2015 21:55:52 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Thomas Graf <tgraf@...g.ch>, roopa@...ulusnetworks.com,
	rshearma@...cade.com, ebiederm@...ssion.com,
	hannes@...essinduktion.org, pshelar@...ira.com, jesse@...ira.com,
	davem@...emloft.net, daniel@...earbox.net, tom@...bertland.com,
	edumazet@...gle.com, jiri@...nulli.us, marcelo.leitner@...il.com,
	stephen@...workplumber.org, jpettit@...ira.com, kaber@...sh.net
CC:	netdev@...r.kernel.org, dev@...nvswitch.org
Subject: Re: [RFC net-next 12/22] arp: Inherit metadata dst when creating
 ARP requests

On 07/10/2015 05:19 PM, Thomas Graf wrote:

> If output device wants to see the dst, inherit the dst of the
> original skb and pass it on to generate the ARP request.

> Signed-off-by: Thomas Graf <tgraf@...g.ch>
> ---
>   net/ipv4/arp.c | 71 +++++++++++++++++++++++++++++++++++-----------------------
>   1 file changed, 43 insertions(+), 28 deletions(-)

> diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
> index 933a928..3400aea 100644
> --- a/net/ipv4/arp.c
> +++ b/net/ipv4/arp.c
> @@ -291,6 +291,46 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
>   	kfree_skb(skb);
>   }
>
> +/*
> + *	Create and send an arp packet.
> + */
> +static void arp_send_dst(int type, int ptype, __be32 dest_ip,
> +			 struct net_device *dev, __be32 src_ip,
> +			 const unsigned char *dest_hw,
> +			 const unsigned char *src_hw,
> +			 const unsigned char *target_hw, struct sk_buff *oskb)
> +{
> +	struct sk_buff *skb;
> +
> +	/*
> +	 *	No arp on this interface.
> +	 */

    The networking code, we do multi-line comments this way:

/* bla
  * bla
  */

> +
> +	if (dev->flags&IFF_NOARP)

    Please surround & with spaces.

[...]
> @@ -597,32 +638,6 @@ void arp_xmit(struct sk_buff *skb)
>   EXPORT_SYMBOL(arp_xmit);
>
>   /*
> - *	Create and send an arp packet.
> - */
> -void arp_send(int type, int ptype, __be32 dest_ip,
> -	      struct net_device *dev, __be32 src_ip,
> -	      const unsigned char *dest_hw, const unsigned char *src_hw,
> -	      const unsigned char *target_hw)
> -{
> -	struct sk_buff *skb;
> -
> -	/*
> -	 *	No arp on this interface.
> -	 */
> -
> -	if (dev->flags&IFF_NOARP)
> -		return;

    Ah, you're moving the code...

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ