]> git.proxmox.com Git - ovs.git/commitdiff
logical-fields: Add ct.dnat and ct.snat symbols.
authorGurucharan Shetty <guru@ovn.org>
Thu, 3 Nov 2016 05:39:54 +0000 (22:39 -0700)
committerGurucharan Shetty <guru@ovn.org>
Tue, 15 Nov 2016 16:13:39 +0000 (08:13 -0800)
Upcoming commits use it.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
ovn/lib/logical-fields.c
ovn/ovn-sb.xml
tests/ovn.at

index 2d3e2178e14bfda282b49d313660d1e1bb2570ec..d4578c31e2cf016a8cd60d83f63504a7acc70c88 100644 (file)
@@ -108,6 +108,8 @@ ovn_init_symtab(struct shash *symtab)
         {"rel", CS_RELATED_BIT},
         {"rpl", CS_REPLY_DIR_BIT},
         {"inv", CS_INVALID_BIT},
+        {"dnat", CS_DST_NAT_BIT},
+        {"snat", CS_SRC_NAT_BIT},
     };
     for (const struct ct_bit *b = bits; b < &bits[ARRAY_SIZE(bits)]; b++) {
         char *name = xasprintf("ct.%s", b->name);
index 45c473c18e9350952901cc4fbd1e6be47dbbd8c4..65191ed2b96c9f83b9bed3faafafae3040d6227f 100644 (file)
             <li><code>ct.inv</code>: True for a connection entry in a bad state</li>
           </ul>
           <p>
-            <code>ct_state</code> and its subfields are initialized by the
-            <code>ct_next</code> action, described below.
+            The above subfields of <code>ct_state</code> are initialized by
+            the <code>ct_next</code> action, described later.
+          </p>
+          <ul>
+            <li>
+              <code>ct.dnat</code>: True for a packet whose destination IP
+              address has been changed.
+            </li>
+            <li>
+              <code>ct.snat</code>: True for a packet whose source IP
+              address has been changed.
+            </li>
+          </ul>
+          <p>
+            The above subfields of <code>ct_state</code> are initialized by
+            the actions like <code>ct_dnat</code>, <code>ct_snat</code> and
+            <code>ct_lb</code> described later.
           </p>
         </li>
       </ul>
index 6ae4247999ca904c3c5aaa6608e40c3a9c9ca96c..69f52779eb2f994ba982063d1a99357334474ce5 100644 (file)
@@ -162,11 +162,13 @@ AT_CLEANUP
 dnl Check that the OVN conntrack field definitions are correct.
 AT_SETUP([ovn -- conntrack fields])
 AT_CHECK([ovstest test-ovn dump-symtab | grep ^ct | sort], [0],
-[[ct.est = ct_state[1]
+[[ct.dnat = ct_state[7]
+ct.est = ct_state[1]
 ct.inv = ct_state[4]
 ct.new = ct_state[0]
 ct.rel = ct_state[2]
 ct.rpl = ct_state[3]
+ct.snat = ct_state[6]
 ct.trk = ct_state[5]
 ct_label = NXM_NX_CT_LABEL
 ct_label.blocked = ct_label[0]