Re: [PATCH ovpn net v2 4/5] ovpn: avoid in-place updates of peer bind local address
Ralf Lici <[email protected]>
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 14 Aug 2026 10:25:29 +0200, Ralf Lici <[email protected]> wrote: > On Thu, 13 Aug 2026 18:55:33 +0200, Sabrina Dubroca <[email protected]> wrote: > > [...] > > > @@ -267,26 +263,40 @@ void ovpn_peer_endpoints_update(struct ovpn_peer *peer, struct sk_buff *skb) > > > netdev_name(peer->ovpn->dev), > > > peer->id, &bind->local.ipv6, > > > &ipv6_hdr(skb)->daddr); > > > - bind->local.ipv6 = ipv6_hdr(skb)->daddr; > > > - reset_cache = true; > > > + local_ip = &ipv6_hdr(skb)->daddr; > > > } > > > break; > > > default: > > > goto unlock; > > > } > > > > > > - if (unlikely(reset_cache)) > > > - dst_cache_reset(&peer->dst_cache); > > > - > > > - /* if the peer did not float, we can bail out now */ > > > - if (likely(!salen)) > > > + /* if there was no float and the local address is unchanged, bail out */ > > > + if (likely(!salen && !local_ip)) > > > goto unlock; > > > > nit: !salen is redundant? local_ip is also set in the float case. > > > > Good catch. > Small correction to my previous reply: !salen was not actually redundant. It implicitly distinguished a remote endpoint float from a local endpoint update, so only float reached notification and transport-address rehashing. Since that was unclear, v3 replaces it with an explicit "floated" boolean. -- Ralf Lici Mandelbit Srl