This function is now obsolete and always returns false. This change has no effect on generated code.
Unified · Split
| @@ -1555,7 +1555,7 @@ static inline void ip_vs_notrack(struct sk_buff *skb) · 1554 unmodified lines | ||
| 1555 | 1555 | enum ip_conntrack_info ctinfo; |
| 1556 | 1556 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 1557 | 1557 | |
| 1558 | − if (!ct || !nf_ct_is_untracked(ct)) { | |
| 1558 | + if (ct) { | |
| 1559 | 1559 | nf_conntrack_put(&ct->ct_general); |
| 1560 | 1560 | nf_ct_set(skb, NULL, IP_CT_UNTRACKED); |
| 1561 | 1561 | } |
| @@ -1616,7 +1616,7 @@ static inline bool ip_vs_conn_uses_conntrack(struct ip_vs_conn *cp, · 54 unmodified lines | ||
| 1616 | 1616 | if (!(cp->flags & IP_VS_CONN_F_NFCT)) |
| 1617 | 1617 | return false; |
| 1618 | 1618 | ct = nf_ct_get(skb, &ctinfo); |
| 1619 | − if (ct && !nf_ct_is_untracked(ct)) | |
| 1619 | + if (ct) | |
| 1620 | 1620 | return true; |
| 1621 | 1621 | #endif |
| 1622 | 1622 | return false; |
| @@ -273,11 +273,6 @@ static inline int nf_ct_is_dying(const struct nf_conn *ct) · 272 unmodified lines | ||
| 273 | 273 | return test_bit(IPS_DYING_BIT, &ct->status); |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | −static inline int nf_ct_is_untracked(const struct nf_conn *ct) | |
| 277 | −{ | |
| 278 | − return false; | |
| 279 | −} | |
| 280 | − | |
| 281 | 276 | /* Packet is received from loopback */ |
| 282 | 277 | static inline bool nf_is_loopback_packet(const struct sk_buff *skb) |
| 283 | 278 | { |
| @@ -65,7 +65,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb) · 64 unmodified lines | ||
| 65 | 65 | struct nf_conn *ct = (struct nf_conn *)skb_nfct(skb); |
| 66 | 66 | int ret = NF_ACCEPT; |
| 67 | 67 | |
| 68 | − if (ct && !nf_ct_is_untracked(ct)) { | |
| 68 | + if (ct) { | |
| 69 | 69 | if (!nf_ct_is_confirmed(ct)) |
| 70 | 70 | ret = __nf_conntrack_confirm(skb); |
| 71 | 71 | if (likely(ret == NF_ACCEPT)) |
| @@ -264,10 +264,6 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, · 263 unmodified lines | ||
| 264 | 264 | if (!ct) |
| 265 | 265 | return NF_ACCEPT; |
| 266 | 266 | |
| 267 | − /* Don't try to NAT if this packet is not conntracked */ | |
| 268 | − if (nf_ct_is_untracked(ct)) | |
| 269 | − return NF_ACCEPT; | |
| 270 | − | |
| 271 | 267 | nat = nf_ct_nat_ext_add(ct); |
| 272 | 268 | if (nat == NULL) |
| 273 | 269 | return NF_ACCEPT; |
| @@ -139,7 +139,7 @@ struct sock *nf_sk_lookup_slow_v4(struct net *net, const struct sk_buff *skb, · 138 unmodified lines | ||
| 139 | 139 | * SNAT-ted connection. |
| 140 | 140 | */ |
| 141 | 141 | ct = nf_ct_get(skb, &ctinfo); |
| 142 | − if (ct && !nf_ct_is_untracked(ct) && | |
| 142 | + if (ct && | |
| 143 | 143 | ((iph->protocol != IPPROTO_ICMP && |
| 144 | 144 | ctinfo == IP_CT_ESTABLISHED_REPLY) || |
| 145 | 145 | (iph->protocol == IPPROTO_ICMP && |
| @@ -273,10 +273,6 @@ nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, · 272 unmodified lines | ||
| 273 | 273 | if (!ct) |
| 274 | 274 | return NF_ACCEPT; |
| 275 | 275 | |
| 276 | − /* Don't try to NAT if this packet is not conntracked */ | |
| 277 | − if (nf_ct_is_untracked(ct)) | |
| 278 | − return NF_ACCEPT; | |
| 279 | − | |
| 280 | 276 | nat = nf_ct_nat_ext_add(ct); |
| 281 | 277 | if (nat == NULL) |
| 282 | 278 | return NF_ACCEPT; |
| @@ -260,9 +260,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, · 259 unmodified lines | ||
| 260 | 260 | buf_len = strlen(buf); |
| 261 | 261 | |
| 262 | 262 | ct = nf_ct_get(skb, &ctinfo); |
| 263 | − if (ct && !nf_ct_is_untracked(ct) && (ct->status & IPS_NAT_MASK)) { | |
| 263 | + if (ct && nfct_nat(ct)) { | |
| 264 | 264 | bool mangled; |
| 265 | − | |
| 266 | 265 | /* If mangling fails this function will return 0 |
| 267 | 266 | * which will cause the packet to be dropped. |
| 268 | 267 | * Mangling can only fail under memory pressure, |
| @@ -85,7 +85,7 @@ ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, int outin) · 84 unmodified lines | ||
| 85 | 85 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 86 | 86 | struct nf_conntrack_tuple new_tuple; |
| 87 | 87 | |
| 88 | − if (ct == NULL || nf_ct_is_confirmed(ct) || nf_ct_is_untracked(ct) || | |
| 88 | + if (ct == NULL || nf_ct_is_confirmed(ct) || | |
| 89 | 89 | nf_ct_is_dying(ct)) |
| 90 | 90 | return; |
| 91 | 91 | |
| @@ -232,7 +232,7 @@ void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, · 140 unmodified lines | ||
| 232 | 232 | { |
| 233 | 233 | struct nf_conntrack_expect *exp; |
| 234 | 234 | |
| 235 | − if (ct == NULL || nf_ct_is_untracked(ct)) | |
| 235 | + if (ct == NULL) | |
| 236 | 236 | return; |
| 237 | 237 | |
| 238 | 238 | exp = nf_ct_expect_alloc(ct); |
| @@ -775,7 +775,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, · 774 unmodified lines | ||
| 775 | 775 | enum ip_conntrack_info ctinfo; |
| 776 | 776 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 777 | 777 | |
| 778 | − if (ct && !nf_ct_is_untracked(ct)) { | |
| 778 | + if (ct) { | |
| 779 | 779 | IP_VS_DBG_RL_PKT(10, AF_INET, pp, skb, ipvsh->off, |
| 780 | 780 | "ip_vs_nat_xmit(): " |
| 781 | 781 | "stopping DNAT to local address"); |
| @@ -866,7 +866,7 @@ ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, · 84 unmodified lines | ||
| 866 | 866 | enum ip_conntrack_info ctinfo; |
| 867 | 867 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 868 | 868 | |
| 869 | − if (ct && !nf_ct_is_untracked(ct)) { | |
| 869 | + if (ct) { | |
| 870 | 870 | IP_VS_DBG_RL_PKT(10, AF_INET6, pp, skb, ipvsh->off, |
| 871 | 871 | "ip_vs_nat_xmit_v6(): " |
| 872 | 872 | "stopping DNAT to local address"); |
| @@ -1338,7 +1338,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, · 465 unmodified lines | ||
| 1338 | 1338 | enum ip_conntrack_info ctinfo; |
| 1339 | 1339 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 1340 | 1340 | |
| 1341 | − if (ct && !nf_ct_is_untracked(ct)) { | |
| 1341 | + if (ct) { | |
| 1342 | 1342 | IP_VS_DBG(10, "%s(): " |
| 1343 | 1343 | "stopping DNAT to local address %pI4\n", |
| 1344 | 1344 | __func__, &cp->daddr.ip); |
| @@ -1429,7 +1429,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, · 84 unmodified lines | ||
| 1429 | 1429 | enum ip_conntrack_info ctinfo; |
| 1430 | 1430 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 1431 | 1431 | |
| 1432 | − if (ct && !nf_ct_is_untracked(ct)) { | |
| 1432 | + if (ct) { | |
| 1433 | 1433 | IP_VS_DBG(10, "%s(): " |
| 1434 | 1434 | "stopping DNAT to local address %pI6\n", |
| 1435 | 1435 | __func__, &cp->daddr.in6); |
| @@ -627,10 +627,6 @@ ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) · 626 unmodified lines | ||
| 627 | 627 | unsigned int flags = 0, group; |
| 628 | 628 | int err; |
| 629 | 629 | |
| 630 | − /* ignore our fake conntrack entry */ | |
| 631 | − if (nf_ct_is_untracked(ct)) | |
| 632 | − return 0; | |
| 633 | − | |
| 634 | 630 | if (events & (1 << IPCT_DESTROY)) { |
| 635 | 631 | type = IPCTNL_MSG_CT_DELETE; |
| 636 | 632 | group = NFNLGRP_CONNTRACK_DESTROY; |
| @@ -2173,13 +2169,7 @@ ctnetlink_glue_build_size(const struct nf_conn *ct) · 1536 unmodified lines | ||
| 2173 | 2169 | static struct nf_conn *ctnetlink_glue_get_ct(const struct sk_buff *skb, |
| 2174 | 2170 | enum ip_conntrack_info *ctinfo) |
| 2175 | 2171 | { |
| 2176 | − struct nf_conn *ct; | |
| 2177 | − | |
| 2178 | − ct = nf_ct_get(skb, ctinfo); | |
| 2179 | − if (ct && nf_ct_is_untracked(ct)) | |
| 2180 | − ct = NULL; | |
| 2181 | − | |
| 2182 | − return ct; | |
| 2172 | + return nf_ct_get(skb, ctinfo); | |
| 2183 | 2173 | } |
| 2184 | 2174 | |
| 2185 | 2175 | static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) |
| @@ -84,7 +84,7 @@ hmark_ct_set_htuple(const struct sk_buff *skb, struct hmark_tuple *t, · 83 unmodified lines | ||
| 84 | 84 | struct nf_conntrack_tuple *otuple; |
| 85 | 85 | struct nf_conntrack_tuple *rtuple; |
| 86 | 86 | |
| 87 | − if (ct == NULL || nf_ct_is_untracked(ct)) | |
| 87 | + if (ct == NULL) | |
| 88 | 88 | return -1; |
| 89 | 89 | |
| 90 | 90 | otuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; |
| @@ -121,9 +121,6 @@ xt_cluster_mt(const struct sk_buff *skb, struct xt_action_param *par) · 120 unmodified lines | ||
| 121 | 121 | if (ct == NULL) |
| 122 | 122 | return false; |
| 123 | 123 | |
| 124 | − if (nf_ct_is_untracked(ct)) | |
| 125 | − return false; | |
| 126 | − | |
| 127 | 124 | if (ct->master) |
| 128 | 125 | hash = xt_cluster_hash(ct->master, info); |
| 129 | 126 | else |
| @@ -29,7 +29,7 @@ connlabel_mt(const struct sk_buff *skb, struct xt_action_param *par) · 28 unmodified lines | ||
| 29 | 29 | bool invert = info->options & XT_CONNLABEL_OP_INVERT; |
| 30 | 30 | |
| 31 | 31 | ct = nf_ct_get(skb, &ctinfo); |
| 32 | − if (ct == NULL || nf_ct_is_untracked(ct)) | |
| 32 | + if (ct == NULL) | |
| 33 | 33 | return invert; |
| 34 | 34 | |
| 35 | 35 | labels = nf_ct_labels_find(ct); |
| @@ -44,7 +44,7 @@ connmark_tg(struct sk_buff *skb, const struct xt_action_param *par) · 43 unmodified lines | ||
| 44 | 44 | u_int32_t newmark; |
| 45 | 45 | |
| 46 | 46 | ct = nf_ct_get(skb, &ctinfo); |
| 47 | − if (ct == NULL || nf_ct_is_untracked(ct)) | |
| 47 | + if (ct == NULL) | |
| 48 | 48 | return XT_CONTINUE; |
| 49 | 49 | |
| 50 | 50 | switch (info->mode) { |
| @@ -97,7 +97,7 @@ connmark_mt(const struct sk_buff *skb, struct xt_action_param *par) · 46 unmodified lines | ||
| 97 | 97 | const struct nf_conn *ct; |
| 98 | 98 | |
| 99 | 99 | ct = nf_ct_get(skb, &ctinfo); |
| 100 | − if (ct == NULL || nf_ct_is_untracked(ct)) | |
| 100 | + if (ct == NULL) | |
| 101 | 101 | return false; |
| 102 | 102 | |
| 103 | 103 | return ((ct->mark & info->mask) == info->mark) ^ info->invert; |
| @@ -116,7 +116,7 @@ ipvs_mt(const struct sk_buff *skb, struct xt_action_param *par) · 115 unmodified lines | ||
| 116 | 116 | enum ip_conntrack_info ctinfo; |
| 117 | 117 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); |
| 118 | 118 | |
| 119 | − if (ct == NULL || nf_ct_is_untracked(ct)) { | |
| 119 | + if (ct == NULL) { | |
| 120 | 120 | match = false; |
| 121 | 121 | goto out_put_cp; |
| 122 | 122 | } |
| @@ -795,11 +795,6 @@ static int ovs_ct_nat(struct net *net, struct sw_flow_key *key, · 794 unmodified lines | ||
| 795 | 795 | enum nf_nat_manip_type maniptype; |
| 796 | 796 | int err; |
| 797 | 797 | |
| 798 | − if (nf_ct_is_untracked(ct)) { | |
| 799 | − /* A NAT action may only be performed on tracked packets. */ | |
| 800 | − return NF_ACCEPT; | |
| 801 | − } | |
| 802 | − | |
| 803 | 798 | /* Add NAT extension if not confirmed yet. */ |
| 804 | 799 | if (!nf_ct_is_confirmed(ct) && !nf_ct_nat_ext_add(ct)) |
| 805 | 800 | return NF_ACCEPT; /* Can't NAT. */ |