]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
patches: Align TCP_KEEP* macro values with those of Linux RELEASE-0.13.0 RELEASE-0.13.1
authorIoan-Teodor Teugea <ioan_teodor.teugea@stud.acs.upb.ro>
Fri, 21 Apr 2023 21:01:43 +0000 (00:01 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 5 May 2023 08:37:17 +0000 (08:37 +0000)
Add patch to change TCP define values
to the values currently used by the Linux kernel
for compatibility with socket related syscalls.

Signed-off-by: Ioan-Teodor Teugea <ioan_teodor.teugea@stud.acs.upb.ro>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Approved-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #34

patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h [new file with mode: 0644]

diff --git a/patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h b/patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h
new file mode 100644 (file)
index 0000000..36c2154
--- /dev/null
@@ -0,0 +1,19 @@
+Change TCP options macro definitions to those currently used by Linux
+for compatibility with socket syscalls.
+
+diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h
+--- a/src/include/lwip/sockets.h       2023-04-15 19:02:41.486964340 +0300
++++ b/src/include/lwip/sockets.h       2023-04-15 19:06:11.337323112 +0300
+@@ -60,9 +60,9 @@
+  */
+ #define TCP_NODELAY    0x01    /* don't delay send to coalesce packets */
+ #define TCP_KEEPALIVE  0x02    /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */
+-#define TCP_KEEPIDLE   0x03    /* set pcb->keep_idle  - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */
+-#define TCP_KEEPINTVL  0x04    /* set pcb->keep_intvl - Use seconds for get/setsockopt */
+-#define TCP_KEEPCNT    0x05    /* set pcb->keep_cnt   - Use number of probes sent for get/setsockopt */
++#define TCP_KEEPIDLE   0x04    /* set pcb->keep_idle  - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */
++#define TCP_KEEPINTVL  0x05    /* set pcb->keep_intvl - Use seconds for get/setsockopt */
++#define TCP_KEEPCNT    0x06    /* set pcb->keep_cnt   - Use number of probes sent for get/setsockopt */
+ #endif /* LWIP_TCP */
+ /* FD_SET used for lwip_select */