Commit 0d1c9b57 authored by Ben Greear's avatar Ben Greear Committed by Stephen Hemminger

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: default avatarBen Greear <greearb@candelatech.com>
parent 62011a0b
...@@ -446,8 +446,12 @@ int do_multirule(int argc, char **argv) ...@@ -446,8 +446,12 @@ int do_multirule(int argc, char **argv)
case AF_INET6: case AF_INET6:
preferred_family = RTNL_FAMILY_IP6MR; preferred_family = RTNL_FAMILY_IP6MR;
break; break;
case RTNL_FAMILY_IPMR:
case RTNL_FAMILY_IP6MR:
break;
default: 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); exit(-1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment