Thread (58 messages) 58 messages, 4 authors, 2024-09-23

Re: [PATCH net-next v6 19/25] ovpn: add support for peer floating

From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-09-09 08:50:31

On 05/09/2024 11:55, Sabrina Dubroca wrote:
2024-08-27, 14:07:59 +0200, Antonio Quartulli wrote:
quoted
+void ovpn_peer_float(struct ovpn_peer *peer, struct sk_buff *skb)
+{
[...]
quoted
+
+	netdev_dbg(peer->ovpn->dev, "%s: peer %d floated to %pIScp", __func__,
+		   peer->id, &ss);
+	ovpn_peer_reset_sockaddr(peer, (struct sockaddr_storage *)&ss,
+				 local_ip);
+
+	spin_lock_bh(&peer->ovpn->peers->lock_by_transp_addr);
ovpn->peers in only set in MP mode, is there something preventing us
getting here in P2P mode? I think we need a mode==MP check around the
rehash.  (I just took a look at other uses of ovpn->peers and there
are obvious mode == MP checks before all of them except this one)

I guess this would only happen in P2P mode if the server changes IP,
so it doesn't really occur in practice?
Good point. Technically this is still possible (a server may change IP 
or we may be connected against another P2P host that changes IP), 
therefore we should not prevent float from working properly in P2P.

I will fix this in the next version.

Thanks!


-- 
Antonio Quartulli
OpenVPN Inc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help