net: Network interface sets default IPv6 hop limit

A default hop limit can be configured via Kconfig.

Change-Id: I5cbd130882e043e24488c4501e86fce0f91d48df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-05-19 11:26:06 +03:00
commit 26cc76f976
2 changed files with 11 additions and 0 deletions

View file

@ -45,6 +45,13 @@ config NET_IFACE_IPV6_PREFIX_COUNT
depends on NET_IPV6
default 2
config NET_INITIAL_HOP_LIMIT
int "Initial hop limit for a connection"
depends on NET_IPV6
default 64
help
The value should be > 0
config NET_IPV4
bool "Enable IPv4"
default n

View file

@ -422,6 +422,10 @@ int net_if_init(void)
api->init(iface);
init_tx_queue(iface);
}
#if defined(CONFIG_NET_IPV6)
iface->hop_limit = CONFIG_NET_INITIAL_HOP_LIMIT;
#endif
}
return 0;