IPoIB: Update the link-layer dissector to a void function
diff --git a/netdissect.h b/netdissect.h
index 3ad1424..56bfb51 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -484,7 +484,7 @@
 extern u_int ieee802_15_4_if_print IF_PRINTER_ARGS;
 extern u_int ieee802_15_4_tap_if_print IF_PRINTER_ARGS;
 extern u_int ipfc_if_print IF_PRINTER_ARGS;
-extern u_int ipoib_if_print IF_PRINTER_ARGS;
+extern void ipoib_if_print IF_PRINTER_ARGS;
 extern void ipnet_if_print IF_PRINTER_ARGS;
 extern u_int juniper_atm1_if_print IF_PRINTER_ARGS;
 extern u_int juniper_atm2_if_print IF_PRINTER_ARGS;
diff --git a/print-ipoib.c b/print-ipoib.c
index 5ebefd6..25c4927 100644
--- a/print-ipoib.c
+++ b/print-ipoib.c
@@ -74,8 +74,15 @@
 	u_int orig_length;
 	u_short ether_type;
 
-	if (caplen < IPOIB_HDRLEN || length < IPOIB_HDRLEN) {
+	if (caplen < IPOIB_HDRLEN) {
 		nd_print_trunc(ndo);
+		ndo->ndo_ll_hdr_len += caplen;
+		return;
+	}
+
+	if (length < IPOIB_HDRLEN) {
+		nd_print_trunc(ndo);
+		ndo->ndo_ll_hdr_len += length;
 		return;
 	}
 
@@ -111,11 +118,9 @@
  * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
-u_int
+void
 ipoib_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 {
 	ndo->ndo_protocol = "ipoib";
 	ipoib_print(ndo, p, h->len, h->caplen, NULL, NULL);
-
-	return (IPOIB_HDRLEN);
 }
diff --git a/print.c b/print.c
index dcecb1f..af770ba 100644
--- a/print.c
+++ b/print.c
@@ -74,9 +74,6 @@
 #ifdef DLT_LANE8023
 	{ lane_if_print,	DLT_LANE8023 },
 #endif
-#ifdef DLT_IPOIB
-	{ ipoib_if_print,       DLT_IPOIB },
-#endif
 #ifdef DLT_C_HDLC
 	{ chdlc_if_print,	DLT_C_HDLC },
 #endif
@@ -213,6 +210,9 @@
 #ifdef DLT_IPNET
 	{ ipnet_if_print,	DLT_IPNET },
 #endif
+#ifdef DLT_IPOIB
+	{ ipoib_if_print,       DLT_IPOIB },
+#endif
 #ifdef DLT_NETANALYZER
 	{ netanalyzer_if_print, DLT_NETANALYZER },
 #endif