how to create a TCP packet w/data in interrupt context?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I want to be able to create a TCP packet in an iptables rules, similar
to what REJECT --reject-with tcp-reset does, but this packet needs
some data to go in the payload. Is there some iptables rule or kernel
subsystem that already does this that I could look at for reference?
Or, does anyone have an idea of how I would go about doing this? I
already have a n RST that I am creating before this (a la REJECT), so
I figured I would just skb_copy_expand() that packet and add the
payload, but I'm not sure which fields in which structures need to be
updated when I do that.

I looked at pktgen, but that creates UDP packets. I also looked at the
TCP stack, but that copies its data from userland and I wasn't sure if
that series of operations would be the same from an iptables rule in
interrupt context. Anybody have any ideas on how to do this? Thanks.

-- 
[ Tobias DiPasquale ]
0x636f6465736c696e67657240676d61696c2e636f6d
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux