From 4e642451c825d2b643d084d155025e64d8a30ab0 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 24 Feb 2023 15:54:56 +0100 Subject: [PATCH] gnrc_static: don't parse address as prefix --- .../network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.c b/sys/net/gnrc/network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.c index d4f924dbf88a..29f2a15515a3 100644 --- a/sys/net/gnrc/network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.c +++ b/sys/net/gnrc/network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.c @@ -60,10 +60,9 @@ static void _config_upstream(gnrc_netif_t *upstream) DEBUG("gnrc_ipv6_static_addr: interface %u selected as upstream\n", upstream->pid); /* configure static address */ - int addr_len; if (static_addr != NULL && - (addr_len = ipv6_prefix_from_str(&addr, static_addr)) > 0) { - gnrc_netif_ipv6_addr_add_internal(upstream, &addr, addr_len, + ipv6_addr_from_str(&addr, static_addr) != NULL) { + gnrc_netif_ipv6_addr_add_internal(upstream, &addr, 128, GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_VALID); }