FreeBSD Bugzilla – Attachment 16698 Details for
Bug 30524
4.4-RC4: panic in icmp_reflect [WITH PATCH]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.36 KB, created by
larse
on 2001-09-12 18:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
larse
Created:
2001-09-12 18:00:01 UTC
Size:
1.36 KB
patch
obsolete
>--- plain Wed Sep 12 09:47:58 2001 >+++ ip_icmp.c Wed Sep 12 09:37:54 2001 >@@ -639,9 +639,26 @@ > /* > * The following happens if the packet was not addressed to us, > * and was received on an interface with no IP address. >+ * >+ * Prior versions simply set ia = in_ifaddrhead.tqh_first if it >+ * was zero here. When in_ifaddrhead.tqh_first is also zero >+ * (pointer gets dereferenced below), the kernel panics. It looks >+ * like this can happen with PC-card interfaces, but I have not >+ * investigated this fully. >+ * >+ * Instead, iterate over the TAILQ to find the first non-zero >+ * interface address, and use that. If none can be found, skip >+ * sending the ICMP packet. >+ * larse@isi.edu > */ >- if (ia == (struct in_ifaddr *)0) >- ia = in_ifaddrhead.tqh_first; >+ if (ia == (struct in_ifaddr *)0) { >+ TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) >+ if (ia != (struct in_ifaddr *)0) >+ break; >+ if (ia == (struct in_ifaddr *)0) >+ /* did not find any valid interface address */ >+ goto done; >+ } > t = IA_SIN(ia)->sin_addr; > ip->ip_src = t; > ip->ip_ttl = ip_defttl;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 30524
: 16698 |
16699
|
16700