openvpn icon indicating copy to clipboard operation
openvpn copied to clipboard

fix error "UDPv6: Can't assign requested address (code=49)"

Open Tontonjo opened this issue 1 year ago • 2 comments

This bug appears when you let the openvpn server in "multihome" configuration, preventing the connexion to be established.

Related to and fixed by user hashiz in openvpn community but not yet implemented.

https://community.openvpn.net/openvpn/attachment/ticket/874/patch-src-openvpn-socket.c

Tested this fix on my setup with success

Thank you for your contribution

You are welcome to open PR, but they are used for discussion only. All patches must eventually go to the openvpn-devel mailing list for review:

  • https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Please send your patch using git-send-email. For example to send your latest commit to the list:

$ git send-email [email protected] HEAD~1

For details, see these Wiki articles:

  • https://community.openvpn.net/openvpn/wiki/DeveloperDocumentation
  • https://community.openvpn.net/openvpn/wiki/Contributing

Tontonjo avatar May 16 '24 15:05 Tontonjo

We assume that you can reply on the same interface (ifindex) that you get message in. You are removing that assumption. I think your change will break talking to clients that connect via link local addresses as for those you need to specify the ifindex to be able to reply.

So it would be good to have a better understanding of your environment and why this is happening. Do you have some assymetric routing setup?

schwabe avatar May 16 '24 15:05 schwabe

We assume that you can reply on the same interface (ifindex) that you get message in. You are removing that assumption. I think your change will break talking to clients that connect via link local addresses as for those you need to specify the ifindex to be able to reply.

So it would be good to have a better understanding of your environment and why this is happening. Do you have some assymetric routing setup?

As far as i know i dont have an asymetric setup.

Let me clarify a bit: This fixed my problem where i was unable to correctly establish connexion over ipv6 in "multihome" mode.

My VPN would correctly be established if i'd set the "local" address to my ipv6 interface address, but this would imply to lose ipv4 connectivity, which i dont want to.

This fix is not mine but as far as the bug seems to have been stalled and this indeed fixed it in my case, i though it would be cool to contribute.

Regards

Tontonjo avatar May 16 '24 15:05 Tontonjo