Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD-type 2 support #1

Merged
merged 1 commit into from
Dec 26, 2015
Merged

Conversation

upa
Copy link

@upa upa commented Dec 26, 2015

add support MD-Type2 variable length contexts, and remove Network|Service Platform|Shared Contexts.
They have been removed from ietf-sfc-nsh-01? https://tools.ietf.org/html/draft-ietf-sfc-nsh-01

I would be happy if you could merge this commit into the pr the-tcpdump-group#490 .

MD-type 1 and type 2 (no metadata) outputs are shown below.

% sudo ./tcpdump -vvvni eth0 port 4790
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:25:58.510999 IP (tos 0x0, ttl 64, id 2016, offset 0, flags [none], proto UDP (17), length 102)
    10.0.2.15.4790 > 10.10.10.10.4790: [no cksum] VXLAN-GPE, flags [IP], vni 10
    NSH, ver 0, flags [], length 6, MD Type 0x1, Next Protocol 0x3, Service Path ID 0x00000b, Service Index 0x5
        Context[00]: 0x00000000
        Context[01]: 0x00000000
        Context[02]: 0x00000000
        Context[03]: 0x00000000
    ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.16.0.2 tell 172.16.0.1, length 28

and

% sudo ./tcpdump -vvvni eth0 port 4790
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:26:37.302777 IP (tos 0x0, ttl 64, id 7460, offset 0, flags [none], proto UDP (17), length 86)
    10.0.2.15.4790 > 10.10.10.10.4790: [no cksum] VXLAN-GPE, flags [IP], vni 11
    NSH, ver 0, flags [], length 2, MD Type 0x2, Next Protocol 0x3, Service Path ID 0x00000c, Service Index 0x5
    ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.16.0.2 tell 172.16.0.1, length 28

@bugyo
Copy link
Owner

bugyo commented Dec 26, 2015

Thank you for your help.
The names of contexts are removed from the draft is certainly true.
I will merge this pull request immediately.

And, I think I have to correct the condition " if(len < 24) " to " if(len < 8) ". Is it reasonable?

@upa
Copy link
Author

upa commented Dec 26, 2015

And, I think I have to correct the condition " if(len < 24) " to " if(len < 8) ". Is it reasonable?

Yes! I missed this point. thank you.
Minimum length is nsh base header + nsh path header = 8 byte (MD-type 2 and no metadata).

@bugyo bugyo merged commit a767d17 into bugyo:nsh-o-vxlan-gpe Dec 26, 2015
@upa
Copy link
Author

upa commented Dec 26, 2015

So sorry,,,

when vflag is not set, contexts are not counted... I fixed this bug.
could you merge this commit upa@d973379 ?

@bugyo
Copy link
Owner

bugyo commented Dec 26, 2015

OK, I merged the commit and packed these commits. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants