updated pltap&tunnel to new netdev interface
[sliver-openvswitch.git] / lib / match.c
index e97b0b1..51ed1b9 100644 (file)
@@ -868,6 +868,8 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)
                     ds_put_cstr(s, "tcp,");
                 } else if (f->nw_proto == IPPROTO_UDP) {
                     ds_put_cstr(s, "udp,");
+                } else if (f->nw_proto == IPPROTO_SCTP) {
+                    ds_put_cstr(s, "sctp,");
                 } else {
                     ds_put_cstr(s, "ip,");
                     skip_proto = false;
@@ -884,6 +886,8 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)
                     ds_put_cstr(s, "tcp6,");
                 } else if (f->nw_proto == IPPROTO_UDP) {
                     ds_put_cstr(s, "udp6,");
+                } else if (f->nw_proto == IPPROTO_SCTP) {
+                    ds_put_cstr(s, "sctp6,");
                 } else {
                     ds_put_cstr(s, "ipv6,");
                     skip_proto = false;
@@ -1100,6 +1104,15 @@ minimatch_clone(struct minimatch *dst, const struct minimatch *src)
     minimask_clone(&dst->mask, &src->mask);
 }
 
+/* Initializes 'dst' with the data in 'src', destroying 'src'.  The caller must
+ * eventually free 'dst' with minimatch_destroy(). */
+void
+minimatch_move(struct minimatch *dst, struct minimatch *src)
+{
+    miniflow_move(&dst->flow, &src->flow);
+    minimask_move(&dst->mask, &src->mask);
+}
+
 /* Frees any memory owned by 'match'.  Does not free the storage in which
  * 'match' itself resides; the caller is responsible for that. */
 void