diff --git a/include/net/net_if.h b/include/net/net_if.h index bbb780ff725..5770d97ac94 100644 --- a/include/net/net_if.h +++ b/include/net/net_if.h @@ -1476,7 +1476,7 @@ struct net_if_addr *net_if_ipv4_addr_add(struct net_if *iface, * * @return True if successfully removed, false otherwise */ -bool net_if_ipv4_addr_rm(struct net_if *iface, struct in_addr *addr); +bool net_if_ipv4_addr_rm(struct net_if *iface, const struct in_addr *addr); /** * @brief Check if this IPv4 address belongs to one of the interface indices. diff --git a/subsys/net/ip/net_if.c b/subsys/net/ip/net_if.c index 825c6fa071e..7b76aff8a3e 100644 --- a/subsys/net/ip/net_if.c +++ b/subsys/net/ip/net_if.c @@ -2687,7 +2687,7 @@ struct net_if_addr *net_if_ipv4_addr_add(struct net_if *iface, return NULL; } -bool net_if_ipv4_addr_rm(struct net_if *iface, struct in_addr *addr) +bool net_if_ipv4_addr_rm(struct net_if *iface, const struct in_addr *addr) { #if defined(CONFIG_NET_IPV4) struct net_if_ipv4 *ipv4 = iface->config.ip.ipv4;