I'm experiencing an issue pcktbatch, which is designed to send UDP packets of size between 1000 to 1200 bytes, only sends 42 bytes instead. This issue persists even after ensuring the correct packet size is being processed by pcktbatch before transmission.
```
pcktbatch -v -z --interface ens3 --sip 10.0.0.88 --dip 10.0.0.1 --protocol udp --delay 10000 --udport 53 --time 4 --pstatic 1 --pmin 1000 --pmax 1200 --l3csum 1 --l4csum 1 --threads 1
Running AF_XDP sockets with batch size => 1.
No config specified. Using default: /etc/pcktbatch/conf.json.
Using command line...
Attempting to setup AF_XDP socket. Dev => ens3. Thread ID => 0.
Created AF_XDP socket at index 0 (FD => 3).
[1] Source MAC address => 52:54:0:2c:a:12.
[1] Destination MAC address => 0:0:5e:0:1:0.
[1][1] Sent 42 bytes of data from 10.0.0.88:43014 to 10.0.0.1:53.
[1][1] Sent 42 bytes of data from 10.0.0.88:9806 to 10.0.0.1:53.
[1][1] Sent 42 bytes of data from 10.0.0.88:38728 to 10.0.0.1:53.
[1][1] Sent 42 bytes of data from 10.0.0.88:64382 to 10.0.0.1:53.
[1][1] Sent 42 bytes of data from 10.0.0.88:25510 to 10.0.0.1:53.
uname -a
Linux labs1 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
ethtool -i ens3
driver: virtio_net
version: 1.0.0
```
Is this a known issue ? Are there any specific configurations or workarounds that can resolve this problem?
Thank you for your assistance.
Hey! Thank you for the report.
I've pushed a commit to the [PB-Common](https://github.com/Packet-Batch/PB-Common) repository which is used as a sub-module in PB-AF-XDP that fixes this issue. The issue occurred because I redesigned the payload system the last time I worked on the project and forgot to set the payload count to `1` when payload options were specified through the command line.
This should be fixed now! Please try `git pull` in the main repository (or `git pull` in [`modules/common`](https://github.com/Packet-Batch/PB-Common/tree/3b9223cdb0a596d08133e1c6e71863ab1a9c81fe)). Afterwards, rebuild and run again.
Here's the output of Packet Batch used with the list argument (`-l`) with the fix which shows the payload options are now specified which was not the case before.
```bash
christian@dev-debian12:~/PB-AF-XDP$ sudo pcktbatch -z --interface enp1s0 --dmac "X1:X2:X3:X3:X4:X5" --protocol udp --dip 1.2.3.4 --pexact "01 02 03 04" -l
Using command line...
Found 1 sequences.
Got interface => enp1s0.
Sequences:
--------------------------
Sequence #0:
General
Includes =>
Interface Override => enp1s0
Block => Yes
Track => No
Max Packets => 0
Max Bytes => 0.
Packets Per Second => 0.
Bytes Per Second => 0
Time => 0
Delay => 1000000
Threads => 0
Ethernet
Source MAC => N/A
Destination MAC => X1:X2:X3:X3:X4:X5
IP
Protocol => udp
Source IP => N/A
Destination IP => 1.2.3.4
Type of Service => 0
Min TTL => 64
Max TTL => 64
Min ID => 0
Max ID => 64000
Checksum => Yes
Ranges:
- 172.16.0.0./16
- 10.60.0.0/24
- 192.168.30.0/24
TCP
Source Port => 0
Dest Port => 0
Use Socket => No
One Connection => No
SYN Flag => No
PSH Flag => No
FIN Flag => No
ACK Flag => No
RST Flag => No
URG Flag => No
ECE Flag => No
CWR Flag => No
UDP
Src Port => 0
Dst Port => 0
ICMP
Code => 0
Type => 0
Layer 4
Checksum => Yes
Payloads (1)
#1
Min Length => 0
Max Length => 0
Is Static => No
Is File => No
Is String => No
Exact String => 01 02 03 04
```
If you are still experiencing issues, please let me know!