From 06c104f4e3cba6a826603188662083a0efea54a8 Mon Sep 17 00:00:00 2001 From: Ignas Bacius Date: Fri, 3 Jan 2020 15:05:46 +0200 Subject: sr: fix possible null-pointer dereference Steps to reproduce VPP crash: 1. configure localsid End behavior 2. ping the localsid address Type: fix Signed-off-by: Ignas Bacius Change-Id: Id780e0875ec9cdb25252217990919fb3dddbf06a (cherry picked from commit bd5c49a1615e36260a86184d087b5b47a5e747be) --- src/vnet/srv6/sr_localsid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/srv6') diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c index ffd08ca1528..04565929a18 100755 --- a/src/vnet/srv6/sr_localsid.c +++ b/src/vnet/srv6/sr_localsid.c @@ -713,7 +713,7 @@ end_srh_processing (vlib_node_runtime_t * node, { ip6_address_t *new_dst0; - if (PREDICT_TRUE (sr0->type == ROUTING_HEADER_TYPE_SR)) + if (PREDICT_TRUE (sr0 && sr0->type == ROUTING_HEADER_TYPE_SR)) { if (sr0->segments_left == 1 && psp) { -- cgit 1.2.3-korg