Hi,
I'm trying to send UDP packets with zero length withthis simple
configuration on trafgen:
{
# --- ethernet header ---
0xbe, 0x15, 0x1d, 0x12, 0x1c, 0x57, # mac destination
0xfa, 0x16, 0x3e, 0xa0, 0x5d, 0x18, # mac source
const16(0x0800), # protocol
# --- ip header ---
# ipv4 version (4-bit) + ihl (4-bit), tos
0b01000101, 0,
# ipv4 total len
const16(28),
# id (note: runtime dynamic random)
drnd(2),
# ipv4 3-bit flags + 13-bit fragment offset
# 001 = more fragments
0b01000000, 0,
64, # ttl
17, # proto udp
# dynamic ip checksum (note: offsets are zero indexed)
csumip(14, 33),
92, 222, 69, 15, # source ip
85, 214, 106, 103, # dest ip
# --- udp header ---
# as this is a fragment the below stuff does not matter too much
const16(48054), # src port
const16(28785), # dst port
const16(8), # udp length
# udp checksum can be dyn calc via csumudp(offset ip, offset tcp)
# which is csumudp(14, 34), but for udp its allowed to be zero
csumudp(14, 34),
}
I can send these packets on lo, but trafgen fails to send anything on
real devices. I used both the TX_RING and sendto method. I've tried with
iwlwifi and virtio. mausezahn on the contrary works. I checked with
strace and there does not seem to be any call that returns an error.
Lorenzo
--
You received this message because you are subscribed to the Google Groups
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.