On 6/21/19 6:45 PM, Mahesh Bandewar wrote: > When we invalidate dst or mark it "dead", we assign 'lo' to > dst->dev. First of all this assignment is racy and more over, > it has MTU implications. > > The standard dev MTU is 1500 while the Loopback MTU is 64k. TCP > code when dereferencing the dst don't check if the dst is valid > or not. TCP when dereferencing a dead-dst while negotiating a > new connection, may use dst device which is 'lo' instead of > using the correct device. Consider the following scenario: >
Why doesn't the TCP code (or any code) check if a cached dst is valid? That's the whole point of marking it dead - to tell users not to rely on it.