Skip to content

Commit 5d085b4

Browse files
rlubosfabiobaltieri
authored andcommitted
net: ipv4: Make native IPv4 options dependent on NET_NATIVE_IPV4
IPv4 Kconfig options which only affect native IPv4 stack should be dependent on NET_NATIVE_IPV4, similarly as it's done for IPv6. Signed-off-by: Robert Lubos <[email protected]>
1 parent ddad1e6 commit 5d085b4

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

subsys/net/ip/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ config NET_IPV4_MAPPING_TO_IPV6
168168
config NET_SHELL
169169
bool "Network shell utilities"
170170
select SHELL
171-
select NET_IPV4_IGMP if NET_IPV4
171+
select NET_IPV4_IGMP if NET_NATIVE_IPV4
172172
select REQUIRES_FLOAT_PRINTF
173173
help
174174
Activate shell module that provides network commands like

subsys/net/ip/Kconfig.ipv4

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,28 @@ menuconfig NET_IPV4
1111

1212
if NET_IPV4
1313

14+
config NET_IF_MAX_IPV4_COUNT
15+
int "Max number of IPv4 network interfaces in the system"
16+
default NET_VLAN_COUNT if NET_VLAN
17+
default 2 if NET_LOOPBACK
18+
default 1
19+
help
20+
This tells how many network interfaces there will be in the system
21+
that will have IPv4 enabled.
22+
23+
config NET_IF_UNICAST_IPV4_ADDR_COUNT
24+
int "Max number of unicast IPv4 addresses per network interface"
25+
default 2 if NET_IPV4_AUTO
26+
default 2 if NET_LOOPBACK
27+
default 1
28+
29+
config NET_IF_MCAST_IPV4_ADDR_COUNT
30+
int "Max number of multicast IPv4 addresses per network interface"
31+
default 2 if NET_IPV4_IGMP
32+
default 1
33+
34+
if NET_NATIVE_IPV4
35+
1436
config NET_INITIAL_TTL
1537
int "Initial IPv4 time to live value for unicast packets"
1638
default 64
@@ -34,26 +56,6 @@ config NET_INITIAL_MCAST_TTL
3456
don't leave the local network unless the application explicitly
3557
requests it.
3658

37-
config NET_IF_MAX_IPV4_COUNT
38-
int "Max number of IPv4 network interfaces in the system"
39-
default NET_VLAN_COUNT if NET_VLAN
40-
default 2 if NET_LOOPBACK
41-
default 1
42-
help
43-
This tells how many network interfaces there will be in the system
44-
that will have IPv4 enabled.
45-
46-
config NET_IF_UNICAST_IPV4_ADDR_COUNT
47-
int "Max number of unicast IPv4 addresses per network interface"
48-
default 2 if NET_IPV4_AUTO
49-
default 2 if NET_LOOPBACK
50-
default 1
51-
52-
config NET_IF_MCAST_IPV4_ADDR_COUNT
53-
int "Max number of multicast IPv4 addresses per network interface"
54-
default 2 if NET_IPV4_IGMP
55-
default 1
56-
5759
config NET_IF_MCAST_IPV4_SOURCE_COUNT
5860
int "Max number of IPv4 sources per mcast address to be included or excluded"
5961
default 1
@@ -177,4 +179,5 @@ module-help = Enable debug diagnostic from IPv4 autoconf client.
177179
source "subsys/net/Kconfig.template.log_config.net"
178180
endif # NET_IPV4_AUTO
179181

182+
endif # NET_NATIVE_IPV4
180183
endif # NET_IPV4

0 commit comments

Comments
 (0)