Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
f078182
)
vpp-swan: Fix segfault for multiple addresses
92/37692/3
author
Timur Celik
<mail@timurcelik.de>
Tue, 22 Nov 2022 16:03:14 +0000
(17:03 +0100)
committer
Fan Zhang
<fanzhang.oss@gmail.com>
Wed, 23 Nov 2022 14:46:32 +0000
(14:46 +0000)
In order to loop over the list of `vl_api_ip_address_details_t`,
increment the pointer by one instead of `i`.
Type: fix
Change-Id: I8554d1388d67bb95e029eddf444d383fb85ecac7
Signed-off-by: Timur Celik <mail@timurcelik.de>
extras/strongswan/vpp_sswan/kernel_vpp_net.c
patch
|
blob
|
history
diff --git
a/extras/strongswan/vpp_sswan/kernel_vpp_net.c
b/extras/strongswan/vpp_sswan/kernel_vpp_net.c
index
02f002a
..
a29a7c6
100644
(file)
--- a/
extras/strongswan/vpp_sswan/kernel_vpp_net.c
+++ b/
extras/strongswan/vpp_sswan/kernel_vpp_net.c
@@
-563,8
+563,8
@@
update_addrs (private_kernel_vpp_net_t *this, iface_t *entry)
tmp = (vl_api_ip_address_details_t *) out;
for (i = 0; i < num; i++)
{
- tmp += i;
rmp = tmp;
+ tmp += 1;
host = host_create_from_chunk (
AF_INET, chunk_create (rmp->prefix.address.un.ip4, 4), 0);
addrs->insert_last (addrs, host);
@@
-582,8
+582,8
@@
update_addrs (private_kernel_vpp_net_t *this, iface_t *entry)
tmp = (vl_api_ip_address_details_t *) out;
for (i = 0; i < num; i++)
{
- tmp += i;
rmp = tmp;
+ tmp += 1;
host = host_create_from_chunk (
AF_INET6, chunk_create (rmp->prefix.address.un.ip6, 16), 0);
addrs->insert_last (addrs, host);