Improve batadv_vlan.sh for LuCI integration#1167
Improve batadv_vlan.sh for LuCI integration#1167simonwunderlich merged 1 commit intoopenwrt:masterfrom
Conversation
|
CC: @ecsv |
|
@ordex I think this was originally from you. @simonwunderlich you are the maintainer |
I am not sure I worked on this patch in the past (?), in any case the change makes sense to me. However, please note that I cannot comment on the usage of |
Thank you for yout remark. It encouraged me look into the call to So I think it best to remove the call to |
|
The build system did not like that I committed a change to my fork of the routing repository with my github no-reply e-mail address and without a required format of git commit message. Also, it wants a "Signed-off-by" e-mail address. So it failed the build. I have little to no experience with pull requests, the only way I can see to fix this myself is by creating a new pull request. |
The modify the Makefile and increase the You must definitely modify a lot of more things to make this acceptable. At the end, you can then push everything via |
| json_get_vars ap_isolation | ||
|
|
||
| [ -n "$ap_isolation" ] && batctl vlan "$iface" ap_isolation "$ap_isolation" | ||
| batadv_iface="${iface%.*}" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Removed and commit squashed into the rebase.
|
All right, I will try. Thank you for your patience. |
1eb3536 to
7a5928b
Compare
|
Redid all the 'Run tested' tests I describe in the commit message, all pass. |
This comment was marked as resolved.
This comment was marked as resolved.
|
About $INCLUDE_ONLY: I followed https://openwrt.org/docs/guide-developer/network-scripting?s[]=network#writing_protocol_handlers and I looked at the other protocol handler scripts that followed the guide. The guide does not say why. It looks like a performance optimization to me, or the protocol handler script could be included by some program that does not have the included files available, for example to only discover which functions the protocol handler script defines. Either the guide is wrong, or the script is wrong. Either way, the script works. |
7a5928b to
46c8fb8
Compare
|
I've adjusted my github profile e-mail settings and I've performed another rebase in an attempt to make the build system happy. |
46c8fb8 to
aa8a126
Compare
|
Almost. Rebased again to add the Signed-off-by. |
aa8a126 to
aef0614
Compare
aef0614 to
a9afd6a
Compare
|
@ecsv and @ordex: Your reviews are great and to the point. I appreciate your help very much. This has been a learning experience for me. However, all of this sure is a lot of work and a lot of trial and error, and definitely costs more time and effort than it really should. As a newbie with a newbie view at the non-trivial procedures I need to follow I can make a few suggestions:
If the documentation how to successfully complete a pull request already exists, make it so that it stares you in the face if you want to contribute. A big link in the README on the front page of the repo, for example. Do with this what you wish. |
|
The above does not mean that I'm abandoning the effort to get this pull request merged, I'm still here. |
|
@wififreedom You understand that neither @ordex or myself are the maintainer(s)? Even when you still incorrectly say in the PR that I am. We only tried to help get this merged. We have absolutely nothing to say about the formal requirement. It is there and it is automatically tested by the CI. For the guidelines/requirements: https://openwrt.org/faq/how_can_i_help_or_contribute - and the automated tests, see the checks at the end of the PR. About the skills for working with git - I don't think that I should write a tutorial in some kind of readme. This would quite a lot of duplicated material. And you have to keep in mind - we are not the maintainers. Why should I spend my time writing this? |
|
My apologies, @ecsv. In the instructions about how the initial pull request message should be formatted was something about: look at the Makefile to see who is the maintainer. I looked at the Makefile, but in the wrong way: who had committed in the git log, and your name was there for the last almost all commits. I now see in the Makefile that you are not the maintainer. You are very kind to help me anyway. |
|
I have updated the PR. |
Apply ap_isolation default value '0' if option ap_isolation is not present in the batadv_vlan interface configuration. Default value '0' should be applied for the use case where "option ap_isolation '1'" was present, is removed, and 'service network reload' is executed. This is required for proper LuCI integration, because if an option is set to the default value, LuCI removes the option. Also take into account $INCLUDE_ONLY as in other /lib/netifd/proto scripts and as recommended in the guide at: https://openwrt.org/docs/guide-developer/network-scripting Signed-off-by: Bastiaan Stougie <wififreedom2026@protonmail.com>
a9afd6a to
9777081
Compare
|
@wififreedom thank you for pushing this through, it's now merged! @ecsv and @ordex, thank you for all the inputs! |
Maintainer: Simon Wunderlich sw@simonwunderlich.de
Compile tested: N/A, this is a modification to an existing shell script that is not compiled.
Run tested: aarch64_cortex-a53, ARMv8 Processor rev 4, OpenWrt 25.12.0 r32713-f919e7899d.
Tests done with /etc/config/network:
Confirmed correct value with
batctl vlan bat0.40 ap_isolationafter every action.Checked log files with logread, nothing to see.
Description:
Apply ap_isolation default value '0' if option ap_isolation is not present in the batadv_vlan interface configuration.
Default value '0' should be applied for the use case where "option ap_isolation '1'" was present, is removed, and 'service network reload' is executed.
This is required for proper LuCI integration, because if an option is set to the default value, LuCI removes the option.
Also take into account $INCLUDE_ONLY as in other /lib/netifd/proto scripts.