ip_output() Error Handling in tcp_output()
Matt Miller
matt at matthewjmiller.net
Thu Mar 14 01:12:36 UTC 2013
On Wed, Mar 13, 2013 at 3:35 PM, Chuck Swiger <cswiger at mac.com> wrote:
> Hi--
>
> On Mar 13, 2013, at 8:21 AM, Matt Miller wrote:
>> If we have a connection that has received a SYN and ip_output()
>> returns, say, EHOSTUNREACH, is there anything that guarantees the
>> connection would always eventually be dropped if the condition
>> persists?
>
> If the local TCP stack is unable to reply with a SYN-ACK, then it hasn't established a connection yet because it cannot proceed through the 3WHS to ESTAB. It will stay in LISTEN state.
>
Sorry, I should have been more specific: say the connection has
already progressed to at least ESTABLISHED or beyond when the
ip_output() error occurs. So, we'll hit the TCPS_HAVERCVDSYN if block
below:
case EHOSTDOWN:
case EHOSTUNREACH:
case ENETDOWN:
case ENETUNREACH:
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_softerror = error;
return (0);
}
Thanks,
Matt
> Regards,
> --
> -Chuck
>
More information about the freebsd-net
mailing list