From 59f00b5061de480e425323662ea60946c2334eb5 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 1 Apr 2012 19:28:13 +0200 Subject: [PATCH] Let each interface use its own transport. This will allow running a boundary clock that bridges different kinds of PTP networks. Signed-off-by: Richard Cochran --- ptp4l.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ptp4l.c b/ptp4l.c index 2eca0ef..193abf8 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -108,7 +108,9 @@ int main(int argc, char *argv[]) break; case 'i': if (nports < MAX_PORTS) { - iface[nports++].name = optarg; + iface[nports].name = optarg; + iface[nports].transport = transport; + nports++; } else { fprintf(stderr, "too many interfaces\n"); return -1; @@ -156,7 +158,6 @@ int main(int argc, char *argv[]) return -1; } for (i = 0; i < nports; i++) { - iface[i].transport = transport; iface[i].timestamping = timestamping; } if (timestamping == TS_SOFTWARE || timestamping == TS_LEGACY_HW) {