From: Yong Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH v1 2/3] dep nvgre: fix nvgre protocal can't analyze
Date: Fri, 11 Mar 2016 15:43:15 +0800 [thread overview]
Message-ID: <1457682196-10851-2-git-send-email-yong.liu@intel.com> (raw)
In-Reply-To: <1457682196-10851-1-git-send-email-yong.liu@intel.com>
NVGRE protocal conficted with GRE, so need to split GRE first.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/dep/nvgre.py b/dep/nvgre.py
index d844bd1..5dd9955 100644
--- a/dep/nvgre.py
+++ b/dep/nvgre.py
@@ -9,7 +9,9 @@ NVGRE (Network Virtual GRE).
from scapy.packet import *
from scapy.fields import *
from scapy.layers.inet import UDP,IP
+from scapy.layers.inet6 import IPv6
from scapy.layers.l2 import Ether
+from scapy.layers.l2 import GRE
IPPROTO_NVGRE=47
@@ -24,10 +26,13 @@ class NVGRE(Packet):
XShortField("protocoltype", 0x6558),
X3BytesField("TNI", 1),
ByteField("reserved1", 0)]
+
def mysummary(self):
return self.sprintf("NVGRE (tni=%NVGRE.tni%)")
-bind_layers(IP, NVGRE, proto=IPPROTO_NVGRE)
-bind_layers(NVGRE, Ether)
+bind_layers(NVGRE, Ether, protocoltype=0x6558)
+# fix conflict of GRE and NVGRE
+split_layers(IP, GRE, frag=0, proto=IPPROTO_NVGRE)
+bind_layers(IP, NVGRE, frag=0, proto=IPPROTO_NVGRE)
--
1.9.3
next prev parent reply other threads:[~2016-03-11 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 7:43 [dts] [PATCH v1 1/3] framework main: add dep folder as default path Yong Liu
2016-03-11 7:43 ` Yong Liu [this message]
2016-03-11 7:43 ` [dts] [PATCH v1 3/3] tests nvgre: fix nvgre chksum detect issue Yong Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457682196-10851-2-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).