aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorpcamaril <pcamaril@cisco.com>2020-02-04 08:36:51 +0100
committerNeale Ranns <nranns@cisco.com>2020-02-11 16:25:41 +0000
commit30e7671c85087b5781a34bde45ef3846f5de8c17 (patch)
tree532f76c9d61e8ed9a0967cd0bccaf552279f7dbe /src/vnet
parent619179cfcdb087acb0864d273c4fbd3b7396974c (diff)
sr: update NH value for Ethernet payloads
Upon encapsulation of L2 frames, IETF has replaced the NextHeader value from 59 (IPv6 No Next Header) to 143 (Ethernet). https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Type: fix Signed-off-by: pcamaril <pcamaril@cisco.com> Change-Id: I88aa5590c81d16700ff7a0bbe6337e113179496e Signed-off-by: pcamaril <pcamaril@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/protocols.def3
-rwxr-xr-xsrc/vnet/srv6/sr_localsid.c2
-rwxr-xr-xsrc/vnet/srv6/sr_policy_rewrite.c20
3 files changed, 13 insertions, 12 deletions
diff --git a/src/vnet/ip/protocols.def b/src/vnet/ip/protocols.def
index e6c1f6379b0..ee92f563346 100644
--- a/src/vnet/ip/protocols.def
+++ b/src/vnet/ip/protocols.def
@@ -163,8 +163,9 @@ ip_protocol (139, HIP)
ip_protocol (140, SHIM6)
ip_protocol (141, WESP)
ip_protocol (142, ROHC)
+ip_protocol (143, IP6_ETHERNET)
-/* unassigned 143 - 252 */
+/* unassigned 144 - 252 */
ip_protocol (253, EXP1)
ip_protocol (254, EXP2)
diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c
index 84306ad9fdf..7b71b2e71de 100755
--- a/src/vnet/srv6/sr_localsid.c
+++ b/src/vnet/srv6/sr_localsid.c
@@ -895,7 +895,7 @@ end_decaps_srh_processing (vlib_node_runtime_t * node,
return;
}
break;
- case IP_PROTOCOL_IP6_NONXT:
+ case IP_PROTOCOL_IP6_ETHERNET:
/* L2 encaps */
if (ls0->behavior == SR_BEHAVIOR_DX2)
{
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c
index 9c4d0ec493f..b7fbc4b8cda 100755
--- a/src/vnet/srv6/sr_policy_rewrite.c
+++ b/src/vnet/srv6/sr_policy_rewrite.c
@@ -1967,34 +1967,34 @@ sr_policy_rewrite_encaps_l2 (vlib_main_t * vm, vlib_node_runtime_t * node,
if (ip0->protocol == IP_PROTOCOL_IPV6_ROUTE)
{
sr0 = (void *) (ip0 + 1);
- sr0->protocol = IP_PROTOCOL_IP6_NONXT;
+ sr0->protocol = IP_PROTOCOL_IP6_ETHERNET;
}
else
- ip0->protocol = IP_PROTOCOL_IP6_NONXT;
+ ip0->protocol = IP_PROTOCOL_IP6_ETHERNET;
if (ip1->protocol == IP_PROTOCOL_IPV6_ROUTE)
{
sr1 = (void *) (ip1 + 1);
- sr1->protocol = IP_PROTOCOL_IP6_NONXT;
+ sr1->protocol = IP_PROTOCOL_IP6_ETHERNET;
}
else
- ip1->protocol = IP_PROTOCOL_IP6_NONXT;
+ ip1->protocol = IP_PROTOCOL_IP6_ETHERNET;
if (ip2->protocol == IP_PROTOCOL_IPV6_ROUTE)
{
sr2 = (void *) (ip2 + 1);
- sr2->protocol = IP_PROTOCOL_IP6_NONXT;
+ sr2->protocol = IP_PROTOCOL_IP6_ETHERNET;
}
else
- ip2->protocol = IP_PROTOCOL_IP6_NONXT;
+ ip2->protocol = IP_PROTOCOL_IP6_ETHERNET;
if (ip3->protocol == IP_PROTOCOL_IPV6_ROUTE)
{
sr3 = (void *) (ip3 + 1);
- sr3->protocol = IP_PROTOCOL_IP6_NONXT;
+ sr3->protocol = IP_PROTOCOL_IP6_ETHERNET;
}
else
- ip3->protocol = IP_PROTOCOL_IP6_NONXT;
+ ip3->protocol = IP_PROTOCOL_IP6_ETHERNET;
/* Which Traffic class and flow label do I set ? */
//ip0->ip_version_traffic_class_and_flow_label = clib_host_to_net_u32(0|((6&0xF)<<28)|((ip0_encap->tos&0xFF)<<20));
@@ -2105,10 +2105,10 @@ sr_policy_rewrite_encaps_l2 (vlib_main_t * vm, vlib_node_runtime_t * node,
if (ip0->protocol == IP_PROTOCOL_IPV6_ROUTE)
{
sr0 = (void *) (ip0 + 1);
- sr0->protocol = IP_PROTOCOL_IP6_NONXT;
+ sr0->protocol = IP_PROTOCOL_IP6_ETHERNET;
}
else
- ip0->protocol = IP_PROTOCOL_IP6_NONXT;
+ ip0->protocol = IP_PROTOCOL_IP6_ETHERNET;
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE) &&
PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))