On Mon, Jan 30, 2023 at 05:37:25PM +0100, Theo Buehler wrote:
> On Mon, Jan 30, 2023 at 03:29:49PM +0100, Claudio Jeker wrote:
> > Extended communities are annoying, especially the ASnum encodings are a
> > problem since the same extended community can be encoded in more than one
> > way. This results in strange behaviour when used with local-as and/or
> > neighbor-as.
> > 
> > This diff changes the match function for any community with masks (either
> > a * or local-as/neighbor-as) to work both for two and four byte ASnum
> > encoding. Now this change will allow for some impossible encodings but
> > because these are impossible the match function will not match and on
> > insert the best solution is selected or the insertion fails.
> 
> Makes sense, and reads fine.
> 
> ok tb
> 

Committed but with this line:
+                               m->data3 ^= EXT_COMMUNITY_TRANS_FOUR_AS << 8;
replaced with:
+                               m->data3 &= ~(EXT_COMMUNITY_TRANS_FOUR_AS << 8);

which is the more common way to punch a hole in the mask.

-- 
:wq Claudio

Reply via email to