From 2f419e84c883dd7cea0b7a465f059cfbc020bfc0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 25 Mar 2020 11:16:49 +0100 Subject: [PATCH] rdisc: avoid static variable in receive_ra() It's unnecessary and makes the function unnecessarily not thread safe. Of course, also ndp_msg_opt_route_prefix() uses static variables, so it's still not thread safe. Fixes: c3a4656a68f9 ('rdisc: libndp implementation') (cherry picked from commit fbb65de32ed129d0551d05e2b820a142fd301db0) (cherry picked from commit a1a3cce6efb94eea0fe4e0a3fc3191911d3d7ade) --- src/ndisc/nm-lndp-ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c index af30447e71..6fd7d2e489 100644 --- a/src/ndisc/nm-lndp-ndisc.c +++ b/src/ndisc/nm-lndp-ndisc.c @@ -245,7 +245,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) /* DNS information */ ndp_msg_opt_for_each_offset(offset, msg, NDP_MSG_OPT_RDNSS) { - static struct in6_addr *addr; + struct in6_addr *addr; int addr_index; ndp_msg_opt_rdnss_for_each_addr (addr, addr_index, msg, offset) {