bp += 1;
next_protocol = *bp;
bp += 1;
- service_path_id = EXTRACT_24BITS(bp);
+ service_path_id = EXTRACT_BE_24BITS(bp);
bp += 3;
service_index = *bp;
bp += 1;
if (ndo->ndo_vflag > 2) {
if (md_type == 0x01) {
for (n = 0; n < length - 2; n++) {
- ctx = EXTRACT_32BITS(bp);
+ ctx = EXTRACT_BE_32BITS(bp);
bp += NSH_HDR_WORD_SIZE;
ND_PRINT((ndo, "\n Context[%02d]: 0x%08x", n, ctx));
}
else if (md_type == 0x02) {
n = 0;
while (n < length - 2) {
- tlv_class = EXTRACT_16BITS(bp);
+ tlv_class = EXTRACT_BE_16BITS(bp);
bp += 2;
tlv_type = *bp;
bp += 1;
}
for (vn = 0; vn < tlv_len; vn++) {
- ctx = EXTRACT_32BITS(bp);
+ ctx = EXTRACT_BE_32BITS(bp);
bp += NSH_HDR_WORD_SIZE;
ND_PRINT((ndo, "\n Value[%02d]: 0x%08x", vn, ctx));
}
ip6_print(ndo, bp, next_len);
break;
case 0x3:
- ether_print(ndo, bp, next_len, next_len, NULL, NULL);
+ ether_print(ndo, bp, next_len, ndo->ndo_snapend - bp, NULL, NULL);
break;
default:
ND_PRINT((ndo, "ERROR: unknown-next-protocol"));