diff options
author | Ignas Bacius <ignas@noia.network> | 2020-01-03 15:05:46 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-08-12 15:59:46 +0000 |
commit | 06c104f4e3cba6a826603188662083a0efea54a8 (patch) | |
tree | 142f056161c6c8ea075cf0aec8e4577374463498 /src/vnet/srv6/sr_localsid.c | |
parent | 5c3aab42120cdeaf5513a8344d0af0630342b1bb (diff) |
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 <ignas@noia.network>
Change-Id: Id780e0875ec9cdb25252217990919fb3dddbf06a
(cherry picked from commit bd5c49a1615e36260a86184d087b5b47a5e747be)
Diffstat (limited to 'src/vnet/srv6/sr_localsid.c')
-rwxr-xr-x | src/vnet/srv6/sr_localsid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |