diff options
author | Handa Wang <handaw@google.com> | 2023-12-08 07:06:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-08 07:06:51 +0000 |
commit | 971c7cb266d2292d959c8bb527809a8bfa5d3993 (patch) | |
tree | 0cf0ddf97594674e8c53051e1293c723bb00950c | |
parent | 37c13f232b6607be170c14f11a70e6fbe5493235 (diff) | |
parent | 34cb499d5e553ba1dced41359221a3ef4af72685 (diff) | |
download | ot-br-posix-971c7cb266d2292d959c8bb527809a8bfa5d3993.tar.gz |
pass in whether the infra link is running in `otBorderRoutingInit()` am: 34cb499d5e
Original change: https://android-review.googlesource.com/c/platform/external/ot-br-posix/+/2863888
Change-Id: Ib70df211a9e3cbaf55503edd9c70c67cc1e577be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | src/android/otdaemon_server.cpp | 7 | ||||
-rw-r--r-- | src/android/otdaemon_server.hpp | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/android/otdaemon_server.cpp b/src/android/otdaemon_server.cpp index f3e0cab8..cf67016d 100644 --- a/src/android/otdaemon_server.cpp +++ b/src/android/otdaemon_server.cpp @@ -249,7 +249,7 @@ exit: } } -void OtDaemonServer::HandleBackboneMulticastListenerEvent(void *aBinderServer, +void OtDaemonServer::HandleBackboneMulticastListenerEvent(void *aBinderServer, otBackboneRouterMulticastListenerEvent aEvent, const otIp6Address *aAddress) { @@ -590,13 +590,12 @@ Status OtDaemonServer::configureBorderRouter(const BorderRouterConfigurationParc { if (aBorderRouterConfiguration.isBorderRoutingEnabled) { + int infraIfIndex = if_nametoindex(aBorderRouterConfiguration.infraInterfaceName.c_str()); SuccessOrExit(error = otBorderRoutingSetEnabled(GetOtInstance(), false /* aEnabled */), message = "failed to disable border routing"); otSysSetInfraNetif(aBorderRouterConfiguration.infraInterfaceName.c_str(), icmp6SocketFd); icmp6SocketFd = -1; - SuccessOrExit(error = otBorderRoutingInit( - GetOtInstance(), if_nametoindex(aBorderRouterConfiguration.infraInterfaceName.c_str()), - false /* aInfraIfIsRunning */), + SuccessOrExit(error = otBorderRoutingInit(GetOtInstance(), infraIfIndex, otSysInfraIfIsRunning()), message = "failed to initialize border routing"); SuccessOrExit(error = otBorderRoutingSetEnabled(GetOtInstance(), true /* aEnabled */), message = "failed to enable border routing"); diff --git a/src/android/otdaemon_server.hpp b/src/android/otdaemon_server.hpp index 595e0b4c..387a37b1 100644 --- a/src/android/otdaemon_server.hpp +++ b/src/android/otdaemon_server.hpp @@ -106,7 +106,7 @@ private: static void ReceiveCallback(otMessage *aMessage, void *aBinderServer); void ReceiveCallback(otMessage *aMessage); void TransmitCallback(void); - static void HandleBackboneMulticastListenerEvent(void *aBinderServer, + static void HandleBackboneMulticastListenerEvent(void *aBinderServer, otBackboneRouterMulticastListenerEvent aEvent, const otIp6Address *aAddress); @@ -125,4 +125,4 @@ private: } // namespace Android } // namespace otbr -#endif // OTBR_ANDROID_BINDER_SERVER_HPP_
\ No newline at end of file +#endif // OTBR_ANDROID_BINDER_SERVER_HPP_ |