nat: fix static mapping segv 18/34218/1
authorJoshua Roys <roysjosh@gmail.com>
Tue, 12 Oct 2021 13:25:47 +0000 (09:25 -0400)
committerJoshua Roys <roysjosh@gmail.com>
Mon, 25 Oct 2021 19:53:58 +0000 (19:53 +0000)
commit9298a7ec0c23ea95bd8ff6e91fc74e6ecbd53785
treefbf98c5fa801796ca1019ea0d642f06315d3fc24
parentc1931b2f0932d29f3ea73452b497a3d05eca9352
nat: fix static mapping segv

Adding a nat44 static mapping during startup on a DHCP interface leads
to a segv via this path:
- dhcp_client_acquire_address
- ip4_add_del_interface_address
- ip4_add_del_interface_address_internal
- nat44_ed_add_del_interface_address_cb
- nat44_ed_add_static_mapping
- ip4_interface_first_address

Type: fix

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Change-Id: I38dac8a096b052550f2b87b4e13a950d2cd868b0
(cherry picked from commit f9074fc51544d1849a2df06713c1ccf6cb2eb908)
src/plugins/nat/nat44-ed/nat44_ed.c