summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-05-05 13:48:55 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-05-05 13:48:55 +0200
commit60031a55f61ff5ff9d26b63c636ffbb5e1206356 (patch)
tree230b55acf7c4a9a26ec871a25ea168574af213af /bgpd
parentMerge pull request #8564 from rameshabhinay/bgp_tcp_mss (diff)
downloadfrr-60031a55f61ff5ff9d26b63c636ffbb5e1206356.tar.xz
frr-60031a55f61ff5ff9d26b63c636ffbb5e1206356.zip
bgpd: Another call path with uninited data
Prevent another call path that uses uninited data in bgp_pbr.c This was found through more clang sa runs. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_pbr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c
index 8b27b39c4..01443c778 100644
--- a/bgpd/bgp_pbr.c
+++ b/bgpd/bgp_pbr.c
@@ -2034,6 +2034,9 @@ static void bgp_pbr_icmp_action(struct bgp *bgp, struct bgp_path_info *path,
return;
if (bpf->protocol != IPPROTO_ICMP)
return;
+
+ memset(&srcp, 0, sizeof(srcp));
+ memset(&dstp, 0, sizeof(dstp));
bpf->src_port = &srcp;
bpf->dst_port = &dstp;
/* parse icmp type and lookup appropriate icmp code