Welcome to the Linux Foundation Forum!

Adding tail to tcp/ip traffic

The goal is to modify 4.14 kernel to add/remove tails (too bytes) to all tcp/ip packets on data link layer (in such a way not to modify packets). Where in the kernel can that be done? I tried ip_input(), ip_output(), arp_rcv(), functions with help of skb_trim()... But it works unstable... Where in the kernel can I modify packets, in such a way it'd be transparent to the stack (like tails are added in the link layer by device). Maybe i have to try net_action_rx/tx functions? (Netfilter hooks is not an option)?


Upcoming Training