From cc5026a9632dbec59ef91c8fb6ed267fccbd6b2d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 4 Nov 2022 12:33:28 +0100 Subject: [PATCH] bgpd: fix "storing the address of local variable" New GCC 12 warning. Signed-off-by: David Lamparter (cherry picked from commit c34a7afc743c52e1081f10792047cdf73e9cba2c) --- bgpd/bgp_pbr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 7b5e287242..b71e19ab33 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -2074,6 +2074,9 @@ static void bgp_pbr_icmp_action(struct bgp *bgp, struct bgp_path_info *path, bgp, path, bpf); } } + + bpf->src_port = NULL; + bpf->dst_port = NULL; } static void bgp_pbr_policyroute_remove_from_zebra_recursive( -- 2.39.5