Date: Fri, 9 Mar 2001 12:46:50 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: Ian Dowse <iedowse@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_icmp.c ip_input.c Message-ID: <20010309124650.C19746@sunbay.com> In-Reply-To: <200103081903.f28J3Rp36712@freefall.freebsd.org>; from iedowse@FreeBSD.org on Thu, Mar 08, 2001 at 11:03:27AM -0800 References: <200103081903.f28J3Rp36712@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 08, 2001 at 06:58:34PM +0000, Ian Dowse wrote:
>
> Ruslan,
>
> I'm just going to commit what I have. We can sort out the `right way'
> to do this later if necessary.
>
Ian, I was not able to read my mail - there was a day-off here yesterday:
: Mar 8 First Annual International Women's Day, 1909
: Mar 8 International Women's Day in U.S.S.R.
On Thu, Mar 08, 2001 at 11:03:27AM -0800, Ian Dowse wrote:
> iedowse 2001/03/08 11:03:26 PST
>
> Modified files:
> sys/netinet ip_icmp.c ip_input.c
> Log:
>
[...]
>
> Also:
> - Calculate the correct number of bytes that need to be
> retained for icmp_error(), instead of assuming that 64
> is enough (it's not).
[...]
FWIW, I think that this could stay as is for now. Eventually,
we may want to make the number of data bytes we return in the
ICMP error message a variable, as some other systems allow to
(NetBSD, Solaris). And if we do this, we will have to replace
this
: MGET(mcopy, M_DONTWAIT, m->m_type);
: if (mcopy != NULL) {
: M_COPY_PKTHDR(mcopy, m);
: mcopy->m_len = imin((IP_VHL_HL(ip->ip_vhl) << 2) + 8,
: (int)ip->ip_len);
: m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
: }
with what I suggested:
: mcopy = m_copym(m, 0, imin((int)ip->ip_len,
: (IP_VHL_HL(ip->ip_vhl) << 2) + icmpreturndatabytes,
: M_DONTWAIT));
: if (mcopy != NULL && (mcopy->m_flags & M_EXT))
: mcopy = m_pullup(mcopy, IP_VHL_HL(ip->ip_vhl) << 2);
Cheers,
--
Ruslan Ermilov Oracle Developer/DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010309124650.C19746>
