@Override
public void addAuthenticationKey(Eid key, MappingAuthkey authKey) {
- LOG.debug("Adding authentication key '{}' for {}", key,
+ LOG.debug("Adding authentication key '{}' for {}", authKey.getKeyString(),
LispAddressStringifier.getString(key));
smc.addAuthenticationKey(key, authKey);
}
public class LcafSerializer extends LispAddressSerializer {
private static final LcafSerializer INSTANCE = new LcafSerializer();
+ private static final byte DEFAULT_IID_MASK_LENGTH = (byte) 32;
// Private constructor prevents instantiation from other classes
protected LcafSerializer() {
protected void serializeLCAFAddressHeaderForInstanceId(ByteBuffer buffer, LispAddress lispAddress) {
LispAddressSerializer lcafSerializer = InstanceIdSerializer.getInstance();
serializeLCAFAddressHeader(buffer, lispAddress, lcafSerializer);
+ buffer.put(buffer.position() - 1, DEFAULT_IID_MASK_LENGTH);
buffer.putShort((short) (lcafSerializer.getLcafLength(lispAddress) -
LispAddressSerializer.getInstance().getInstanceIdExtraSize()));
}
ByteBuffer bb = hexToByteBuffer("32 00 01 01 63 99 "
+ "83 64 23 06 a8 be 00 01 00 14 b8 c2 a2 e1 dc 4a "
+ "08 0c f6 01 b0 9d 70 5a d4 88 95 f8 73 dd 00 00 "
- + "05 a0 01 20 10 00 00 00 40 03 00 00 02 00 00 0a "
+ + "05 a0 01 20 10 00 00 00 40 03 00 00 02 20 00 0a "
+ "00 00 00 01 00 01 c3 a8 c8 01 0a 32 ff 00 00 04 "
+ "00 01 ac 10 01 02 15 1a 39 80 e3 35 e6 c4 49 a6 "
+ "90 87 20 65 9a b7 00 00 00 00 00 00 00 00 ");
ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eid));
LispAddressSerializer.getInstance().serialize(buf, eid);
ByteBuffer expectedBuf = hexToByteBuffer("40 03 00 00 " + //
- "02 00 00 0A " + //
+ "02 20 00 0A " + //
"00 02 03 04 " + // instance ID
"00 01 11 22 33 44");
ArrayAssert.assertEquals(expectedBuf.array(), buf.array());