diff options
| author | Ralf Lici <ralf@mandelbit.com> | 2026-08-28 15:00:06 +0200 |
|---|---|---|
| committer | Antonio Quartulli <antonio@openvpn.net> | 2026-09-21 11:39:13 +0200 |
| commit | b43beccb3713fafada57814b0a652f4a876eb75f (patch) | |
| tree | b0aad6dcc2f6a847c132fd1765745a79836276bb /include/linux/debugobjects.h | |
| parent | 7d8104988f423572df1f3347ce578037b1043f34 (diff) | |
ovpn: always unhash old VPN addresses before rehashing
ovpn_peer_hash_vpn_ip updates the per-peer VPN address hash entries
after userspace changes a peer VPN address. The current code removes an
old hash entry only when the new address for that family is not the
unspecified address.
When an address is cleared to 0.0.0.0 or ::, its hash node therefore
remains linked in the bucket selected by the old address. The address
comparison performed during lookup prevents the old address from
matching, but the table retains a stale entry until the peer is removed
or another address is configured for that family.
Always remove both old VPN address hash entries before conditionally
adding the currently configured addresses back. This ensures that a
cleared address leaves its hash node unhashed.
Fixes: 1d36a36f6d53 ("ovpn: implement peer add/get/dump/delete via netlink")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
