FreeBSD Bugzilla – Attachment 8569 Details for
Bug 17872
arpintr() fix followup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.31 KB, created by
C. Stephen Gunn
on 2000-04-09 04:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
C. Stephen Gunn
Created:
2000-04-09 04:30:01 UTC
Size:
1.31 KB
patch
obsolete
>Index: if_ether.c >=================================================================== >RCS file: /project/cvs/FreeBSD/src/sys/netinet/if_ether.c,v >retrieving revision 1.68 >diff -u -r1.68 if_ether.c >--- if_ether.c 2000/03/29 07:50:39 1.68 >+++ if_ether.c 2000/04/09 03:28:43 >@@ -434,7 +434,7 @@ > { > register struct mbuf *m, *m0; > register struct arphdr *ar; >- int s, ml; >+ int s; > > while (arpintrq.ifq_head) { > s = splimp(); >@@ -442,7 +442,14 @@ > splx(s); > if (m == 0 || (m->m_flags & M_PKTHDR) == 0) > panic("arpintr"); >- >+ >+ if (m->mh_len < sizeof(struct arphdr) + 2 * ar->ar_hln >+ + 2 * ar->ar_pln) { >+ log(LOG_ERR, "arp: runt packet\n"); >+ m_freem(m); >+ continue; >+ } >+ > if (m->m_len < sizeof(struct arphdr) && > ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { > log(LOG_ERR, "arp: runt packet -- m_pullup failed\n"); >@@ -455,20 +462,6 @@ > log(LOG_ERR, > "arp: unknown hardware address format (0x%2D)\n", > (unsigned char *)&ar->ar_hrd, ""); >- m_freem(m); >- continue; >- } >- >- m0 = m; >- ml = 0; >- while (m0 != NULL) { >- ml += m0->m_len; /* wanna implement m_size?? */ >- m0 = m0->m_next; >- } >- >- if (ml < sizeof(struct arphdr) + 2 * ar->ar_hln >- + 2 * ar->ar_pln) { >- log(LOG_ERR, "arp: runt packet\n"); > m_freem(m); > continue; > }
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 17872
: 8569