Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c9fba65 authored by Jan Engelhardt's avatar Jan Engelhardt Committed by Patrick McHardy
Browse files

[NETFILTER]: nf_conntrack: replace NF_CT_DUMP_TUPLE macro indrection by function call



Directly call IPv4 and IPv6 variants where the address family is
easily known.

Signed-off-by: default avatarJan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 12c33aa2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -151,8 +151,6 @@ static inline void nf_ct_dump_tuple(const struct nf_conntrack_tuple *t)
	}
}

#define NF_CT_DUMP_TUPLE(tp)	nf_ct_dump_tuple(tp)

/* If we're the first tuple, it's the original dir. */
#define NF_CT_DIRECTION(h)						\
	((enum ip_conntrack_dir)(h)->tuple.dst.dir)
+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ clusterip_tg(struct sk_buff *skb, const struct net_device *in,
	}

#ifdef DEBUG
	NF_CT_DUMP_TUPLE(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
	nf_ct_dump_tuple_ip(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
#endif
	pr_debug("hash=%u ct_hash=%u ", hash, ct->mark);
	if (!clusterip_responsible(cipinfo->config, hash)) {
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static bool icmp_new(struct nf_conn *ct, const struct sk_buff *skb,
		/* Can't create a new ICMP `conn' with this. */
		pr_debug("icmp: can't create new conn with type %u\n",
			 ct->tuplehash[0].tuple.dst.u.icmp.type);
		NF_CT_DUMP_TUPLE(&ct->tuplehash[0].tuple);
		nf_ct_dump_tuple_ip(&ct->tuplehash[0].tuple);
		return false;
	}
	atomic_set(&ct->proto.icmp.count, 0);
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ static void pptp_nat_expected(struct nf_conn *ct,
	}

	pr_debug("trying to unexpect other dir: ");
	NF_CT_DUMP_TUPLE(&t);
	nf_ct_dump_tuple_ip(&t);
	other_exp = nf_ct_expect_find_get(&t);
	if (other_exp) {
		nf_ct_unexpect_related(other_exp);
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static bool icmpv6_new(struct nf_conn *ct, const struct sk_buff *skb,
		/* Can't create a new ICMPv6 `conn' with this. */
		pr_debug("icmpv6: can't create new conn with type %u\n",
			 type + 128);
		NF_CT_DUMP_TUPLE(&ct->tuplehash[0].tuple);
		nf_ct_dump_tuple_ipv6(&ct->tuplehash[0].tuple);
		return false;
	}
	atomic_set(&ct->proto.icmp.count, 0);
Loading