Skip to content

Commit e3f4f4f

Browse files
committed
[nrf fromtree] net: if: Don't require native IP stack support for IPv6 lookups
IPv6 based interface lookups doesn't require native IP stack support, hence reflect that in the API. Signed-off-by: Robert Lubos <[email protected]> (cherry picked from commit f4335d2)
1 parent 3481d86 commit e3f4f4f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/zephyr/net/net_if.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@ static inline uint32_t net_if_ipv6_get_retrans_timer(struct net_if *iface)
20382038
* @return Pointer to IPv6 address to use, NULL if no IPv6 address
20392039
* could be found.
20402040
*/
2041-
#if defined(CONFIG_NET_NATIVE_IPV6)
2041+
#if defined(CONFIG_NET_IPV6)
20422042
const struct in6_addr *net_if_ipv6_select_src_addr(struct net_if *iface,
20432043
const struct in6_addr *dst);
20442044
#else
@@ -2065,7 +2065,7 @@ static inline const struct in6_addr *net_if_ipv6_select_src_addr(
20652065
* @return Pointer to IPv6 address to use, NULL if no IPv6 address
20662066
* could be found.
20672067
*/
2068-
#if defined(CONFIG_NET_NATIVE_IPV6)
2068+
#if defined(CONFIG_NET_IPV6)
20692069
const struct in6_addr *net_if_ipv6_select_src_addr_hint(struct net_if *iface,
20702070
const struct in6_addr *dst,
20712071
int flags);
@@ -2090,7 +2090,7 @@ static inline const struct in6_addr *net_if_ipv6_select_src_addr_hint(
20902090
* @return Pointer to network interface to use, NULL if no suitable interface
20912091
* could be found.
20922092
*/
2093-
#if defined(CONFIG_NET_NATIVE_IPV6)
2093+
#if defined(CONFIG_NET_IPV6)
20942094
struct net_if *net_if_ipv6_select_src_iface(const struct in6_addr *dst);
20952095
#else
20962096
static inline struct net_if *net_if_ipv6_select_src_iface(

subsys/net/ip/net_if.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,8 @@ void net_if_ipv6_set_hop_limit(struct net_if *iface, uint8_t hop_limit)
29832983
net_if_unlock(iface);
29842984
}
29852985

2986+
#endif /* CONFIG_NET_NATIVE_IPV6 */
2987+
29862988
static uint8_t get_diff_ipv6(const struct in6_addr *src,
29872989
const struct in6_addr *dst)
29882990
{
@@ -3208,6 +3210,8 @@ struct net_if *net_if_ipv6_select_src_iface(const struct in6_addr *dst)
32083210
return iface;
32093211
}
32103212

3213+
#if defined(CONFIG_NET_NATIVE_IPV6)
3214+
32113215
uint32_t net_if_ipv6_calc_reachable_time(struct net_if_ipv6 *ipv6)
32123216
{
32133217
uint32_t min_reachable, max_reachable;

0 commit comments

Comments
 (0)