lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b5f8fbcacab6ccd382d7e52f7b4066e21728419e.1481586602.git.mirq-linux@rere.qmqm.pl>
Date:   Tue, 13 Dec 2016 01:12:41 +0100 (CET)
From:   Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:     netdev@...r.kernel.org
Cc:     Alexei Starovoitov <ast@...nel.org> (supporter:BPF (Safe dynamic
        programs and tools)),
        netdev@...r.kernel.org (open list:BPF (Safe dynamic programs and tools)),
        linux-kernel@...r.kernel.org (open list:BPF (Safe dynamic programs and
        tools))
Subject: [PATCH net-next 24/27] bpf_test: prepare for VLAN_TAG_PRESENT removal

Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
 lib/test_bpf.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 0362da0..00d3450 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -691,8 +691,13 @@ static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{ 1, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT },
 			{ 10, SKB_VLAN_TCI & ~VLAN_TAG_PRESENT }
+#else
+			{ 1, SKB_VLAN_TCI },
+			{ 10, SKB_VLAN_TCI }
+#endif
 		},
 	},
 	{
@@ -705,8 +710,13 @@ static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{ 1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
 			{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
+#else
+			{ 1, SKB_VLAN_PRESENT },
+			{ 10, SKB_VLAN_PRESENT }
+#endif
 		},
 	},
 	{
@@ -4773,8 +4783,13 @@ static struct bpf_test tests[] = {
 		CLASSIC,
 		{ },
 		{
+#ifdef VLAN_TAG_PRESENT
 			{  1, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) },
 			{ 10, !!(SKB_VLAN_TCI & VLAN_TAG_PRESENT) }
+#else
+			{  1, SKB_VLAN_PRESENT },
+			{ 10, SKB_VLAN_PRESENT }
+#endif
 		},
 		.fill_helper = bpf_fill_maxinsns6,
 	},
-- 
2.10.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ