ip: crash in ip4_sas_commonlen 86/41286/2
authorSteven Luong <[email protected]>
Mon, 22 Jul 2024 16:27:33 +0000 (09:27 -0700)
committerOle Tr�an <[email protected]>
Tue, 23 Jul 2024 07:30:03 +0000 (07:30 +0000)
commit3ac2ac532497024725e19fdd6f33ecbfceb9ff05
tree8f6b9e848322167c511823a772eb5dc0a48c540c
parente99d266612b53163d460f3ceab96934b1d961ac8
ip: crash in ip4_sas_commonlen

ip4_sas_commonlen may be called with null a2 argument from
ip4_neighbor_advertise -> ip4_sas_by_sw_if_index.
If a1 or a2 is null, there is no common length, shortest mask
between a1 and a2, return 0 instead of crashing.

Type: fix

Change-Id: I307509ee7dedafac76d8877a1ef76ab8bbafef59
Signed-off-by: Steven Luong <[email protected]>
src/vnet/ip/ip_sas.c