skbuff: add and use skb_nfct helper
Followup patch renames skb->nfct and changes its type so add a helper to avoid intrusive rename change later. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
97a6ad13de
commit
cb9c68363e
@@ -121,8 +121,8 @@ synproxy_send_client_synack(struct net *net,
|
||||
|
||||
synproxy_build_options(nth, opts);
|
||||
|
||||
synproxy_send_tcp(net, skb, nskb, skb->nfct, IP_CT_ESTABLISHED_REPLY,
|
||||
niph, nth, tcp_hdr_size);
|
||||
synproxy_send_tcp(net, skb, nskb, skb_nfct(skb),
|
||||
IP_CT_ESTABLISHED_REPLY, niph, nth, tcp_hdr_size);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -244,8 +244,8 @@ synproxy_send_client_ack(struct net *net,
|
||||
|
||||
synproxy_build_options(nth, opts);
|
||||
|
||||
synproxy_send_tcp(net, skb, nskb, skb->nfct, IP_CT_ESTABLISHED_REPLY,
|
||||
niph, nth, tcp_hdr_size);
|
||||
synproxy_send_tcp(net, skb, nskb, skb_nfct(skb),
|
||||
IP_CT_ESTABLISHED_REPLY, niph, nth, tcp_hdr_size);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -153,7 +153,7 @@ icmpv6_error_message(struct net *net, struct nf_conn *tmpl,
|
||||
enum ip_conntrack_info ctinfo;
|
||||
struct nf_conntrack_zone tmp;
|
||||
|
||||
NF_CT_ASSERT(skb->nfct == NULL);
|
||||
NF_CT_ASSERT(!skb_nfct(skb));
|
||||
|
||||
/* Are they talking about one of our connections? */
|
||||
if (!nf_ct_get_tuplepr(skb,
|
||||
@@ -224,7 +224,7 @@ icmpv6_error(struct net *net, struct nf_conn *tmpl,
|
||||
noct_valid_new[type]) {
|
||||
skb->nfct = &nf_ct_untracked_get()->ct_general;
|
||||
skb->nfctinfo = IP_CT_NEW;
|
||||
nf_conntrack_get(skb->nfct);
|
||||
nf_conntrack_get(skb_nfct(skb));
|
||||
return NF_ACCEPT;
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ static enum ip6_defrag_users nf_ct6_defrag_user(unsigned int hooknum,
|
||||
{
|
||||
u16 zone_id = NF_CT_DEFAULT_ZONE_ID;
|
||||
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
|
||||
if (skb->nfct) {
|
||||
if (skb_nfct(skb)) {
|
||||
enum ip_conntrack_info ctinfo;
|
||||
const struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
|
||||
|
||||
@@ -61,7 +61,7 @@ static unsigned int ipv6_defrag(void *priv,
|
||||
|
||||
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
|
||||
/* Previously seen (loopback)? */
|
||||
if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct))
|
||||
if (skb_nfct(skb) && !nf_ct_is_template((struct nf_conn *)skb_nfct(skb)))
|
||||
return NF_ACCEPT;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user