Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCP continually reset if configuring as gateway when not supported #402

Open
josephn123 opened this issue Apr 26, 2019 · 1 comment
Open

Comments

@josephn123
Copy link
Contributor

josephn123 commented Apr 26, 2019

Describe the bug
If attempting to use one of the wpanctl commands:

  • add-prefix
  • remove-prefix
  • config-gateway
  • add-route
  • remove-route

when the NCP hasn't been compiled with BORDER_ROUTER=1, wpantund gets stuck in an infinite loop trying to set unsupported properties on the NCP and resetting the NCP due to this failure. Upon NCP reset, wpantund tries to restore border router configuration from its local copy and fails again due to the same issue. Resets NCP. Repeat.

To Reproduce
Take latest wpantund & openthread. Example, to build for the efr32 without border router support:

Openthread:

make -f examples/Makefile-efr32 BOARD=BRD4304A clean
make -f examples/Makefile-efr32 BOARD=BRD4304A

Flash NCP binary to device, start wpantund. Then:

wpanctl config-gateway

Expected behavior
An error should be returned when running the listed wpanctl commands when the functionality is unsupported on the NCP. Specifically, wpantund should check the NCP supports border router functionality before adding the border router configuration to its local copy in the first place.

@abtink
Copy link
Member

abtink commented Apr 26, 2019

@josephn123 Thanks for raising this. We can address this for the commands (return an error when not supported) - which would be helpful.

One tricky thing is that wpantund also allows an IP address to be added by directly on the interface. An address can require a prefix to be added on Thread network. For such a case there is no easy way to fail and return an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants