From: Ben Greear Date: Thu, 15 Jul 2010 22:48:10 +0000 (-0700) Subject: iproute2: Fix batch-mode for mrules. X-Git-Tag: v2.6.35~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d1c9b570a40e3eef8c053a229713ac9344a4f83;p=thirdparty%2Fiproute2.git iproute2: Fix batch-mode for mrules. 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 --- diff --git a/ip/iprule.c b/ip/iprule.c index 9c8c6ef6e..d3b97e2ab 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); }