From: Jay Vosburgh <fubar@us.ibm.com>
To: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: netdev@vger.kernel.org, andy@greyhouse.net, davem@davemloft.net
Subject: Re: [PATCH v3] bonding: make arp_ip_target parameter checks consistent with sysfs
Date: Thu, 29 Nov 2012 09:39:09 -0800 [thread overview]
Message-ID: <13894.1354210749@death.nxdomain> (raw)
In-Reply-To: <1354188846-15577-1-git-send-email-nikolay@redhat.com>
Nikolay Aleksandrov <nikolay@redhat.com> wrote:
> The module can be loaded with arp_ip_target="255.255.255.255" which makes
> it impossible to remove as the function in sysfs checks for that value,
> so we make the parameter checks consistent with sysfs.
>
> v2: Fix formatting
> v3: Make description text < 75 columns
>
>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
>---
> drivers/net/bonding/bond_main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 5f5b69f..d29159a 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -4706,12 +4706,13 @@ static int bond_check_params(struct bond_params *params)
> arp_ip_count++) {
> /* not complete check, but should be good enough to
> catch mistakes */
>- if (!isdigit(arp_ip_target[arp_ip_count][0])) {
>+ __be32 ip = in_aton(arp_ip_target[arp_ip_count]);
>+ if (!isdigit(arp_ip_target[arp_ip_count][0]) ||
>+ ip == 0 || ip == htonl(INADDR_BROADCAST)) {
> pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n",
> arp_ip_target[arp_ip_count]);
> arp_interval = 0;
> } else {
>- __be32 ip = in_aton(arp_ip_target[arp_ip_count]);
> arp_target[arp_ip_count] = ip;
> }
> }
>--
>1.7.11.7
>
next prev parent reply other threads:[~2012-11-29 17:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 16:44 [PATCH v2] bonding: make arp_ip_target parameter checks consistent with sysfs Nikolay Aleksandrov
2012-11-29 11:34 ` [PATCH v3] " Nikolay Aleksandrov
2012-11-29 17:39 ` Jay Vosburgh [this message]
2012-11-29 18:14 ` David Miller
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=13894.1354210749@death.nxdomain \
--to=fubar@us.ibm.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.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).