SIGN IN SIGN UP
juanfont / headscale UNCLAIMED

An open source, self-hosted implementation of the Tailscale control server

0 0 43 Go

state: fix routesChanged mutating input Hostinfo

routesChanged aliases newHI.RoutableIPs into a local variable then
sorts it in place, which mutates the caller's Hostinfo data. The
Hostinfo is subsequently stored on the node, so the mutation
propagates but the input contract is violated.

Clone the slice before sorting to avoid mutating the input.
K
Kristoffer Dalby committed
82bb4331f5b639905cf71f82af21acc51776e1e5
Parent: 2a2d5c8
Committed by Kristoffer Dalby <kristoffer@dalby.cc> on 4/10/2026, 12:18:56 PM