[NETVIRT-651] Malformed NSH packets encapsulated by SFC Classifier get dropped Created: 04/May/17  Updated: 19/Oct/17  Resolved: 15/May/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Carbon
Fix Version/s: None

Type: Bug
Reporter: Brady Johnson Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8375
Priority: High

 Description   

The packets that get NSH encapsulated by the SFC Classifier are not setting the NSH NextProtocol (NP) field, so they are dropped by the SFF OVS bridge. Since the NSH NP field is not set, it defaults to 0 (zero) which is not valid.

The NSH NP field should be set to 3 for Ethernet.

Here's a packet dump:

0x0000: 4500 0094 f544 4000 4011 ece8 ac13 0003
0x0010: ac13 0002 ec6c 1310 0080 0000 0c00 0003
0x0020: 0000 0800 ee4e 4e9a c2f3 c2cd eed2 4fcc
0x0030: 894f 0006 0100 0000 35ff 0000 0000 0000
0x0040: 0008 0000 0000 0000 0000 ee4e 4e9a c2f3
0x0050: c2cd eed2 4fcc 0800 4500 003c 47bb 4000
0x0060: 4006 defc 0a00 0002 0a00 0003 d3b8 0050
0x0070: e82f e9a7 0000 0000 a002 7210 6cef 0000
0x0080: 0204 05b4 0402 080a 0100 ae1c 0000 0000
0x0090: 0103 0306

And here is the same packet "parsed" where you can see the NSH Base Header=0x00060100

NSH Base Header:

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+

Ver O C R R R R R R Length MD Type Next Protocol

+

Parsed packet:

4500 0094 f544 4000 4011 ece8 ac13 0003 => IPv4: UDP, srcIp=172.19.0.3, dstIp=172.19.0.2
ac13 0002
ec6c 1310 0080 0000 => UDP: srcPort=0xec6c(60524),dstPort=0x1310(4880)
0c00 0003 => VXGPE: NextProtocol=3(NSH_NP_ETH), VNI=8
0000 0800
ee4e 4e9a c2f3 c2cd eed2 4fcc => Ether: srcMac=ee:4e:4e:9a:c2:f3, dstMac=c2:cd:ee:d2:4f:cc, EtherType=0x894f(NSH)
894f
0006 0100 => NSH Base Header: MDtype=0x01,NextProtocol=0x00
0000 35ff => NSH Service Path Header: NSP=0x000035(53),NSI=0xff(255)
0000 0000 0000 => NSH Context Headers:
0008 0000 0000 0000 0000
ee4e 4e9a c2f3 => Inner Ether
c2cd eed2 4fcc 0800
4500 003c 47bb 4000 => Inner IPv4
4006 defc 0a00 0002 0a00 0003 d3b8 0050
e82f e9a7 0000 0000 a002 7210 6cef 0000
0204 05b4 0402 080a 0100 ae1c 0000 0000
0103 0306



 Comments   
Comment by Brady Johnson [ 04/May/17 ]

Patch on master:

https://git.opendaylight.org/gerrit/56531

Patch on stable/carbon:

https://git.opendaylight.org/gerrit/56532/

Generated at Wed Feb 07 20:22:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.