Re: [RFC PATCH] network: return errors if we know tcp_connect failed

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Patrick McHardy
Date: Monday, November 15, 2010 - 8:57 am

On 15.11.2010 16:47, Eric Paris wrote:

I don't think having SELinux sending packets to handle local
connections is a very elegant design, its not a firewall after
all. What's wrong with reacting only to specific errno codes
in tcp_connect()? You could f.i. return -ECONNREFUSED from
SELinux, that one is pretty much guaranteed not to occur in
the network stack itself and can be returned directly.

That would need minor changes to nf_hook_slow so we can
encode errno values in the upper 16 bits of the verdict,
as we already do with the queue number. The added benefit
is that we don't have to return EPERM anymore when f.i.
rerouting fails.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
a problem tcp_v4_err(), Alexey Kuznetsov, (Fri Nov 12, 10:57 am)
Re: a problem tcp_v4_err(), Eric Dumazet, (Fri Nov 12, 11:12 am)
Re: a problem tcp_v4_err(), Eric Dumazet, (Fri Nov 12, 11:21 am)
Re: a problem tcp_v4_err(), Eric Dumazet, (Fri Nov 12, 11:27 am)
Re: a problem tcp_v4_err(), Alexey Kuznetsov, (Fri Nov 12, 11:29 am)
Re: a problem tcp_v4_err(), Alexey Kuznetsov, (Fri Nov 12, 11:31 am)
Re: a problem tcp_v4_err(), Eric Dumazet, (Fri Nov 12, 11:33 am)
Re: a problem tcp_v4_err(), David Miller, (Fri Nov 12, 12:22 pm)
Re: a problem tcp_v4_err(), Eric Dumazet, (Fri Nov 12, 2:18 pm)
Re: a problem tcp_v4_err(), David Miller, (Fri Nov 12, 2:36 pm)
Re: [RFC PATCH] network: return errors if we know tcp_conn ..., Patrick McHardy, (Mon Nov 15, 8:57 am)