Closed abtink closed 4 years ago
Should we consider the use case of auto adding routes for on-mesh prefixes but not for external routes? This would cover the scenario that a device only cares to forward traffic destined for Thread devices.
Good point! Will change it to have them be separate features.
This commit adds a new feature in
wpantund
to auto add a route on the host primary interface corresponding to on-mesh prefixes from Thread network.This feature can be enabled through a newly added wpan property with name "Daemon:OnMeshPrefix:AutoAddAsIntterfaceRoute" which is enabled by default.
When enabled, wpantund would add a route on host primary interface for any prefix from thread network (with on-mesh flag set). This in turn ensures that traffic destined to an IPv6 address matching the prefix would be correctly forwarded to the
wpan
interface on host.This feature is now independent of
mAutoAddOffMeshRoutesOnInterface
(each feature can be separately enabled or disabled).https://github.com/openthread/openthread/pull/4221 adds a test-case to cover the behavior of this feature.