Include both refid and IP address in tracking and sourcestats reports

ref_id is not sufficient for IPv6 addresses and ref_id is needed for
reference clocks.
This commit is contained in:
Miroslav Lichvar
2009-10-13 16:04:24 +02:00
parent fbd20c429e
commit 1570f97ee2
7 changed files with 40 additions and 6 deletions

View File

@@ -733,6 +733,7 @@ SRC_SelectSource(unsigned long match_addr)
REF_SetReference(min_stratum, leap_status,
sources[selected_source_index]->ref_id,
sources[selected_source_index]->ip_addr,
&now,
src_offset,
src_frequency,
@@ -960,6 +961,7 @@ SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report)
return 0;
} else {
src = sources[index];
report->ref_id = src->ref_id;
if (src->ip_addr)
report->ip_addr = *src->ip_addr;
else