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 <greearb@candelatech.com>
This commit is contained in:
Ben Greear 2010-07-15 15:48:10 -07:00 committed by Stephen Hemminger
parent 62011a0b31
commit 0d1c9b570a
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}