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

ffmuc-mesh-vpn-wireguard module: fix minor bugs, send user-agent on broker calls and improve connectivity check after tunnel is established #390

Merged

Conversation

grische
Copy link
Contributor

@grische grische commented Apr 2, 2024

  • ffmuc-mesh-vpn-wireguard: move check connectivitiy in function to
    test twice if node is connectd
  • ffmuc-mesh-vpn-wireguard: add User-Agent if contacting broker
  • ffmuc-mesh-vpn-wireguard: make file executable
  • ffmuc-mesh-vpn-wireguard: fix uci value deletion

cc @T0biii

@grische grische added backport next Backport to Next Branch stable labels Apr 2, 2024
* ffmuc-mesh-vpn-wireguard: move check connectivitiy in function to
  test twice if node is connectd
* ffmuc-mesh-vpn-wireguard: add User-Agent if contacting broker
* ffmuc-mesh-vpn-wireguard: make file executable
* ffmuc-mesh-vpn-wireguard: fix uci value deletion
@grische grische force-pushed the fix/update-ffmuc-mesh-vpn-wireguard branch from 63ecfc6 to 0c22e9a Compare April 2, 2024 11:09
@T0biii
Copy link
Member

T0biii commented Apr 2, 2024

Seems to work fine

after Sysupgrade
Tue Apr  2 17:19:17 2024 daemon.err micrond[3708]: Chain 'IPV6_RA_FILTER' doesn't exist.
Tue Apr  2 17:19:17 2024 user.notice ipv6_ra_filter: ebtables chain IPV6_RA_FILTER does not exist
Tue Apr  2 17:19:17 2024 user.notice ipv6_ra_filter: IPV6_RA_FILTER chain initialised
Tue Apr  2 17:19:17 2024 user.notice ipv6_ra_filter: Failed to get batman gateway. Dropping any router advertisement.
Tue Apr  2 17:19:17 2024 daemon.err micrond[3708]: Failed to send request: Operation not permitted
Tue Apr  2 17:19:17 2024 user.notice checkuplink: Reconnecting ...
Tue Apr  2 17:19:20 2024 user.info checkuplink: Loadbalancing enabled.
Tue Apr  2 17:19:20 2024 daemon.err micrond[3708]: Unable to access interface: No such device
Tue Apr  2 17:19:20 2024 user.info checkuplink: Contacting wgkex broker https://broker.ffmuc.net/api/v2/wg/key/exchange
Tue Apr  2 17:19:20 2024 user.info checkuplink: Got data from wgkex broker: {"Endpoint":{"Address":"gw07.ext.ffmuc.net","AllowedIPs":["fe80::23b:d2ff:fe95:967f"],"Port":"40011","PublicKey":"PcKkakZcTEx3LKh+G06Opb8/esg08aWK33A5/Ff1YXE="}}
Tue Apr  2 17:19:20 2024 user.debug checkuplink: Successfully parsed wgkex broker data
Tue Apr  2 17:19:20 2024 user.info checkuplink: Connecting to gw07.ext.ffmuc.net([2001:678:ed0:ff00::2]:40011)
Tue Apr  2 17:19:30 2024 daemon.err micrond[3708]: ip6tables: Bad rule (does a matching rule exist in that chain?).
Tue Apr  2 17:19:30 2024 daemon.notice netifd: Interface 'mesh_vpn' is enabled
Tue Apr  2 17:19:30 2024 daemon.notice netifd: Network device 'mesh-vpn' link is up
Tue Apr  2 17:19:30 2024 daemon.notice netifd: Interface 'mesh_vpn' has link connectivity
Tue Apr  2 17:19:30 2024 daemon.notice netifd: Interface 'mesh_vpn' is setting up now
Tue Apr  2 17:19:30 2024 daemon.notice netifd: Interface 'mesh_vpn' is now up
Tue Apr  2 17:19:30 2024 user.notice firewall: Reloading firewall due to ifup of mesh_vpn (mesh-vpn)
Tue Apr  2 17:19:30 2024 kern.info kernel: [  101.927468] batman_adv: bat0: Adding interface: mesh-vpn
Tue Apr  2 17:19:30 2024 kern.info kernel: [  101.929062] batman_adv: bat0: The MTU of interface mesh-vpn is too small (1350) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1532 would solve the problem.
Tue Apr  2 17:19:30 2024 kern.info kernel: [  101.935605] batman_adv: bat0: Interface activated: mesh-vpn
Tue Apr  2 17:19:31 2024 kern.info kernel: [  102.429486] batman_adv: bat0: WiFi driver or ethtool info does not provide information about link speeds on interface mesh-vpn, therefore defaulting to hardcoded throughput values of 1.0 Mbps. Consider overriding the throughput manually or checking your driver.
Tue Apr  2 17:19:38 2024 user.notice firewall: Reloading firewall due to ifupdate of client (br-client)
Tue Apr  2 17:19:39 2024 user.info checkuplink: Successfully connected to gw07.ext.ffmuc.net([2001:678:ed0:ff00::2]:40011)
if v2 not available
Tue Apr  2 17:24:13 2024 user.notice checkuplink: Reconnecting ...
Tue Apr  2 17:24:15 2024 user.info checkuplink: Loadbalancing enabled.
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]: Unable to access interface: No such device
Tue Apr  2 17:24:15 2024 user.info checkuplink: Contacting wgkex broker https://broker.ffmuc.net/api/v3/wg/key/exchange
Tue Apr  2 17:24:15 2024 user.err checkuplink: Contacting wgkex broker failed, response:
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]: lua: .../gluon-mesh-wireguard-vxlan/parse-wgkex-response.lua:3: Malformed JSON response, wrong JSON format
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]: stack traceback:
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]:      [C]: in function 'assert'
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]:      .../gluon-mesh-wireguard-vxlan/parse-wgkex-response.lua:3: in main chunk
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]:      [C]: ?
Tue Apr  2 17:24:15 2024 user.err checkuplink: Parsing wgkex broker data failed
Tue Apr  2 17:24:15 2024 user.info checkuplink: Falling back to API v1
Tue Apr  2 17:24:15 2024 daemon.err micrond[3708]: Unable to access interface: No such device
Tue Apr  2 17:24:15 2024 user.info checkuplink: Contacting wgkex broker https://broker.ffmuc.net/api/v1/wg/key/exchange
Tue Apr  2 17:24:15 2024 user.info checkuplink: Got data from wgkex broker: {"Message":"OK"}
Tue Apr  2 17:24:15 2024 user.info checkuplink: Selected peer 3
Tue Apr  2 17:24:15 2024 user.info checkuplink: Connecting to gw06.ext.ffmuc.net([2001:678:ed0:ff00::1]:40011)
Tue Apr  2 17:24:25 2024 daemon.notice netifd: Interface 'mesh_vpn' is enabled
Tue Apr  2 17:24:25 2024 daemon.notice netifd: Network device 'mesh-vpn' link is up
Tue Apr  2 17:24:25 2024 daemon.notice netifd: Interface 'mesh_vpn' has link connectivity
Tue Apr  2 17:24:25 2024 daemon.notice netifd: Interface 'mesh_vpn' is setting up now
Tue Apr  2 17:24:25 2024 daemon.notice netifd: Interface 'mesh_vpn' is now up
Tue Apr  2 17:24:25 2024 user.notice firewall: Reloading firewall due to ifup of mesh_vpn (mesh-vpn)
Tue Apr  2 17:24:25 2024 kern.info kernel: [  397.253379] batman_adv: bat0: Adding interface: mesh-vpn
Tue Apr  2 17:24:25 2024 kern.info kernel: [  397.255135] batman_adv: bat0: The MTU of interface mesh-vpn is too small (1350) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1532 would solve the problem.
Tue Apr  2 17:24:25 2024 kern.info kernel: [  397.261630] batman_adv: bat0: Interface activated: mesh-vpn
Tue Apr  2 17:24:26 2024 kern.info kernel: [  397.780178] batman_adv: bat0: WiFi driver or ethtool info does not provide information about link speeds on interface mesh-vpn, therefore defaulting to hardcoded throughput values of 1.0 Mbps. Consider overriding the throughput manually or checking your driver.
Tue Apr  2 17:24:35 2024 user.info checkuplink: Successfully connected to gw06.ext.ffmuc.net([2001:678:ed0:ff00::1]:40011)

in the PR Description following part is missing:
ffmuc-mesh-vpn-wireguard: move check connectivitiy in function to test twice if node is connected

@grische grische marked this pull request as ready for review April 2, 2024 16:12
@grische grische requested review from maurerle and a team as code owners April 2, 2024 16:12
@grische grische enabled auto-merge April 2, 2024 16:12
@grische
Copy link
Contributor Author

grische commented Apr 2, 2024

The PR description is auto generated from the commit

@T0biii
Copy link
Member

T0biii commented Apr 2, 2024

@grische should we include this changes also?
freifunk-gluon/community-packages#107

@grische
Copy link
Contributor Author

grische commented Apr 2, 2024

No need to delay this PR here. We can update the module at any time.

Copy link
Member

@T0biii T0biii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM works on my machine

@T0biii
Copy link
Member

T0biii commented Apr 2, 2024

@grische grische changed the title modules: update ffmuc-mesh-vpn-wireguard ffmuc-mesh-vpn-wireguard module: add User-Agent to broker calls and improve connectivity check after tunnel is established Apr 2, 2024
@grische grische changed the title ffmuc-mesh-vpn-wireguard module: add User-Agent to broker calls and improve connectivity check after tunnel is established ffmuc-mesh-vpn-wireguard module: fix minor bugs, send user-agent on broker calls and improve connectivity check after tunnel is established Apr 2, 2024
@grische grische deleted the fix/update-ffmuc-mesh-vpn-wireguard branch April 5, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport next Backport to Next Branch stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants