Support for 4B ASN in BGP

Martin Mares mj at ucw.cz
Mon Oct 6 13:13:21 CEST 2008


Hello!

> Here is a patch adding 4B ASN support to BGP.
> It is slightly tested and mostly complete.

Thanks for the patch. I see only a couple of minor issues with it:

> +  return dst - dst_start;
> +}
> +
> +
> +
>  void

Please do not add too much whitespace.

> +#define AS_TRANS		23456

This deserves a comment.

> +  { NULL, },									/* BA_EXTENDED_COMM */
> +  { "as4_path", -1, BAF_OPTIONAL | BAF_TRANSITIVE, EAF_TYPE_OPAQUE, 1,		/* BA_AS4_PATH */
> +    bgp_check_as4_path, NULL },
> +  { "as4_aggregator", 8, BAF_OPTIONAL | BAF_TRANSITIVE, EAF_TYPE_OPAQUE, 1,	/* BA_AS4_PATH */
> +    NULL, NULL }
>  };
>  
> +/* BA_AS4_PATH is type EAF_TYPE_OPAQUE and not type EAF_TYPE_AS_PATH because
> + * EAF_TYPE_AS_PATH is supposed to have different format (2 or 4 B for each ASN)
> + * depending on bgp_as4_support variable.
> + */
> +

Does this make sense?  Wouldn't it be better to have a single extended
attribute format and convert as necessary?

Or, if we decide that we should prefer saving space over simplicity,
define a new type for the extended paths.

> +      if ((code == BA_AGGREGATOR) && bgp_as4_support && (! p->as4_support))

What is the global setting of `bgp_as4_support' for? Shouldn't it be
always a per-instance setting?

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj at ucw.cz>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Ctrl and Alt keys stuck -- press Del to continue.



More information about the Bird-users mailing list