Re: dummy ethernet driver

Nick Holloway (Nick.Holloway@pyrites.org.uk)
6 Jan 2003 10:16:54 -0000


airlied@linux.ie (Dave Airlie) writes:
> device but rather a useless one :-), so I patched the dummy so it had an
> address (hardcoded) is broadcast and loops back packets to itself...
>
> the patch is attached.. is there any reason why the dummy device doesn't
> want to do this stuff? I'm just submitting the patch as a request for
> comments on why this isn't done anyway in the dummy?

[Some background on the dummy driver -- I don't know if there is another
way to configure devices for your purpose, or if your patch is the only
way, I'll leave that for others to answer]

With the way the dummy driver was used, it wasn't necessary to handle
packets.

I wanted my dial-up static IP address to be valid even when the ppp device
was not connected, so I wrote the dummy interface. If the destination
IP of a packet matches the IP of a local interface, then the packet is
routed over the loopback interface.

So, for this use the dummy interface doesn't need to handle packets, it
just needs to hold an IP address. In the case that someone configures
the routing tables so that packets are sent via the dummy device, it
just black-holes the packets.

-- 
 `O O'  | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/