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

From: Sabrina Dubroca <[email-masked]>
Date: Thu, 5 Sep 2024 11:55:33 +0200

2024-08-27, 14:07:59 +0200, Antonio Quartulli wrote:
> +void ovpn_peer_float(struct ovpn_peer *peer, struct sk_buff *skb)
> +{
[...]
> +
> +	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?

-- 
Sabrina