FreeBSD Bugzilla – Attachment 14869 Details for
Bug 27782
ipf packet munging bug using "to" option in rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.48 KB, created by
Louis Mamakos
on 2001-05-31 01:00:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Louis Mamakos
Created:
2001-05-31 01:00:02 UTC
Size:
1.48 KB
patch
obsolete
>--- /sys/netinet/ip_fil.c Sun Feb 25 10:53:34 2001 >+++ /tmp/ip_fil.c Wed May 30 19:50:45 2001 >@@ -1284,6 +1284,32 @@ > struct route iproute; > frentry_t *fr; > >+#ifdef __FreeBSD__ >+ /* >+ * HOT FIX/KLUDGE: >+ * >+ * If the mbuf we're about to send is not writable (because of >+ * a cluster reference, for example) we'll need to make a copy >+ * of it since this routine modifies the contents. >+ * >+ * If you have non-crappy network hardware that can transmit data >+ * from the mbuf, rather than making a copy, this is gonna be a >+ * problem. >+ */ >+ >+ if (M_WRITABLE(m) == 0) { >+ if ((m0 = m_dup(m, M_DONTWAIT)) != 0) { >+ m_freem(m); >+ m = m0; >+ } else { >+ error = ENOBUFS; >+ m_freem(m); >+ ipl_frouteok[1]++; >+ return 0; >+ } >+ } >+#endif >+ > hlen = fin->fin_hlen; > ip = mtod(m0, struct ip *); > >@@ -1379,12 +1405,17 @@ > # if BSD >= 199306 > int i = 0; > >+#ifdef __FreeBSD__ >+ /* HOT FIX: we've already made a copy of the mbuf >+ above, so we won't need to restore it here. */ >+#else /* __FreeBSD__ */ > # ifdef MCLISREFERENCED > if ((m->m_flags & M_EXT) && MCLISREFERENCED(m)) > # else > if (m->m_flags & M_EXT) > # endif > i = 1; >+#endif /* __FreeBSD__ */ > # endif > # ifndef sparc > # ifndef __FreeBSD__ >@@ -1399,7 +1430,9 @@ > error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, > ro->ro_rt); > if (i) { >+# ifndef __FreeBSD__ > ip->ip_id = ntohs(ip->ip_id); >+# endif > ip->ip_len = ntohs(ip->ip_len); > ip->ip_off = ntohs(ip->ip_off); > }
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 27782
: 14869