tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd5-rc3 crash caused by isc_dhcrelay



Does this help?
(sizeof in6_pktinfo is not a multiple of 8, so CMSG_ALIGN makes
it larger and m_len gan drop below 0)

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [ce2a8930f24bd7a99ea9a08d69c6611eaaf230a1]
#
# patch "sys/netinet6/ip6_output.c"
#  from [138e6790c65b699aa77eedbc1d81fbe53ba147f1]
#    to [71cd1a8b6382a10ea1d5b61a4841c1f5dbde7f65]
#
============================================================
--- sys/netinet6/ip6_output.c   138e6790c65b699aa77eedbc1d81fbe53ba147f1
+++ sys/netinet6/ip6_output.c   71cd1a8b6382a10ea1d5b61a4841c1f5dbde7f65
@@ -2809,7 +2809,7 @@ ip6_setpktopts(struct mbuf *control, str
        if (control->m_next)
                return (EINVAL);
 
-       for (; control->m_len; control->m_data += CMSG_ALIGN(cm->cmsg_len),
+       for (; control->m_len > 0; control->m_data += CMSG_ALIGN(cm->cmsg_len),
            control->m_len -= CMSG_ALIGN(cm->cmsg_len)) {
                int error;
 


Home | Main Index | Thread Index | Old Index