Skip to content

Commit 8d296ba

Browse files
rlubosfabiobaltieri
authored andcommitted
net: iface: Don't require native networking to register IP address
It shouldn't be needed to enable native networking to be able to add/delete IP addresses on network interfaces. Signed-off-by: Robert Lubos <[email protected]>
1 parent 5d085b4 commit 8d296ba

File tree

2 files changed

+392
-367
lines changed

2 files changed

+392
-367
lines changed

include/zephyr/net/net_if.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ struct net_offload;
300300
#endif /* CONFIG_NET_OFFLOAD */
301301

302302
/** @cond INTERNAL_HIDDEN */
303-
#if defined(CONFIG_NET_NATIVE_IPV6)
303+
#if defined(CONFIG_NET_IPV6)
304304
#define NET_IF_MAX_IPV6_ADDR CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT
305305
#define NET_IF_MAX_IPV6_MADDR CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT
306306
#define NET_IF_MAX_IPV6_PREFIX CONFIG_NET_IF_IPV6_PREFIX_COUNT
@@ -422,7 +422,7 @@ struct net_if_dhcpv6 {
422422
#endif /* defined(CONFIG_NET_DHCPV6) && defined(CONFIG_NET_NATIVE_IPV6) */
423423

424424
/** @cond INTERNAL_HIDDEN */
425-
#if defined(CONFIG_NET_NATIVE_IPV4)
425+
#if defined(CONFIG_NET_IPV4)
426426
#define NET_IF_MAX_IPV4_ADDR CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT
427427
#define NET_IF_MAX_IPV4_MADDR CONFIG_NET_IF_MCAST_IPV4_ADDR_COUNT
428428
#else
@@ -542,11 +542,11 @@ struct net_if_ipv4_autoconf {
542542
* @brief Network interface IP address configuration.
543543
*/
544544
struct net_if_ip {
545-
#if defined(CONFIG_NET_NATIVE_IPV6)
545+
#if defined(CONFIG_NET_IPV6)
546546
struct net_if_ipv6 *ipv6;
547547
#endif /* CONFIG_NET_IPV6 */
548548

549-
#if defined(CONFIG_NET_NATIVE_IPV4)
549+
#if defined(CONFIG_NET_IPV4)
550550
struct net_if_ipv4 *ipv4;
551551
#endif /* CONFIG_NET_IPV4 */
552552
};
@@ -2431,7 +2431,7 @@ bool net_if_ipv4_is_addr_bcast(struct net_if *iface,
24312431
* @return Pointer to network interface to use, NULL if no suitable interface
24322432
* could be found.
24332433
*/
2434-
#if defined(CONFIG_NET_NATIVE_IPV4)
2434+
#if defined(CONFIG_NET_IPV4)
24352435
struct net_if *net_if_ipv4_select_src_iface(const struct in_addr *dst);
24362436
#else
24372437
static inline struct net_if *net_if_ipv4_select_src_iface(
@@ -2454,7 +2454,7 @@ static inline struct net_if *net_if_ipv4_select_src_iface(
24542454
* @return Pointer to IPv4 address to use, NULL if no IPv4 address
24552455
* could be found.
24562456
*/
2457-
#if defined(CONFIG_NET_NATIVE_IPV4)
2457+
#if defined(CONFIG_NET_IPV4)
24582458
const struct in_addr *net_if_ipv4_select_src_addr(struct net_if *iface,
24592459
const struct in_addr *dst);
24602460
#else

0 commit comments

Comments
 (0)