From b4b5487887561ad0d92aded95a28281fb914ae91 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 22 Jul 2013 21:37:11 +0200 Subject: [PATCH] msg: Add missing network byte order conversion. This patch adds proper byte order processing for the target port identity field of management messages. This bug was not previously noticed due to the fact that our client had always set this field to the wild card port number of 0xffff. Signed-off-by: Richard Cochran --- msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msg.c b/msg.c index 5c1adb0..4af9782 100644 --- a/msg.c +++ b/msg.c @@ -310,6 +310,7 @@ int msg_post_recv(struct ptp_message *m, int cnt) suffix = m->signaling.suffix; break; case MANAGEMENT: + port_id_post_recv(&m->management.targetPortIdentity); suffix = m->management.suffix; break; } @@ -368,6 +369,7 @@ int msg_pre_send(struct ptp_message *m) suffix = m->signaling.suffix; break; case MANAGEMENT: + port_id_pre_send(&m->management.targetPortIdentity); suffix = m->management.suffix; break; default: