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

disable ffuplink-interface during initial setup #185

Merged
merged 7 commits into from
Jan 27, 2021
Merged

Conversation

SvenRoederer
Copy link
Contributor

On a fresh installed system, there is no valid setup of ffuplink. So we disable this interface, till it's configured by some uplink-preset.
The advantage of this change s, that an unconfigured ffuplink (as so uplink-preset was installed for manual configuration) will not cause any unintended sideeffects.

This code ha been tested on the SAm0815_experimental branches since some time.

On a fresh installed system, there is no valid setup of ffuplink. So
we disable this interface, till it's configured by some uplink-preset.
The default of this interface is disabled, so we must enable it
after it's setup.
@pmelange
Copy link
Contributor

pmelange commented Mar 19, 2019

I just did a test. I installed the tunneldigger version. In the wizard, I selected mesh only (sharenet=0). I also connect the wan port to the internet. After reboot, the tunneldigger interface builds. That means that disabled=0 for the ffuplink interface.

I set up a second node with the no-tunnel version. In the wizard, I again selected mesh only. I also connected the wan port to ethernet. After reboot, the dhcp interface builds.

Both nodes see each other as smart gateways. There is no internet.

Possibly, instead of setting disabled=0 in the uci-defaults, it shold go in the wizard. Maybe where sharenet is set to 1.

@pmelange
Copy link
Contributor

An alternative to this PR has been created (#190)

@pmelange
Copy link
Contributor

@SvenRoederer can we close this PR and use #190 instead?

@SvenRoederer
Copy link
Contributor Author

@pmelange essentially the difference between this PR and PR #190 is the place where the interface will be enabled.
This PR leaves it to the uplink-scripts:

  • advantage: installing a uplink-package on the manual / backbone image will enable the ffuplink-interface automaticaly

PR #190 relies on the wizard:

  • advantage: the ffuplink is inactive as long as "share internet" in not active

It's hard to decide for one as the best solution ...

@pmelange
Copy link
Contributor

@pmelange essentially the difference between this PR and PR #190 is the place where the interface will be enabled.
This PR leaves it to the uplink-scripts:

* advantage: installing a uplink-package on the manual / backbone image will enable the ffuplink-interface automaticaly

PR #190 relies on the wizard:

* advantage: the ffuplink is inactive as long as "share internet" in not active

It's hard to decide for one as the best solution ...

Try the tests described in #185 (comment).

After the wizard is ran and "share internet" is not enabled, then the node should not announce a smart gateway. PR #185 Fails this test. PR #190 does not fail this test.

pmelange and others added 4 commits December 30, 2019 01:04
The ffuplink interface is disabled by default on a fresh install.
During the course of running the wizard, the user must select if
they want to share their internet connection or not.  If the user
decides to share their internet, then the ffuplink interface shall
be enabled (setting disabled=0).

This addresses freifunk-berlin/firmware#603
…cted"

This reverts commit 1aebe45, as it puts code
related to "shareInternet-Settings" in the wireless.lua-file.
When the user is on the "shareInternet"-page he must have selected to share
his uplink. As he wants to share the uplink, we enable this interface here.
This reverts commit a548568, as we enable the
ffuplink-interface in the ffwizard when reachjing the "sharenet"-page. On
manually configured routers this interface must be enabled in the configuration.
@SvenRoederer
Copy link
Contributor Author

SvenRoederer commented Dec 30, 2019

I just did a test. I installed the tunneldigger version. In the wizard, I selected mesh only (sharenet=0). I also connect the wan port to the internet. After reboot, the tunneldigger interface builds. That means that disabled=0 for the ffuplink interface.

I set up a second node with the no-tunnel version. In the wizard, I again selected mesh only. I also connected the wan port to ethernet. After reboot, the dhcp interface builds.

From the logic perspective it should be:

  • the user installs an uplink-package
    • the user wants to use an uplink and is willing to share it. what would be the reason for installing an uplink-package anyway.
    • this installed uplink should work out of the box, when possible. This will work for tunneldigger and notunnel but others might need additional configuration (e.g. certificates for OpenVPN)
  • When no uplink-package is installed, the use will for sure not share
    • This does not relate to the status of the WAN-connetction of the router itself. As we separated WAN and ffuplink, the router can use the WAN-connection for its traffic (statistics, updates, DNS) but all client-traffic should go only via mesh

By writing this, I feel we should rework this system, as soon as we implement the "common Image for dynamical selection of uplink-type".

@pmelange I suggest to use this PR, as it now combines your suggestion with enabling the ffuplink-interface in the wizard and also keeps the idea to have the uplink-packages enable the uplink. This way we can later revert individual changes, as we need them.

this is not needed anymore, sine we use git-autoversioning on master.
@pmelange
Copy link
Contributor

Quite honestly, do whatever you want with this. I am no longer developing for the freifunk firmware.

@everloop2 everloop2 merged commit 37e1445 into master Jan 27, 2021
@everloop2 everloop2 deleted the disable_ffuplink branch January 27, 2021 10:37
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

Successfully merging this pull request may close these issues.

3 participants