Subject: Re: How to fix packet destination address before RFC1122 dropping
To: Paulo Matias <syscoder@gmail.com>
From: Darren Reed <darrenr@netbsd.org>
List: tech-net
Date: 07/06/2007 12:58:42
Paulo Matias wrote:
> Hi,
>
> I own a mobile phone that connects to my computer via PPP, but its IP
> stack is broken, so it sends me packets with "127.0.0.1" as
> destination address, although I setup PPP this way: "pppd /dev/ttyU0
> 115200 10.0.0.1:10.0.0.2 netmask 255.0.0.0 noauth silent local
> persist"
>
> As I can't fix it in the device, I must fix the destination address of
> the packets at the computer, but I don't know the best way to do this
> under NetBSD.
> ...
> But under NetBSD (and under OpenBSD and FreeBSD too), perhaps dropping
> takes place before ipf/pf can change its destination address.

On these platforms, pfil is being used as part of the security mechanisms
for networking.  Packets should not be entering the system from outside
with 127/8 as either the source or destination address.

But if you're using BSD, there's no reason you can't comment out the
lines (around 553) that prevent you from getting your phone to work
with your kernel.  I just think it would be difficult to convince anyone
that such a change is suitable for all.

Darren