Subject: Re: [RFC] ipv6: allow rejecting with "source address failed policy"

From: Jonas Gorski <[email-masked]>
Date: Sat, 8 Jun 2013 00:40:00 +0200

On Fri, 07 Jun 2013 15:27:30 -0700 (PDT)
David Miller <[email-masked]> wrote:

> From: Jonas Gorski <[email-masked]>
> Date: Mon,  3 Jun 2013 16:45:08 +0200
> 
> > RFC6204 L-14 requires rejecting traffic from invalid addresses with
> > ICMPv6 Destination Unreachable, Code 5 (Source address failed
> > ingress/ egress policy) on the LAN side, so add an appropriate rule
> > for that.
> > 
> > Signed-off-by: Jonas Gorski <[email-masked]>
> 
> I don't see the point of this, there is no difference from the
> existing PROHIBIT other than the error code.  Everything that needs to
> be expressed can be done using PROHIBIT.
> 

There is a semantic difference. PROHIBIT says the *destination*
address is not allowed, so trying again is pointless.

This one says the while the destination is allowed, the *source*
address is not allowed, and a different source address should be used.
So probably -EAGAIN would be the right error code in that case.
"POLICY_FAILED" is maybe a wrong abbreviation, but the full name is
quite long (I'm open for suggestions).

Of course maybe handling of this kind of message should be added, too;
which should trigger the source address selection to chose a different
one.

Unless you say I can change the ICMPv6 Destination Unreached Code used
through appropriate rules, then this might be redundant.

Regards
Jonas