ntp: update NTP-over-PTP support

Update the support for NTP over PTP to the latest specification
(currently in the RFC editor queue). Switch the NTP TLV to the
organization-specific TLV using the IANA OUI and assigned TLV
subtype 0x1. The Network Correction extension field has been
assigned type 0x10A. The extfield option accepts F324 as an alias
for 10A to not break existing configurations. Drop the experimental
status.
This commit is contained in:
Miroslav Lichvar
2025-11-26 12:14:08 +01:00
parent 73f6657dfd
commit 007a1ae4fe
12 changed files with 94 additions and 82 deletions

View File

@@ -122,12 +122,13 @@ CPS_ParseNTPSourceAdd(char *line, CPS_NTP_Source *src)
if (sscanf(line, "%"SCNx32"%n", &ef_type, &n) != 1)
return CPS_InvalidValue;
switch (ef_type) {
case NTP_EF_NET_CORRECTION:
case 0xF324:
src->params.ext_fields |= NTP_EF_FLAG_NET_CORRECTION;
break;
case NTP_EF_EXP_MONO_ROOT:
src->params.ext_fields |= NTP_EF_FLAG_EXP_MONO_ROOT;
break;
case NTP_EF_EXP_NET_CORRECTION:
src->params.ext_fields |= NTP_EF_FLAG_EXP_NET_CORRECTION;
break;
default:
return CPS_InvalidValue;
}