Merge branch 'vendor/TCPDUMP' and update build for the update.
[dragonfly.git] / contrib / tcpdump / print-ospf6.c
index 1100485..809238b 100644 (file)
@@ -294,9 +294,9 @@ ospf6_print_lsa(register const struct lsa6 *lsap)
                printf(", metric %u",
                        EXTRACT_32BITS(&lsap->lsa_un.un_inter_ap.inter_ap_metric) & SLA_MASK_METRIC);
                lsapp = lsap->lsa_un.un_inter_ap.inter_ap_prefix;
-               while (lsapp + sizeof(lsapp) <= (struct lsa6_prefix *)ls_end) {
+               while (lsapp + 1 <= (struct lsa6_prefix *)ls_end) {
                        bytelen = ospf6_print_lsaprefix(lsapp);
-                       if (bytelen)
+                       if (bytelen < 0)
                                goto trunc;
                        lsapp = (struct lsa6_prefix *)(((u_char *)lsapp) + bytelen);
                }