From: Veaceslav Falico <vfalico@redhat.com>
To: netdev@vger.kernel.org
Cc: vfalico@redhat.com, fubar@us.ibm.com, andy@greyhouse.net,
davem@davemloft.net, linux@8192.net, nicolas.2p.debian@free.fr,
rick.jones2@hp.com, nikolay@redhat.com, mkubecek@suse.cz
Subject: [PATCH v3 net-next 2/6] bonding: don't add duplicate targets to arp_ip_target
Date: Fri, 21 Jun 2013 15:11:20 +0200 [thread overview]
Message-ID: <1371820284-13280-3-git-send-email-vfalico@redhat.com> (raw)
Print a warning and skip them.
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
drivers/net/bonding/bond_main.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 976d28e..1645130 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4588,7 +4588,11 @@ static int bond_check_params(struct bond_params *params)
arp_ip_target[i]);
arp_interval = 0;
} else {
- arp_target[arp_ip_count++] = ip;
+ if (bond_get_targets_ip(arp_target, ip) == -1)
+ arp_target[arp_ip_count++] = ip;
+ else
+ pr_warning("Warning: duplicate address %pI4 in arp_ip_target, skipping\n",
+ &ip);
}
}
--
1.7.1
reply other threads:[~2013-06-21 13:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1371820284-13280-3-git-send-email-vfalico@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=linux@8192.net \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=nicolas.2p.debian@free.fr \
--cc=nikolay@redhat.com \
--cc=rick.jones2@hp.com \
/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).