Hello:
    I am having an odd issue.
    I tried to read the udp data by tc ebpf da, however it worked only
when the data length <= 214.
    As far as I know, data_end points to the end of the linear data,
that means the skb should be enough for more than 214 in general.
    Any ideas about how to avoid the issue? Thanks!

# uname -a
Linux ip-10-0-0-2 4.15.0-1021-aws #21-Ubuntu SMP Tue Aug 28 10:23:07
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# tc -V
tc utility, iproute2-ss180129

Here is the test code:

#############################################################

ebpf_debug("level 4: %p - %p\n", udph, data_end);

__u32 *data32 = (__u32 *)(udph + 1);;

ebpf_debug("level 7: %p - %p\n", data32, data_end);

if (data32 + 1 > data_end)
    return;

ebpf_debug("%u\n", data32[0]);

############################################################

Here is the test:

1) 10.0.0.3-me # nmap -sU -p 10000 10.0.0.2 --data-length 214

level 4: 00000000c6983314 - 00000000b11428cf
level 7: 000000002a31fcec - 00000000b11428cf
4036810185

2) 10.0.0.3-me # nmap -sU -p 10000 10.0.0.2 --data-length 215

level 4: 00000000ce4077ab - 00000000ce32b26c
level 7: 00000000ce32b26c - 00000000ce32b26c

Reply via email to