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
parent
48f4dcbeb2
commit
b4b5487887
2
msg.c
2
msg.c
|
@ -310,6 +310,7 @@ int msg_post_recv(struct ptp_message *m, int cnt)
|
||||||
suffix = m->signaling.suffix;
|
suffix = m->signaling.suffix;
|
||||||
break;
|
break;
|
||||||
case MANAGEMENT:
|
case MANAGEMENT:
|
||||||
|
port_id_post_recv(&m->management.targetPortIdentity);
|
||||||
suffix = m->management.suffix;
|
suffix = m->management.suffix;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -368,6 +369,7 @@ int msg_pre_send(struct ptp_message *m)
|
||||||
suffix = m->signaling.suffix;
|
suffix = m->signaling.suffix;
|
||||||
break;
|
break;
|
||||||
case MANAGEMENT:
|
case MANAGEMENT:
|
||||||
|
port_id_pre_send(&m->management.targetPortIdentity);
|
||||||
suffix = m->management.suffix;
|
suffix = m->management.suffix;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue