netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute2] iproute2:  Fix batch-mode for mrules.
Date: Fri, 23 Jul 2010 09:03:27 -0700	[thread overview]
Message-ID: <20100723090327.2af5ad1f@nehalam> (raw)
In-Reply-To: <1279234090-18624-1-git-send-email-greearb@candelatech.com>

On Thu, 15 Jul 2010 15:48:10 -0700
Ben Greear <greearb@candelatech.com> wrote:

> The do_multirule logic was broken in batch mode because
> it expected the preferred_family to be AF_INET or AF_INET6,
> but it then assigned it to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR.
> So, the next iteration of the batch processing, it failed
> the check for AF_INET or AF_INET6.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 9c8c6ef... d3b97e2... M	ip/iprule.c
>  ip/iprule.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/ip/iprule.c b/ip/iprule.c
> index 9c8c6ef..d3b97e2 100644
> --- a/ip/iprule.c
> +++ b/ip/iprule.c
> @@ -446,8 +446,12 @@ int do_multirule(int argc, char **argv)
>  	case AF_INET6:
>  		preferred_family = RTNL_FAMILY_IP6MR;
>  		break;
> +	case RTNL_FAMILY_IPMR:
> +	case RTNL_FAMILY_IP6MR:
> +		break;
>  	default:
> -		fprintf(stderr, "Multicast rules are only supported for IPv4/IPv6\n");
> +		fprintf(stderr, "Multicast rules are only supported for IPv4/IPv6, was: %i\n",
> +			preferred_family);
>  		exit(-1);
>  	}
>  

Applied


-- 

  reply	other threads:[~2010-07-23 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 22:48 [iproute2] iproute2: Fix batch-mode for mrules Ben Greear
2010-07-23 16:03 ` Stephen Hemminger [this message]
2010-07-23 16:09   ` Ben Greear

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=20100723090327.2af5ad1f@nehalam \
    --to=shemminger@vyatta.com \
    --cc=greearb@candelatech.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).