-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
dco: fix source IP selection #668
base: master
Are you sure you want to change the base?
Conversation
Could you add the scenario when this happens with a small config that allows us to reproduce this issue? |
1563695
to
1a4c7d4
Compare
update: manually rebased to master branch OS/Kernel: OpenWrt 22.03/Linux 5.10.104 (Minimal kernel config to reduce size), musl libc 1.2.2 There are 2 network interfaces wan and lan. Both have static IPs:
server.conf: local 192.168.190.105
tls-server
allow-compression no
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/server.crt
dev tun
dh /etc/openvpn/pki/dh.pem
keepalive 10 60
key /etc/openvpn/pki/private/server.key
server 10.200.200.0 255.255.255.0
topology subnet
tun-mtu 1448
verb 5 client.ovpn: remote 192.168.190.105
tun-mtu 1448
allow-compression no
client
dev tun
tls-client
# ca, cert, key omitted Client is at With some debugging I found that |
Update: found a similar bug when multihome option is enabled. I will push a new patch later. |
391ca69
to
9b7af93
Compare
sent to the list |
Why is CI failing? |
@LGA1150 the reason should be quite obvious if you look at the step that fails. Your code does not comform to our code style: ![]() |
It didn't fail immediately at that step. I was looking at "Set job status" and had no idea what it meant. |
9b7af93
to
83e8806
Compare
When multihome option is enabled, OpenVPN passes ipi_addr to DCO, which is always 0.0.0.0. It should use ipi_spec_dst instead. When local option is present, OpenVPN does not pass it to DCO. As a result, Linux may pick a different IP as the source IP, breaking the connection. Signed-off-by: Qingfang Deng <[email protected]>
83e8806
to
85419e2
Compare
If the local option is present, DCO should use it as the source IP, or Linux may pick a different IP as the source IP, breaking the connection.