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 <richardcochran@gmail.com>
master
Richard Cochran 2013-07-22 21:37:11 +02:00
parent 48f4dcbeb2
commit b4b5487887
1 changed files with 2 additions and 0 deletions

2
msg.c
View File

@ -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: