diff options
author | Ignas Bacius <ignas@noia.network> | 2020-01-03 15:05:46 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-27 21:09:34 +0000 |
commit | bd5c49a1615e36260a86184d087b5b47a5e747be (patch) | |
tree | 2e05bf5da801a34bc1bd31de5bd90828b2ab69e7 /src/vnet | |
parent | 12e3e312b1c9ea83342a504786e0eb36ede2d9d5 (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
Diffstat (limited to 'src/vnet')
-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 79e4c2af00e..84306ad9fdf 100755 --- a/src/vnet/srv6/sr_localsid.c +++ b/src/vnet/srv6/sr_localsid.c @@ -743,7 +743,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) { |