path: root/src/extra/tcp.c
diff options
authorDuncan Roe <>2019-12-31 22:03:07 +1100
committerFlorian Westphal <>2020-01-03 13:23:08 +0100
commitc5bcd787a6a5e4c73d125ed5585bdc145e2a1958 (patch)
tree38e17d27b635907b06da62f08de82d06e8a36100 /src/extra/tcp.c
parent312e360b903b010a73a564068540f5917ba8134b (diff)
src: Always use pktb as formal arg of type struct pkt_buff
All remaining instances of pkt refer to something other than a pkt_buff. In the prototype for nfq_nlmsg_parse, pkt is changed to attr. Inconsistent whitespace in headers has been left for another day. Signed-off-by: Duncan Roe <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'src/extra/tcp.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/src/extra/tcp.c b/src/extra/tcp.c
index 64ab85f..0f83500 100644
--- a/src/extra/tcp.c
+++ b/src/extra/tcp.c
@@ -188,17 +188,17 @@ int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph)
* \note This function recalculates the IPv4 and TCP checksums for you.
-int nfq_tcp_mangle_ipv4(struct pkt_buff *pkt,
+int nfq_tcp_mangle_ipv4(struct pkt_buff *pktb,
unsigned int match_offset, unsigned int match_len,
const char *rep_buffer, unsigned int rep_len)
struct iphdr *iph;
struct tcphdr *tcph;
- iph = (struct iphdr *)pkt->network_header;
- tcph = (struct tcphdr *)(pkt->network_header + iph->ihl*4);
+ iph = (struct iphdr *)pktb->network_header;
+ tcph = (struct tcphdr *)(pktb->network_header + iph->ihl*4);
- if (!nfq_ip_mangle(pkt, iph->ihl*4 + tcph->doff*4,
+ if (!nfq_ip_mangle(pktb, iph->ihl*4 + tcph->doff*4,
match_offset, match_len, rep_buffer, rep_len))
return 0;