From patchwork Wed Sep 23 15:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1369909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxMXm4C1pz9ryj for ; Thu, 24 Sep 2020 01:29:12 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F403E3C4D75 for ; Wed, 23 Sep 2020 17:29:09 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id C02B73C1D97 for ; Wed, 23 Sep 2020 17:29:08 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 7B7F01400044 for ; Wed, 23 Sep 2020 17:29:08 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4BE20AA35; Wed, 23 Sep 2020 15:29:45 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 23 Sep 2020 17:29:02 +0200 Message-Id: <20200923152902.8738-1-pvorel@suse.cz> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 1/1] sendto: Add PACKET_VNET_HDR to lapi and use it X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" to fix build on CentOS 6 Fixme: b59c66210 ("Add test for CVE 2020-14386") Signed-off-by: Petr Vorel Reviewed-by: Li Wang --- 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(-) diff --git a/include/lapi/if_packet.h b/include/lapi/if_packet.h index 81110217d..902489b57 100644 --- a/include/lapi/if_packet.h +++ b/include/lapi/if_packet.h @@ -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 diff --git a/testcases/kernel/syscalls/sendto/sendto03.c b/testcases/kernel/syscalls/sendto/sendto03.c index a6332ec52..3ecb574a1 100644 --- a/testcases/kernel/syscalls/sendto/sendto03.c +++ b/testcases/kernel/syscalls/sendto/sendto03.c @@ -23,13 +23,13 @@ #include #include #include -#include #include #include #include #include "tst_test.h" #include "tst_net.h" +#include "lapi/if_packet.h" #define BUFSIZE 1024