1
1
2
2
/*
3
- * Copyright (c) 2007-2013 Nicira, Inc.
3
+ * Copyright (c) 2007-2017 Nicira, Inc.
4
4
*
5
5
* This program is free software; you can redistribute it and/or
6
6
* modify it under the terms of version 2 of the GNU General Public
@@ -331,6 +331,8 @@ enum ovs_key_attr {
331
331
OVS_KEY_ATTR_CT_ZONE , /* u16 connection tracking zone. */
332
332
OVS_KEY_ATTR_CT_MARK , /* u32 connection tracking mark */
333
333
OVS_KEY_ATTR_CT_LABELS , /* 16-octet connection tracking label */
334
+ OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4 , /* struct ovs_key_ct_tuple_ipv4 */
335
+ OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6 , /* struct ovs_key_ct_tuple_ipv6 */
334
336
335
337
#ifdef __KERNEL__
336
338
OVS_KEY_ATTR_TUNNEL_INFO , /* struct ip_tunnel_info */
@@ -446,9 +448,13 @@ struct ovs_key_nd {
446
448
__u8 nd_tll [ETH_ALEN ];
447
449
};
448
450
449
- #define OVS_CT_LABELS_LEN 16
451
+ #define OVS_CT_LABELS_LEN_32 4
452
+ #define OVS_CT_LABELS_LEN (OVS_CT_LABELS_LEN_32 * sizeof(__u32))
450
453
struct ovs_key_ct_labels {
451
- __u8 ct_labels [OVS_CT_LABELS_LEN ];
454
+ union {
455
+ __u8 ct_labels [OVS_CT_LABELS_LEN ];
456
+ __u32 ct_labels_32 [OVS_CT_LABELS_LEN_32 ];
457
+ };
452
458
};
453
459
454
460
/* OVS_KEY_ATTR_CT_STATE flags */
@@ -468,6 +474,22 @@ struct ovs_key_ct_labels {
468
474
469
475
#define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT)
470
476
477
+ struct ovs_key_ct_tuple_ipv4 {
478
+ __be32 ipv4_src ;
479
+ __be32 ipv4_dst ;
480
+ __be16 src_port ;
481
+ __be16 dst_port ;
482
+ __u8 ipv4_proto ;
483
+ };
484
+
485
+ struct ovs_key_ct_tuple_ipv6 {
486
+ __be32 ipv6_src [4 ];
487
+ __be32 ipv6_dst [4 ];
488
+ __be16 src_port ;
489
+ __be16 dst_port ;
490
+ __u8 ipv6_proto ;
491
+ };
492
+
471
493
/**
472
494
* enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
473
495
* @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
@@ -652,6 +674,10 @@ struct ovs_action_hash {
652
674
* @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG.
653
675
* @OVS_CT_ATTR_NAT: Nested OVS_NAT_ATTR_* for performing L3 network address
654
676
* translation (NAT) on the packet.
677
+ * @OVS_CT_ATTR_FORCE_COMMIT: Like %OVS_CT_ATTR_COMMIT, but instead of doing
678
+ * nothing if the connection is already committed will check that the current
679
+ * packet is in conntrack entry's original direction. If directionality does
680
+ * not match, will delete the existing conntrack entry and commit a new one.
655
681
*/
656
682
enum ovs_ct_attr {
657
683
OVS_CT_ATTR_UNSPEC ,
@@ -662,6 +688,7 @@ enum ovs_ct_attr {
662
688
OVS_CT_ATTR_HELPER , /* netlink helper to assist detection of
663
689
related connections. */
664
690
OVS_CT_ATTR_NAT , /* Nested OVS_NAT_ATTR_* */
691
+ OVS_CT_ATTR_FORCE_COMMIT , /* No argument */
665
692
__OVS_CT_ATTR_MAX
666
693
};
667
694
0 commit comments