netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: joonwpark81@gmail.com
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] [LLC]: zero station mac source address
Date: Mon, 24 Mar 2008 14:19:24 -0300	[thread overview]
Message-ID: <20080324171924.GA22421@ghostprotocols.net> (raw)
In-Reply-To: <47e76799.1cef600a.7b83.6fea@mx.google.com>

Em Mon, Mar 24, 2008 at 05:34:30PM +0900, joonwpark81@gmail.com escreveu:
> From: Joonwoo Park <joonwpark81@gmail.com>
> 
> The right next device of the lo can have zero dev_addr. e.g. bonding.
> 
> Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
> ---
>  net/llc/llc_core.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
> index 248b590..b871e10 100644
> --- a/net/llc/llc_core.c
> +++ b/net/llc/llc_core.c
> @@ -19,6 +19,7 @@
>  #include <linux/slab.h>
>  #include <linux/string.h>
>  #include <linux/init.h>
> +#include <linux/etherdevice.h>
>  #include <net/net_namespace.h>
>  #include <net/llc.h>
>  
> @@ -164,8 +165,9 @@ static int __init llc_init(void)
>  	struct net_device *dev;
>  
>  	dev = first_net_device(&init_net);
> -	if (dev != NULL)
> +	do {
>  		dev = next_net_device(dev);
> +	} while (dev && is_zero_ether_addr(dev->dev_addr));
>  
>  	if (dev != NULL)
>  		memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);

Looks ok, but I think this is an area for further work, using just
the first device in the list always was wrong, I was too lazy to fix it,
but since you are working on it, please consider fixing this for good
:-)

- Arnaldo

       reply	other threads:[~2008-03-24 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47e76799.1cef600a.7b83.6fea@mx.google.com>
2008-03-24 17:19 ` Arnaldo Carvalho de Melo [this message]
2008-03-25  5:18   ` [PATCH 3/3] [LLC]: zero station mac source address Joonwoo Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080324171924.GA22421@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=joonwpark81@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).