From fbb65de32ed129d0551d05e2b820a142fd301db0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 25 Mar 2020 11:16:49 +0100 Subject: 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') --- 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 3202c979e7..b10adc91f3 100644 --- a/src/ndisc/nm-lndp-ndisc.c +++ b/src/ndisc/nm-lndp-ndisc.c @@ -229,7 +229,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) { -- cgit v1.2.3