]> git.proxmox.com Git - mirror_ovs.git/blobdiff - lib/ofp-parse.c
Add OF11 SET IP TTL action.
[mirror_ovs.git] / lib / ofp-parse.c
index ee56477d1acb393f8ebe7ba5349eeffff2131f64..a4b6d2e01982ebdc32d4786bcbcf2871ae0b573c 100644 (file)
@@ -602,7 +602,7 @@ parse_named_action(enum ofputil_action_code code,
     char *error = NULL;
     uint16_t ethertype = 0;
     uint16_t vid = 0;
-    uint8_t tos = 0, ecn;
+    uint8_t tos = 0, ecn, ttl;
     uint8_t pcp = 0;
 
     switch (code) {
@@ -712,6 +712,15 @@ parse_named_action(enum ofputil_action_code code,
         ofpact_put_SET_IP_ECN(ofpacts)->ecn = ecn;
         break;
 
+    case OFPUTIL_OFPAT11_SET_NW_TTL:
+        error = str_to_u8(arg, "TTL", &ttl);
+        if (error) {
+            return error;
+        }
+
+        ofpact_put_SET_IP_TTL(ofpacts)->ttl = ttl;
+        break;
+
     case OFPUTIL_OFPAT11_DEC_NW_TTL:
         NOT_REACHED();