Summary
MobilityHeaderSerializer writes and reads the Proxy Registration (P) flag of a Binding Acknowledgement at 0x40 of the flags octet that follows the Status field (src/inet/networklayer/mipv6/MobilityHeaderSerializer.cc:186 and :318):
stream.writeByte((ba->getKeyManagementFlag() ? 0x80u : 0)
| (ba->getProxyRegistrationFlag() ? 0x40u : 0)); // P-flag (RFC 5213)
...
ba->setProxyRegistrationFlag((kFlag & 0x40u) != 0); // P-flag (RFC 5213)
0x40 is the Mobile Router (R) flag of the Network Mobility (NEMO) Basic Support Protocol, RFC 3963. The P flag of the Binding Update in the same file is right (0x0200 in its 16-bit flags field).
What the standard says
RFC 5213 Section 10, the "Binding Acknowledgment Flags" registry:
(K) 0x80 [RFC3775]
(R) 0x40 [RFC3963]
This document reserves a new flag (P) as follows:
(P) 0x20
The field diagram of RFC 5213 Section 8.2 shows |K|R|P|Reserved | after the Status field.
Why it matters
The encoder and decoder agree with each other, so a simulation behaves correctly; the bytes on the wire are wrong. A packet capture of the local mobility anchor's backhaul in examples/ipv6/pmipv6, dissected by Wireshark (tshark), shows every Proxy Mobile IPv6 (PMIPv6) Proxy Binding Acknowledgement as a NEMO message with R set and P clear. Anything that exchanges serialized packets with a real implementation, through a capture or an emulation interface, sees the wrong flag. In the receive direction, a NEMO Binding Acknowledgement with R set is decoded as a proxy one, and the deserializer then reads proxy mobility options that a NEMO message does not carry.
Summary
MobilityHeaderSerializerwrites and reads the Proxy Registration (P) flag of a Binding Acknowledgement at0x40of the flags octet that follows the Status field (src/inet/networklayer/mipv6/MobilityHeaderSerializer.cc:186and:318):0x40is the Mobile Router (R) flag of the Network Mobility (NEMO) Basic Support Protocol, RFC 3963. The P flag of the Binding Update in the same file is right (0x0200in its 16-bit flags field).What the standard says
RFC 5213 Section 10, the "Binding Acknowledgment Flags" registry:
The field diagram of RFC 5213 Section 8.2 shows
|K|R|P|Reserved |after the Status field.Why it matters
The encoder and decoder agree with each other, so a simulation behaves correctly; the bytes on the wire are wrong. A packet capture of the local mobility anchor's backhaul in
examples/ipv6/pmipv6, dissected by Wireshark (tshark), shows every Proxy Mobile IPv6 (PMIPv6) Proxy Binding Acknowledgement as a NEMO message with R set and P clear. Anything that exchanges serialized packets with a real implementation, through a capture or an emulation interface, sees the wrong flag. In the receive direction, a NEMO Binding Acknowledgement with R set is decoded as a proxy one, and the deserializer then reads proxy mobility options that a NEMO message does not carry.