classify: crash on classify filter pcap del command 50/30850/1
authorSteven Luong <sluong@cisco.com>
Wed, 20 Jan 2021 07:09:51 +0000 (23:09 -0800)
committerSteven Luong <sluong@cisco.com>
Wed, 20 Jan 2021 07:14:42 +0000 (23:14 -0800)
commit7f1d780f0be6e176bd19809c2d733e7ebd0007c4
tree081b92ed79c73dca93e30173dc6abc61ce46fd87
parent533ac64330436752f82477973e4587e2197c4719
classify: crash on classify filter pcap del command

If classify pcap filter was never configured, typing the delete
command causes a crash. The reason is
cm->classify_table_index_by_sw_if_index not yet allocated.

The fix is to add a check before we access the vector.

Type: fix
Fixes: gerrit 28475

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ia33bd91fa82d8ffc4490d4069155980a6e233268
src/vnet/classify/vnet_classify.c