I am working a network device for a custom hardware device
and I can't really go into the details on the hardware. So
I won't go into too much detail on why I want to do things
this way.
I want to have the net device get a packet and call
netif_rx() with a skbuff. In one situation the packets
will just get routed out normally, but at other times
the packet will already be formed with a IP Source that
is for one of the local interfaces. In this case ip_input
drops the packet since fib_validate_source fails.
It seems that I am stuck either:
1. changing ip_input/fib_validate_source
or
2. filling out skb->dst and calling ip_forward myself in
the driver.
Are there any other options?
For #1 I am not too fond of it unless other people want
this feature as well.
So are there other people that see any value in doing this?
I can't follow the fib code yet, so I don't have a patch. I
would think it would involve adding some sort of flag that
marks the device as "trusted" to set the source IP to any
value.
|