The new package would help measuring one-way delays using ICMP type 13 packets. This is important for various scripts that automatically adjust CAKE shaper bandwidth based on the observed bufferbloat. They need to understand whether the delay is on the way up or on the way down, so that they can adjust the bandwidth of the proper part of the shaper. https://forum.openwrt.org/t/cake-w-adaptive-bandwidth-historic/108848 https://forum.openwrt.org/t/cake-w-adaptive-bandwidth/135379 V2: refreshed patches Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
22 lines
744 B
Diff
22 lines
744 B
Diff
Subject: Fix incorrect data size check for UDP.
|
|
Author: Luca Bigliardi <shammash@artha.org>
|
|
Bug-Debian; http://bugs.debian.org/546590
|
|
Last-Update: 2009-09-19
|
|
|
|
--- a/parseoptions.c
|
|
+++ b/parseoptions.c
|
|
@@ -606,9 +606,12 @@ int parse_options(int argc, char **argv)
|
|
if (opt_numeric == TRUE) opt_gethost = FALSE;
|
|
|
|
/* some error condition */
|
|
- if (data_size+IPHDR_SIZE+TCPHDR_SIZE > 65535) {
|
|
+ if (data_size+IPHDR_SIZE+
|
|
+ (opt_udpmode?UDPHDR_SIZE:TCPHDR_SIZE) > 65535) {
|
|
printf("Option error: sorry, data size must be <= %lu\n",
|
|
- (unsigned long)(65535-IPHDR_SIZE+TCPHDR_SIZE));
|
|
+ (unsigned long)(65535-(IPHDR_SIZE+
|
|
+ (opt_udpmode?UDPHDR_SIZE:TCPHDR_SIZE)))
|
|
+ );
|
|
exit(1);
|
|
}
|
|
else if (count <= 0 && count != -1) {
|