Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2023 16:29:42 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6342c9ed178e - main - if_ovpn: atomic_set -> atomic_store
Message-ID:  <202305241629.34OGTgmO087626@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=6342c9ed178e6507d29accd07f1d53bb827162f7

commit 6342c9ed178e6507d29accd07f1d53bb827162f7
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-05-24 16:27:53 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-05-24 16:29:21 +0000

    if_ovpn: atomic_set -> atomic_store
    
    The intent is to set the value to UINT32_MAX, not to |= UINT32_MAX.
    Happily the intent (ensure that we do not send further packets) is
    achieved either way.
    
    Reported by:    markj
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/net/if_ovpn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index 49c8c8e9677a..a05b06f090e3 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -1885,7 +1885,7 @@ ovpn_transmit_to_peer(struct ifnet *ifp, struct mbuf *m,
 
 		/* Let's avoid (very unlikely, but still) wraparounds of the
 		 * 64-bit counter taking us back to 0. */
-		atomic_set_64(&peer->keys[OVPN_KEY_SLOT_PRIMARY].encrypt->tx_seq,
+		atomic_store_64(&peer->keys[OVPN_KEY_SLOT_PRIMARY].encrypt->tx_seq,
 		    UINT32_MAX);
 
 		return (ENOBUFS);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305241629.34OGTgmO087626>