openwisp-config icon indicating copy to clipboard operation
openwisp-config copied to clipboard

[curl] Added --interface argument to improve IPv6 support

Open klukonin opened this issue 7 years ago • 6 comments

[curl] Added --interface argument to improve IPv6 support.

Curl need to be run with --interface option for normal work with ipv6. It does not have an effect on ipv4, but help to manage devices through ipv6. Also this can be present as a security improvement. May be better to add this to the official docs.

klukonin avatar Apr 04 '17 15:04 klukonin

@klukonin are we 100% sure this change will not affect ipv4 only users? I think the best thing to do is to discuss this on the OpenWISP forum/mailing list before merging this change. Could you open a thread there please?

Could you also change the commit message to something like [curl] Added --interface argument to support IPv6 please?

nemesifier avatar Apr 04 '17 16:04 nemesifier

Sure. No problem. https://groups.google.com/forum/m/#!topic/openwisp/SquuMmCCQCI

klukonin avatar Apr 04 '17 18:04 klukonin

@nemesisdesign I made some tests and ipv4 devices worked as usual. So, looks like we have a good chance ))

klukonin avatar Apr 04 '17 18:04 klukonin

@klukonin great news. I will also perform some tests when I get back from a work trip on monday

You edited the pull request title successfully, now you should edit the commit message too, you can do this with:

git commit --amend -m '[curl] Added --interface argument to improve IPv6 support'
git push -f origin patch-2

This will update the commit sent in this pull request automatically.

nemesifier avatar Apr 04 '17 19:04 nemesifier

I think the current patch may cause problems if someone is using a different uplink interface than what is used to calculate the mac-address of the device.

The most conservative way to introduce support for ipv6 link-local, in order to not risk breaking usage for existing installations, is to introduce a configuration option which is disabled by default and has 3 possible values:

  • '0' (disabled, this should be the default)
  • '1' (enabled and value defaults to $MAC_INTERFACE)
  • 'interface_name' (explicit interface name)

The name for this new configuration option could be simply "interface".

nemesifier avatar Apr 07 '17 08:04 nemesifier

I am not sure this thing can work: I have tried to tell CURL to send an HTTP request to an ipv6 link local address but I couldn't get it working.

If you could give me an example of how to replicate the setup you are interested in supporting I will give it a try.

nemesifier avatar Apr 19 '17 13:04 nemesifier