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:
parent
62011a0b31
commit
0d1c9b570a
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue