netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Flavio Leitner <fleitner@redhat.com>
To: Brian Haley <brian.haley@hp.com>
Cc: bonding-devel@lists.sourceforge.net,
	Jay Vosburgh <fubar@us.ibm.com>,
	netdev@vger.kernel.org, Andy Gospodarek <gospo@redhat.com>
Subject: Re: [PATCH] bonding: check if clients MAC addr has changed
Date: Tue, 29 Jun 2010 12:58:24 -0300	[thread overview]
Message-ID: <20100629155824.GB13444@redhat.com> (raw)
In-Reply-To: <4C2A13A0.20200@hp.com>

On Tue, Jun 29, 2010 at 11:39:12AM -0400, Brian Haley wrote:
> On 06/29/2010 10:41 AM, Flavio Leitner wrote:
> > diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
> > index 40fdc41..67154bb 100644
> > --- a/drivers/net/bonding/bond_alb.c
> > +++ b/drivers/net/bonding/bond_alb.c
> > @@ -340,7 +340,8 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
> >  
> >  	if ((client_info->assigned) &&
> >  	    (client_info->ip_src == arp->ip_dst) &&
> > -	    (client_info->ip_dst == arp->ip_src)) {
> > +	    (client_info->ip_dst == arp->ip_src) &&
> > +	    (memcmp(client_info->mac_dst, arp->mac_src, ETH_ALEN))) {
> >  		/* update the clients MAC address */
> >  		memcpy(client_info->mac_dst, arp->mac_src, ETH_ALEN);
> >  		client_info->ntt = 1;
> 
> compare_ether_addr_64bits() ?

yeah, sounds better. Bonding driver is using it already in
many other places.

-- 
Flavio

      reply	other threads:[~2010-06-29 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 14:41 [PATCH] bonding: check if clients MAC addr has changed Flavio Leitner
2010-06-29 15:03 ` Jay Vosburgh
2010-06-29 15:39 ` Brian Haley
2010-06-29 15:58   ` Flavio Leitner [this message]

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=20100629155824.GB13444@redhat.com \
    --to=fleitner@redhat.com \
    --cc=bonding-devel@lists.sourceforge.net \
    --cc=brian.haley@hp.com \
    --cc=fubar@us.ibm.com \
    --cc=gospo@redhat.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).