netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iproute2] iproute2:  Fix batch-mode for mrules.
@ 2010-07-15 22:48 Ben Greear
  2010-07-23 16:03 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2010-07-15 22:48 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-23 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 22:48 [iproute2] iproute2: Fix batch-mode for mrules Ben Greear
2010-07-23 16:03 ` Stephen Hemminger
2010-07-23 16:09   ` Ben Greear

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).