summaryrefslogtreecommitdiffstats
path: root/src/plugins/srv6-mobile
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/plugins/srv6-mobile
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/plugins/srv6-mobile')
-rw-r--r--src/plugins/srv6-mobile/mobile.h4
-rw-r--r--src/plugins/srv6-mobile/node.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/srv6-mobile/mobile.h b/src/plugins/srv6-mobile/mobile.h
index 5a086b66c6e..460cbe17ef1 100644
--- a/src/plugins/srv6-mobile/mobile.h
+++ b/src/plugins/srv6-mobile/mobile.h
@@ -33,8 +33,8 @@
#define SRV6_NHTYPE_IPV6 2
#define SRV6_NHTYPE_NON_IP 3
-#ifndef IP_PROTOCOL_NONE
-#define IP_PROTOCOL_NONE 59
+#ifndef IP_PROTOCOL_IP6_ETHERNET
+#define IP_PROTOCOL_IP6_ETHERNET 143
#endif
#define SRV6_GTP6_UNKNOW 0
diff --git a/src/plugins/srv6-mobile/node.c b/src/plugins/srv6-mobile/node.c
index 08357bb1b0e..efc92215cac 100644
--- a/src/plugins/srv6-mobile/node.c
+++ b/src/plugins/srv6-mobile/node.c
@@ -939,12 +939,12 @@ VLIB_NODE_FN (srv6_t_m_gtp4_d) (vlib_main_t * vm,
}
else if (ls_param->nhtype == SRV6_NHTYPE_NON_IP)
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
else
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
else
@@ -958,7 +958,7 @@ VLIB_NODE_FN (srv6_t_m_gtp4_d) (vlib_main_t * vm,
{
ip6srv->ip.protocol = IP_PROTOCOL_IPV6_ROUTE;
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
ip6srv->sr.tag =
clib_host_to_net_u16 (srh_tagfield[gtpu_type]);
@@ -1008,7 +1008,7 @@ VLIB_NODE_FN (srv6_t_m_gtp4_d) (vlib_main_t * vm,
}
else if (ls_param->nhtype == SRV6_NHTYPE_NON_IP)
{
- ip6srv->ip.protocol = IP_PROTOCOL_NONE;
+ ip6srv->ip.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
}
@@ -1680,12 +1680,12 @@ VLIB_NODE_FN (srv6_end_m_gtp6_d) (vlib_main_t * vm,
}
else if (ls_param->nhtype == SRV6_NHTYPE_NON_IP)
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
else
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
else
@@ -1700,7 +1700,7 @@ VLIB_NODE_FN (srv6_end_m_gtp6_d) (vlib_main_t * vm,
{
ip6srv->ip.protocol = IP_PROTOCOL_IPV6_ROUTE;
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
ip6srv->sr.tag =
clib_host_to_net_u16 (srh_tagfield[gtpu_type]);
@@ -1748,7 +1748,7 @@ VLIB_NODE_FN (srv6_end_m_gtp6_d) (vlib_main_t * vm,
}
else if (ls_param->nhtype == SRV6_NHTYPE_NON_IP)
{
- ip6srv->ip.protocol = IP_PROTOCOL_NONE;
+ ip6srv->ip.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
}
@@ -2152,12 +2152,12 @@ VLIB_NODE_FN (srv6_end_m_gtp6_d_di) (vlib_main_t * vm,
}
else if (ls_param->nhtype == SRV6_NHTYPE_NON_IP)
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
}
else
{
- ip6srv->sr.protocol = IP_PROTOCOL_NONE;
+ ip6srv->sr.protocol = IP_PROTOCOL_IP6_ETHERNET;
}
good_n++;