daemon: Report number of crashes on monitor process command line.
[openvswitch] / lib / ofp-parse.c
index 06d5bd11d6cf61dc62aa952d6b5f0d60f2116407..312eaaaaff1842d9583a7892313a088a533de5f7 100644 (file)
@@ -33,8 +33,6 @@
 
 VLOG_DEFINE_THIS_MODULE(ofp_parse)
 
-#define DEFAULT_IDLE_TIMEOUT 60
-
 static uint32_t
 str_to_u32(const char *str)
 {
@@ -272,12 +270,12 @@ str_to_action(char *str, struct ofpbuf *b)
             put_output_action(b, str_to_u32(arg));
         } else if (!strcasecmp(act, "enqueue")) {
             char *sp = NULL;
-            char *port = strtok_r(arg, ":q", &sp);
+            char *port_s = strtok_r(arg, ":q", &sp);
             char *queue = strtok_r(NULL, "", &sp);
-            if (port == NULL || queue == NULL) {
+            if (port_s == NULL || queue == NULL) {
                 ovs_fatal(0, "\"enqueue\" syntax is \"enqueue:PORT:QUEUE\"");
             }
-            put_enqueue_action(b, str_to_u32(port), str_to_u32(queue));
+            put_enqueue_action(b, str_to_u32(port_s), str_to_u32(queue));
         } else if (!strcasecmp(act, "drop")) {
             /* A drop action in OpenFlow occurs by just not setting
              * an action. */
@@ -402,7 +400,7 @@ parse_ofp_str(char *string, struct ofp_match *match, struct ofpbuf *actions,
         *priority = OFP_DEFAULT_PRIORITY;
     }
     if (idle_timeout) {
-        *idle_timeout = DEFAULT_IDLE_TIMEOUT;
+        *idle_timeout = OFP_FLOW_PERMANENT;
     }
     if (hard_timeout) {
         *hard_timeout = OFP_FLOW_PERMANENT;