Age | Commit message (Collapse) | Author |
|
This commit implements a general Infrastructure Link Selection that
allows otbr-agent to select one network interface among multiple
network interface candidates (specified by multiple `-B` arguments) as
the infrastructure link.
The Infrastructure Link Selection uses following rules:
- The network link in the most usable state is selected
- Prefer `up and running` to `up`
- Prefer `up` to `down`
- Prefer `down` to `invalid`
- Once an interface is selected, it's preferred if either is true:
- The interface is still `up and running`
- No other interface is `up and running`
- The interface has been `up and running` within last 10 seconds
`otbr-agent` uses Infrastructure Link Selection to select the correct
infrastructure link:
- Run Infrastructure Link Selection when started to select the
infrastructure link
- Run Infrastructure Link Selection when network interface states
change is detected. otbr-agent would quit if a different
infrastructure link is selected, expecting the system to restart it
to use the new infrastructure link.
Note:
- The Infrastructure Link Selection mechanism is effectively disabled
if less than two infrastructure link names are specified.
- The current implementation only works for Linux platforms.
|
|
|
|
|
|
This commit remove potential data race on `sShouldTerminate`, which is
accessed in both main loop and the signal handler.
|
|
Use `NOTE` log level instead of `INFO` since the log information is
important.
|
|
in public methods (#1339)
When `otPlatReset` is called on `otbr-agent`, it should de-init the
old `otbr::Application` so that the resources will be properly
disposed, otherwise there will be dangling resources. Also,
`otbr::Application` should de-init the TREL module when itself is
de-initing.
One example is that if we call `ot-ctl factoryreset`, the old
`otbr::Application` won't be destructed so that the publisher will
keep the old mDNS service registrations until the process exits. In
such a situation, there will be two different MeshCoP services
published by the same `otbr-agent` process.
Also, this commit adds a verification at `Publisher` public methods to
ensure that `Publisher` is at `kReady` state.
|
|
This commit removes the `InstanceParams` to make the code more clean.
|
|
|
|
This commit enhances `OTBR_NO_AUTO_ATTACH` option to disable auto
Thread attaching for Reference Device:
- Use `-DOTBR_NO_AUTO_ATTACH=1` to disable auto Thread attaching
|
|
This commit notifies service managers(systemd or upstart(ChromeOS))
that Thread service is ready. This commit also enhances systemd unit
file so that otbr-agent will depends on d-bus socket unit.
|
|
Background:
- OpenThread Instance was the last member to destruct in Application,
and otSysDeinit will be called when destructing OpenThread
Instance. However, otSysDeinit may call methods of other Application
members, which have been destructed at the moment.
This commit introduces the Deinit() method to ControllerOpenThread and
other classes to make sure OpenThread are properly de-initialized
before destructing Application. The advantages are:
- ControllerOpenThread initializes OT instance in Init, so adding
Deinit makes it symmetrical with Init.
- Provide a predictable runtime environment (Application object fully
constructed) for OT instance from otSysInit to otSysDeinit, making
sure OT can safely access Application members during its lifetime.
|
|
This commit refactors radio version printing:
- Use a dedicated function for printing radio version.
- Make `ControllerOpenThread` a member of `Application` so that
`Application` is always properly constructed before initializing
OpenThread instances.
|
|
This commit uses `NonCopyable` to make sure certain objects are never
copied.
|
|
The Thread Border Agent feature is for advertising the MeshCoP
mDNS service (i.e. `_meshcop._udp`). There may be cases this
function is not supported, so making it optional.
|
|
This commit adds the `Application` class for better managing different
program components.
|
|
This commit updates the .service file to start the mDNS daemon before
starting otbr-agent.
|
|
`otbr-agent` will exit directly if `--radio-version` is passed in
parameters. This PR sets the DryRun option in PosixConfig when
`radio-version` is set. In this way, the posix instance will only
initialize very few things to avoid permission issues.
|
|
|
|
This commit unifies the spaces:
- Use 1 space after tags (e.g. @param @returns).
- Use 2 spaces between the parameter/retval and comment.
- Capitalizing the first char of the param and return value comment.
|
|
This commit renames the macro name OPENTHREAD_ENABLE_ANDROID_PROPERTY
to OTBR_CONFIG_ANDROID_PROPERTY_ENABLE and declares the variabe
`aInstance` as a unused variable to avoid compile error.
|
|
This commit adds a mainloop manager to manage all mainloop processors.
This commit also adds a class `br::vendor::VendorServer` to allow
other users to implement their server in otbr-agent.
|
|
|
|
Added library otbr-border-agent and otbr-sdp-proxy. Functionality of
ot-br-posix remains unchanged.
|
|
Currently, handlers called after completing an asynchronous
update of a DNS host or service simply decrement the number
of outstanding operations. It may lead to incorrect
handling of several SRP updates related to a single host,
sent within a short period of time, such as the ones below:
UPDATE1:
EXISTING_HOST
SERVICE1
UPDATE2:
EXISTING_HOST
SERVICE1
It may happen that both UPDATE1.EXISTING_HOST and
UPDATE2.EXISTING_HOST decrement the number of outstanding
operations for UPDATE1 and UPDATE1 is considered completed
even before UPDATE1.EXISTING_HOST.SERVICE1 is published.
Moreover, since the handlers can be called synchronously
in certain scenarios, it may occur that an update object
is released before PublishHostAndItsServices() exits which
may lead to accessing an invalid memory location. Make sure
that the handlers are called in the main loop.
Due the the mentioned problems, an SRP client may not
receive a response for UPDATE2 and keep re-sending the same
update.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
|
|
OTBR is providing custom otPlatLog function which overwrites the
default posix logging function. The problem is that the OTBR otPlatLog
function will filter out logs based on current OTBR log level, this
will result in the situation that we cannot print more OT logs with
command ot-ctl log level <level-value> (when dynamic logging is
enabled).
|
|
(#1008)" (#1014)
This reverts commit 685a1e0f483febc26127c8c2f2bd8f922b682a06.
|
|
This commit fixes a bug that Advertising Proxy failed to handle
duplicate hosts and services in multiple outstanding SRP updates.
|
|
To align with ARM PSA changes.
|
|
Per RFC 6762, the name should be "mDNS".
|
|
|
|
The recommended format of service instance is VendorName
ProductName._meshcop._udp_.local.. However, it's quite tricky to
handle the space in service name properly. Also, the space in the name
will be converted to \032 after the registration, which is not a very
elegant form. Therefore, set
VendorName_ProductName._meshcop._udp_.local. as the default service
name.
|
|
After recent changes in the SRP client & server SRP services
can now have a base DNS type (such as _meshcop._udp) or
a subtype such as _subtype1._sub._meshcop._udp.
* Make advertising-proxy group the services by the base type
and pass a list of the subtype labels to the DNS publisher.
* Update both the mDNSResponder and Avahi implementations
so that it is possible publish a services with additional
subtypes and to update the subtypes.
* Add unit tests.
|
|
|
|
When mDNS daemon restarts, the mDNS library may need to re-advertise
all hosts and services. This commit extracts this functionality and
makes it a public method.
Also, on kReady, SRP server will publish all registered hosts and
services. This is helpful when the advertising proxy reconnects to the
mDNS provider.
|
|
|
|
This commit fixes potential Discovery Proxy crash when the mDNS
implementation replied with an empty host name.
|
|
The newly introduces `otDnssdGetQuery` apis allows platform
implementations to use the queries stored in the dns-sd server. Remove
the local map to reduce complexity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit implements DNS-SD Discovery Proxy (RFC 8766) over
mDNSResponder.
|
|
|
|
|
|
|
|
This commit refactors the Border Agent module to advertise the full
list of TXT entries of the _meshcop._udp mDNS service. The event
emitter is removed and we rely on the otThreadStateChanged event to
notify changes of extended PAN ID, network name and backbone router
state.
|