snort: validate sw_if_index in attach/detach api handlers 13/42213/5
authorDave Wallace <[email protected]>
Wed, 22 Jan 2025 05:58:36 +0000 (00:58 -0500)
committerMatthew Smith <[email protected]>
Wed, 22 Jan 2025 15:00:38 +0000 (15:00 +0000)
commit2b85ab67f9d2163d83d4a68eb32de051c09c9a78
tree0f71a55b93feedda37c6055eb926ff9c4a89437d
parentbf0f8032089641942cded95314516e0d97d66486
snort: validate sw_if_index in attach/detach api handlers

- fixes crash in vpp-debug-verify-master-ubuntu2204-x86_64 CI job
  in test_snort_06_detach_if testcase
- fix similar logic in attach handler
- verify snort direction in attach api message
- add tests verifying attribute validation in attach testcase

Type: fix
Fixes: 102575492c9199259aa5e468f21b46936d7a1ac4

Change-Id: I96fbeb0a7b84f2f238df15b20476ed4086251471
Signed-off-by: Dave Wallace <[email protected]>
src/plugins/snort/snort_api.c
test/test_snort.py