[netperf-dev] netperf2 commit notice r554 - trunk/src

raj at netperf.org raj at netperf.org
Tue Apr 3 10:48:48 PDT 2012


Author: raj
Date: 2012-04-03 10:48:48 -0700 (Tue, 03 Apr 2012)
New Revision: 554

Modified:
   trunk/src/nettest_omni.c
Log:
routing_allowed was not being cleared for a migrated UDP_STREAM test

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2012-04-03 01:53:29 UTC (rev 553)
+++ trunk/src/nettest_omni.c	2012-04-03 17:48:48 UTC (rev 554)
@@ -7071,23 +7071,29 @@
   if (!have_uuid)
     get_uuid_string(test_uuid,sizeof(test_uuid));
 
+  protocol_str = protocol_to_str(protocol);
+  /* ok, if we have gone through all that, and direction is still
+     zero, let us see if it needs to be set to something else. */
+  if ((0 == direction) && (!connection_test)) direction = NETPERF_XMIT;
+  direction_str = direction_to_str(direction);
+
   /* to cover the backside of blithering idiots who run unidirectional
      UDP tests on test setups where they might trash their corporate
      WAN, we grudgingly provide a safety latch. unless explicitly
      enabled, UDP_STREAM/UDP_MAERTS sockets will not allow themselves
      to be routed via a gateway. raj 20091026 */
 
+  printf("have_R_option %d protocol %d direction %d\n",
+	 have_R_option,
+	 protocol,
+	 direction);
   if ((!have_R_option) &&
       (protocol == IPPROTO_UDP) &&
-      (!NETPERF_IS_RR(direction)))
+      (!NETPERF_IS_RR(direction))) {
+    printf("clearing routing_allowed\n");
     routing_allowed = 0;
+  }
 
-  protocol_str = protocol_to_str(protocol);
-  /* ok, if we have gone through all that, and direction is still
-     zero, let us see if it needs to be set to something else. */
-  if ((0 == direction) && (!connection_test)) direction = NETPERF_XMIT;
-  direction_str = direction_to_str(direction);
-
   /* some other sanity checks we need to make would include stuff when
      the user has set -m and -M such that both XMIT and RECV are set
      and has not set -r. initially we will not allow that.  at some



More information about the netperf-dev mailing list