Lines Matching full:nat
60 OVS_CT_NAT = 1 << 0, /* NAT for committed connections only. */
61 OVS_CT_SRC_NAT = 1 << 1, /* Source NAT for NEW connections. */
62 OVS_CT_DST_NAT = 1 << 2, /* Destination NAT for NEW connections. */
71 u8 nat : 3; /* enum ovs_ct_nat */ member
79 struct nf_nat_range2 range; /* Only present for SRC NAT and DST NAT. */
237 * 'keep_nat_flags' is true, the existing NAT flags retained, else they are
490 * FTP with NAT) adusting the TCP payload size when mangling IP in ovs_ct_helper()
623 /* Must invert the tuple if skb has been transformed by NAT. */ in ovs_ct_find_existing()
728 * range is only used for new, uninitialized NAT state.
743 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in ovs_ct_nat_execute()
745 hooknum = NF_INET_LOCAL_OUT; /* Destination NAT */ in ovs_ct_nat_execute()
781 /* Initialize according to the NAT action. */ in ovs_ct_nat_execute()
870 /* Add NAT extension if not confirmed yet. */ in ovs_ct_nat()
872 return NF_ACCEPT; /* Can't NAT. */ in ovs_ct_nat()
874 /* Determine NAT type. in ovs_ct_nat()
875 * Check if the NAT type can be deduced from the tracked connection. in ovs_ct_nat()
879 if (info->nat & OVS_CT_NAT && ctinfo != IP_CT_NEW && in ovs_ct_nat()
882 /* NAT an established or related connection like before. */ in ovs_ct_nat()
885 * for which NAT was applied in the forward in ovs_ct_nat()
886 * direction. Do the reverse NAT. in ovs_ct_nat()
893 } else if (info->nat & OVS_CT_SRC_NAT) { in ovs_ct_nat()
895 } else if (info->nat & OVS_CT_DST_NAT) { in ovs_ct_nat()
917 /* Mark NAT done if successful and update the flow key. */ in ovs_ct_nat()
969 /* Clear CT state NAT flags to mark that we have not yet done in __ovs_ct_lookup()
970 * NAT after the nf_conntrack_in() call. We can actually clear in __ovs_ct_lookup()
975 /* Update the key, but keep the NAT flags. */ in __ovs_ct_lookup()
982 * helper, so that the helper knows about the NAT. We enforce in __ovs_ct_lookup()
983 * this by delaying both NAT and helper calls for unconfirmed in __ovs_ct_lookup()
985 * packets NAT and Helper may be called in either order. in __ovs_ct_lookup()
987 * NAT will be done only if the CT action has NAT, and only in __ovs_ct_lookup()
988 * once per packet (per zone), as guarded by the NAT bits in in __ovs_ct_lookup()
991 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && in __ovs_ct_lookup()
1043 * committed, so we are not calling into NAT here. in ovs_ct_lookup()
1334 if (info->nat) in ovs_ct_add_helper()
1367 OVS_NLERR(log, "Unknown NAT attribute (type=%d, max=%d)", in parse_nat()
1373 OVS_NLERR(log, "NAT attribute type %d has unexpected length (%d != %d)", in parse_nat()
1382 if (info->nat) { in parse_nat()
1383 OVS_NLERR(log, "Only one type of NAT may be specified"); in parse_nat()
1386 info->nat |= OVS_CT_NAT; in parse_nat()
1387 info->nat |= ((type == OVS_NAT_ATTR_SRC) in parse_nat()
1428 OVS_NLERR(log, "Unknown nat attribute (%d)", type); in parse_nat()
1434 OVS_NLERR(log, "NAT attribute has %d unknown bytes", rem); in parse_nat()
1437 if (!info->nat) { in parse_nat()
1441 "NAT flags may be given only when NAT range (SRC or DST) is also specified." in parse_nat()
1445 info->nat = OVS_CT_NAT; /* NAT existing connections. */ in parse_nat()
1448 "NAT attributes may be specified only when CT COMMIT flag is also specified." in parse_nat()
1478 /* NAT length is checked when parsing the nested attributes. */
1678 if (info->nat & OVS_CT_SRC_NAT) { in ovs_ct_nat_to_attr()
1681 } else if (info->nat & OVS_CT_DST_NAT) { in ovs_ct_nat_to_attr()
1771 if (ct_info->nat && !ovs_ct_nat_to_attr(ct_info, skb)) in ovs_ct_action_to_attr()