mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-22 13:29:08 +02:00
Preparation for authenticating data-path messages (security review of #7098, finding F-003). The authentication needs the existing PSK while a new one is being derived, to produce a MAC attached to the offers and their answers that proves they are authentic. So committing a new PSK must keep the previous one, and a reply must be sealed with the PSK that verified the offer rather than the one just committed. Today both operations are inlined at their call sites. Pure refactor, no behaviour change: the two PSK commit sites call commitPSKLocked, and pushDataPath delegates the endpoint lookup and send to sendDataPath.