]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix "storing the address of local variable" 12285/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 4 Nov 2022 11:33:28 +0000 (12:33 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 8 Nov 2022 16:37:22 +0000 (16:37 +0000)
New GCC 12 warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit c34a7afc743c52e1081f10792047cdf73e9cba2c)

bgpd/bgp_pbr.c

index 7b5e28724209573662a4ff020bbf871a156eb25c..b71e19ab330f7ae0b6321448aed9201fcf1fe207 100644 (file)
@@ -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(