Subject: Re: uipc_socket.c
To: Christoph Badura <bad@flatlin.ka.sub.org>
From: Michael Graff <explorer@flame.org>
List: tech-kern
Date: 08/15/1996 23:36:52
bad@flatlin.ka.sub.org (Christoph Badura) writes:

> Michael Graff writes:
> >However, I don't agree that we should allow "bad" packets to be transmitted
> >using sendto().  IMHO, if you are going to do this, use BPF directly.
> 
> Why?  Do you have any reasons for that?

Yes, but we already differ in opinion.

Why should we _allow_ our IP output code to send bad packets?  IMHO,
trapping errors is much more important than the (somewhat specific)
use of sending bad packets to test stacks.

> Correct.  It should not happen that the machine crashes if ip->ip_len
> has a bad value.  However, that has nothing to do with the ability to
> send packets with bad ip->ip_len values.  The kernel should be fixed
> to not panic in that case and not to silently "correct" the value.

I do not agree with this at all.  IMHO, and FreeBSD does this, the packet
should be discarded.

If you want to send packets with bad headers, I don't think the OS should
make it a built-in feature.  There are other ways to do this (bpf for
one) so it isn't impossible to do.  In fact, if you are indeed testing
remote stacks you WANT to use bpf to ensure total control over what you
send.

--Michael