See this, for example: https://groups.google.com/g/opensshunixdev/c/FVv_bK16ADM/m/R...
It boilds down to using a Linux-specific API, though it's really BSD that is lacking support for a standard (RFC 5014).