Closed HRogge closed 11 months ago
I like the solution in https://github.com/plgd-dev/go-coap/tree/jkralik/feature/udp-propagate-interface
@jkralik I tried to see if your feature branch provides what I need, but I got a compiler error net/dtlslistener.go:124
want me to change this change to return the ControlMessage instead of interface index?
want me to change this change to return the ControlMessage instead of interface index?
Sorry @HRogge we are working on a release and some urgent bugs, hopefully everything will get sorted by the end of the week, we will check your work once we're finished with that. Thank you for your patience.
want me to change this change to return the ControlMessage instead of interface index?
@HRogge Absolutely, the control message is more general than the interface. Could you please enhance the content at https://github.com/plgd-dev/go-coap/tree/jkralik/feature/udp-propagate-interface and prepare it for merging 🙏 ?
want me to change this change to return the ControlMessage instead of interface index?
@HRogge Absolutely, the control message is more general than the interface. Could you please enhance the content at https://github.com/plgd-dev/go-coap/tree/jkralik/feature/udp-propagate-interface and prepare it for merging 🙏 ?
This branch works for me, I successfully get the interface index from the message. No enhancement necessary from my point of view.
There is something strange going on with the dependency on pion/transport/v2 (or v3)... but this might be a local problem of my installation. go-coap go.mod says "import pion/transport/v2", but my application which is using go-coap indirectly imports "pion/transport/v3", which results in a compilation error in net/dtlslistener.go
Difficulties with pion-transport dependency go away when I merge the current master into https://github.com/plgd-dev/go-coap/tree/jkralik/feature/udp-propagate-interface
I still successfully get the incoming interface value in my application.
@jkralik any timeline when/if you want to merge jkralik/feature/udp-propagate-interface? I don't know at which part the branch is lacking, the feature that I tried to introduce with this PR is already present and working in your branch.
Closing the PR because the feature has been implemented by #510
When building lowlevel network services with multiple interfaces, its often useful or even necessary to know the specific interface from which a Message was received from. This change uses the already existing packagecon in connUDP to get the interface from the operation system and stores it in the Message.