Skip to contentSkip to conversation

sendto: Add PACKET_VNET_HDR to lapi and use it

PATCH New Petr Vorel 2 participants 3 messages Sep 23, 2020 – Sep 24, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 sendto: Add PACKET_VNET_HDR to lapi and use it

to fix build on CentOS 6

Fixme: b59c66210 ("Add test for CVE 2020-14386")

---
changes v1->v2:
* actually add lapi header

 include/lapi/if_packet.h                    | 4 ++++
 testcases/kernel/syscalls/sendto/sendto03.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
include/lapi/if_packet.h +4 -0
index 81110217d..902489b57 100644
@@ -25,6 +25,10 @@
 # define PACKET_RESERVE 12
 #endif
 
+#ifndef PACKET_VNET_HDR
+#define PACKET_VNET_HDR	15
+#endif
+
 #ifndef PACKET_FANOUT
 #define PACKET_FANOUT	18
 #endif
testcases/kernel/syscalls/sendto/sendto03.c +1 -1
index a6332ec52..3ecb574a1 100644
@@ -23,13 +23,13 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <linux/if_packet.h>
 #include <net/if.h>
 #include <net/ethernet.h>
 #include <sched.h>
 
 #include "tst_test.h"
 #include "tst_net.h"
+#include "lapi/if_packet.h"
 
 #define BUFSIZE 1024
 
Signature · 1 line
2.28.0
#1 lore raw

PATCH v2 1/1 sendto: Add PACKET_VNET_HDR to lapi and use it

Quoted 5 lines · Petr Vorel

to fix build on CentOS 6

Fixme: b59c66210 ("Add test for CVE 2020-14386")

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200924/2bd9a07c/attachment.htm>