lkml.org 
[lkml]   [1996]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Warning to all gated users.
Date
> Well, raw.c contains:
>
> skb->daddr = saddr;
>
> #if 0
> /*
> * For no adequately explained reasons BSD likes to mess up the header of
> * the received frame.
> */
>
> if(sk->bsdism)
> skb->ip_hdr->tot_len=ntohs(skb->ip_hdr->tot_len-4*skb->ip_hdr->ihl);
> #endif
>
> if (sk->users) {
>
> (BTW, it was incorrect, when it was not commented.

It was never in uncommented - it breaks the clone() snooping and all sorts
of other stuff.

> And third, if this skb is clone of another, it will garble it too,
> so that this fix should be done in raw_recvmsg in user buffer)

Yes. Best to fix the client code. Things like mrouted have Linux awareness
in this. Im not planning on changing the clean and logical linux approach
for the fact BSD mashes the header internally and passes the mashed one
to the user. That I could as a BSD bug that got written into 2 or 3
applications. (Also I dont want everyone to need a new ping binary)

Alan


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.053 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site