From: Gabriel Paubert <paubert@xxxxxxx> Date: Thu, 13 Sep 2007 11:39:01 +0200 > On Thu, Sep 13, 2007 at 11:12:06AM +0200, Gabriel Paubert wrote: > > A patch to restore pre-2.3.41 behaviour for IPv4 follows (and the > > logic becomes much clearer IMO, not only because it avoids a goto), > > but I'm not sure that it should be applied. > > > > It should not since it was buggy, the correct one follows (it was > missing the test for inet->recverr in the last if ( ) statement). I took a look at this. What this code is doing is acknowledging the fact that without recverr being enabled the error return for disconnected sockets is totally ambiguous and the application can't do anything reasonable with it. What port is the error for? The application can't know, because it is disconnected and without recverr there is no way to pass that crucial information back to the application. The application could have sent several disconnected messages to several different ports, but there is no way to figure out which one the ICMP error is for without recverr. You mention ipv6, it's logic is very similar if not identical to that of ipv4. So what the code is currently doing is correct, the 2.3.41 change was a correct bug fix. - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html