Switching from the curl backend to the native module broke the system config-management commit-archive source-address parameter for some people because although it was intended for source addresses, it also worked for ports and interfaces because it directly passed the value to curl's --interface option. This unexpected/undocumented feature disappeared with the update, so it may be a good idea to make separate, explicit parameters like source-port and source-interface.
Description
Details
- Version
- -
- Is it a breaking change?
- Perfectly compatible
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
In progress | FEATURE REQUEST | None | T3355 Remove all remaining legacy Vyatta code | ||
Resolved | FEATURE REQUEST | erkin | T3356 Script for remote file transfers | ||
Wontfix | erkin | T4090 Source port and interface support for `commit-archive` |
Event Timeline
I personally think the interface part is high-effort, low-gain since you can simply use the address of the interface to the same effect, whereas simply providing an interface will force it to decide which address to use on dual-stack systems. It needs to pick between AF_INET and AF_INET6 when creating the socket before setsockopt()ing SO_BINDTODEVICE; although I think we can get away with doing what socket.create_connection() does. Even then, only the SFTP portion of the code directly uses socket — everything else relies on higher level libraries that only expose address and port options. (Also, using a single parameter for both addresses and interfaces is a bad idea, in my opinion, because it's probably more useful to resolve an FQDN string to an address rather than assume all strings are interfaces. But otherwise, we'd need to find a way to resolve conflict between address and interface parameters.) All in all, I don't think the interface parameter is a good idea at all but we'll see.
The port thing is trivial but I'm not sure if anyone would ever use it.
I prefer to rewrite the whole https://github.com/vyos/vyatta-config-mgmt to XML/python
If anyone actually wants support for source port parameter, feel free to reopen this, but the interface parameter is a no-go. In the meantime, rewriting vyatta-config-mgmt takes precedence.