ip_route_input panic fix
Subsystems (2)
Hello!
Quoted 3 lines
There is also the ARP code which passes an ARP packet through that would get dereferenced as an IP packet. Granted this shouldn't crash because nh is set properly.
And point to something which is not an IP header. So, iph->protocol is something funny. :-)
It is plain luck that this never happens, ARP packets with multicast addresses are filtered out.
Mess, I agree.
Quoted 4 lines
But we really should make up our mind as to whether the routing key comes from the arguments to
ip_route_input(src/dst/...) or the skb.Using both is just asking for trouble.
Well, both sets are present only for use the same function in ARP.
So, arguments. skb can be even preserved, but it should not be used for anything but debugging or for hints, when we should not create cache entry.
BTW, I cannot figure out what ip_check_mc tries to do with protocol (which is __u16 by some reason). If it creates cache entry, protocol is not checked. Funny.
Alexey