Lines Matching full:nat

51 	OVS_CT_NAT = 1 << 0,     /* NAT for committed connections only. */
52 OVS_CT_SRC_NAT = 1 << 1, /* Source NAT for NEW connections. */
53 OVS_CT_DST_NAT = 1 << 2, /* Destination NAT for NEW connections. */
62 u8 nat : 3; /* enum ovs_ct_nat */ member
72 struct nf_nat_range2 range; /* Only present for SRC NAT and DST NAT. */
230 * 'keep_nat_flags' is true, the existing NAT flags retained, else they are
483 * FTP with NAT) adusting the TCP payload size when mangling IP in ovs_ct_helper()
621 /* Must invert the tuple if skb has been transformed by NAT. */ in ovs_ct_find_existing()
734 * range is only used for new, uninitialized NAT state.
749 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in ovs_ct_nat_execute()
751 hooknum = NF_INET_LOCAL_OUT; /* Destination NAT */ in ovs_ct_nat_execute()
787 /* Initialize according to the NAT action. */ in ovs_ct_nat_execute()
876 /* Add NAT extension if not confirmed yet. */ in ovs_ct_nat()
878 return NF_ACCEPT; /* Can't NAT. */ in ovs_ct_nat()
880 /* Determine NAT type. in ovs_ct_nat()
881 * Check if the NAT type can be deduced from the tracked connection. in ovs_ct_nat()
885 if (info->nat & OVS_CT_NAT && ctinfo != IP_CT_NEW && in ovs_ct_nat()
888 /* NAT an established or related connection like before. */ in ovs_ct_nat()
891 * for which NAT was applied in the forward in ovs_ct_nat()
892 * direction. Do the reverse NAT. in ovs_ct_nat()
899 } else if (info->nat & OVS_CT_SRC_NAT) { in ovs_ct_nat()
901 } else if (info->nat & OVS_CT_DST_NAT) { in ovs_ct_nat()
923 /* Mark NAT done if successful and update the flow key. */ in ovs_ct_nat()
979 /* Clear CT state NAT flags to mark that we have not yet done in __ovs_ct_lookup()
980 * NAT after the nf_conntrack_in() call. We can actually clear in __ovs_ct_lookup()
985 /* Update the key, but keep the NAT flags. */ in __ovs_ct_lookup()
994 * helper, so that the helper knows about the NAT. We enforce in __ovs_ct_lookup()
995 * this by delaying both NAT and helper calls for unconfirmed in __ovs_ct_lookup()
997 * packets NAT and Helper may be called in either order. in __ovs_ct_lookup()
999 * NAT will be done only if the CT action has NAT, and only in __ovs_ct_lookup()
1000 * once per packet (per zone), as guarded by the NAT bits in in __ovs_ct_lookup()
1003 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && in __ovs_ct_lookup()
1022 /* helper installed, add seqadj if NAT is required */ in __ovs_ct_lookup()
1023 if (info->nat && !nfct_seqadj(ct)) { in __ovs_ct_lookup()
1064 * committed, so we are not calling into NAT here. in ovs_ct_lookup()
1354 if (info->nat) { in ovs_ct_add_helper()
1359 OVS_NLERR(log, "Failed to load \"%s\" NAT helper, error: %d", in ovs_ct_add_helper()
1397 OVS_NLERR(log, "Unknown NAT attribute (type=%d, max=%d)", in parse_nat()
1403 OVS_NLERR(log, "NAT attribute type %d has unexpected length (%d != %d)", in parse_nat()
1412 if (info->nat) { in parse_nat()
1413 OVS_NLERR(log, "Only one type of NAT may be specified"); in parse_nat()
1416 info->nat |= OVS_CT_NAT; in parse_nat()
1417 info->nat |= ((type == OVS_NAT_ATTR_SRC) in parse_nat()
1458 OVS_NLERR(log, "Unknown nat attribute (%d)", type); in parse_nat()
1464 OVS_NLERR(log, "NAT attribute has %d unknown bytes", rem); in parse_nat()
1467 if (!info->nat) { in parse_nat()
1471 "NAT flags may be given only when NAT range (SRC or DST) is also specified." in parse_nat()
1475 info->nat = OVS_CT_NAT; /* NAT existing connections. */ in parse_nat()
1478 "NAT attributes may be specified only when CT COMMIT flag is also specified." in parse_nat()
1508 /* NAT length is checked when parsing the nested attributes. */
1731 if (info->nat & OVS_CT_SRC_NAT) { in ovs_ct_nat_to_attr()
1734 } else if (info->nat & OVS_CT_DST_NAT) { in ovs_ct_nat_to_attr()
1828 if (ct_info->nat && !ovs_ct_nat_to_attr(ct_info, skb)) in ovs_ct_action_to_attr()
1847 if (ct_info->nat) in __ovs_ct_free_action()