/* \summary: Open Shortest Path First (OSPF) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
break;
}
+
+ /* in OSPF everything has to be 32-bit aligned, including TLVs */
+ if (tlv_length % 4) {
+ tlv_length += (4 - (tlv_length % 4));
+ }
tptr+=tlv_length;
ls_length_remaining-=tlv_length;
}
case OSPF_TYPE_LS_ACK:
lshp = op->ospf_lsa.lsa_lshdr;
- while (ospf_print_lshdr(ndo, lshp) != -1) {
+ while ((const u_char *)lshp < dataend) {
+ ospf_print_lshdr(ndo, lshp);
++lshp;
}
break;