+ ND_PRINT(", RFC2117-encoding");
+
+ if (len < 4) {
+ ND_PRINT("[length %u < 4]", len);
+ nd_print_invalid(ndo);
+ return;
+ }
+ ND_PRINT(", cksum 0x%04x ", GET_BE_U_2(pim->pim_cksum));
+ if (GET_BE_U_2(pim->pim_cksum) == 0) {
+ ND_PRINT("(unverified)");
+ } else {
+ if (PIM_TYPE(pim_typever) == PIMV2_TYPE_REGISTER) {
+ /*
+ * The checksum only covers the packet header,
+ * not the encapsulated packet.
+ */
+ cksum_status = pimv2_check_checksum(ndo, bp, bp2, 8);
+ if (cksum_status == INCORRECT) {
+ /*
+ * To quote RFC 4601, "For interoperability
+ * reasons, a message carrying a checksum
+ * calculated over the entire PIM Register
+ * message should also be accepted."
+ */
+ cksum_status = pimv2_check_checksum(ndo, bp, bp2, len);
+ }
+ } else {
+ /*
+ * The checksum covers the entire packet.
+ */
+ cksum_status = pimv2_check_checksum(ndo, bp, bp2, len);
+ }
+ switch (cksum_status) {