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

gluon-mesh-batman-adv: Use own namespace for batman-adv-legacy #1589

Closed
wants to merge 8 commits into from

Conversation

T-X
Copy link
Contributor

@T-X T-X commented Nov 27, 2018

This patchset allows loading and running the mainline batman-adv (compat 15) and the batman-adv-legacy (compat 14) fork simultaneously.

Which module to use is determined via the routing_algo parameter in the site configuration (which is copied to /etc/config/batman-adv on update): If set to BATMAN_IV_LEGACY then the batman-adv-legacy (compat 14) module is used. Otherwise (e.g. BATMAN_IV or BATMAN_V) the mainline batman-adv module is chosen.

Together with the gluon-scheduled-domain-switch package (#1555) this should ease the migration from compat 14 to compat 15 and speed-up the deprecation of batman-adv-legacy.

Note: This pull-request should only be applied after applying freifunk-gluon/batman-adv-legacy#13 and after applying freifunk-gluon/packages#206.

@T-X T-X changed the title Batman adv legacy namespace batman-adv-legacy: Use _legacy namespace Nov 27, 2018
@T-X T-X changed the title batman-adv-legacy: Use _legacy namespace gluon-mesh-batman-adv: Use own namespace for batman-adv-legacy Nov 27, 2018
@T-X T-X added the 0. type: enhancement The changeset is an enhancement label Nov 27, 2018
@rotanid rotanid added the 2. status: blocked Marked as blocked because it's waiting on something label Dec 2, 2018
T-X added 8 commits December 25, 2018 19:02
a037b14 batman-adv-legacy: change batctl to legacy namespace
45cf4b5 batman-adv-legacy: change to batman-adv-legacy namespace
batman-adv-legacy now uses its own namespaces. And whether to use v14 or
v15 is determined by the routing algorithm specified in the site
configuration. Which means both the batman-adv and batman-adv-legacy
kernel modules as well as the according glue code provided by
gluon-mesh-batman-adv-14 and gluon-mesh-batman-adv-15 can be installed
at the same time.

Signed-off-by: Linus Lüssing <[email protected]>
The internal batman-adv compat version numbers are just confusing for
the user. Instead, let's just name things "batman-adv" when refering to
compatibility version 15 and "batman-adv-legacy" when refering to
compatibility version 14.

Signed-off-by: Linus Lüssing <[email protected]>
With this patch, the gluon-mesh-batman-adv respondd provider determins
the compat version through the selected algorithm in
/etc/config/batman-adv (BATMAN_IV_LEGACY vs. BATMAN_IV/BATMAN_V) instead
of the file previously placed in /lib/gluon/mesh-batman-adv/compat.

Also, the kernel module's new namespace (batman_adv -> batman_adv_legacy)
is used to determine the module release version.

Signed-off-by: Linus Lüssing <[email protected]>
This commit adds a transparent wrapper which depending on the selected
batman-adv routing algorithm calls either /usr/sbin/batctl or
/usr/sbin/batctl-legacy.

Signed-off-by: Linus Lüssing <[email protected]>
…nary path

With this patch the batctl wrapper is used to determine the correct
batctl binary either for batman-adv or batman-adv-legacy.

Signed-off-by: Linus Lüssing <[email protected]>
With this patch the batctl (wrapper) is used to determine which netlink
namespace to use for netlink calls ("batadv" vs. "batadv_legacy").

Signed-off-by: Linus Lüssing <[email protected]>
@T-X T-X force-pushed the batman-adv-legacy-namespace branch from 0452dfc to 55d49d8 Compare December 25, 2018 18:06
@T-X
Copy link
Contributor Author

T-X commented Dec 25, 2018

Changelog v2:

  • updated packages hash in modules file to the current merge result of batman-adv-legacy: Use _legacy namespace packages#206
  • fixed gluon-ebtables-limit-arp calls to the correct batctl binary by setting and using PATH to use the batctl wrapper
  • fixed alfred startup with a patch to let it automatically determine the netlink name to use ("batadv" vs. "batadv_legacy")

@T-X
Copy link
Contributor Author

T-X commented Jan 18, 2019

Closing this in favor of #1622.

@T-X T-X closed this Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. type: enhancement The changeset is an enhancement 2. status: blocked Marked as blocked because it's waiting on something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants