freeasformat patch for quagga
Here I am providing the promised free as format patch
reintroducing the possibility to use whichever as
number format you want to use.
There have been a few changes from the original AS4
One thing did not change:
In the AS4 patch, asdot was the default format used.
This is no longer the case.
The freeasformat patch does not need no stinking default format!
You use what you like and quagga will follow. If you do not
stick to one format quagga will force you to use the most sensible
one of the set you use ;-).
If you use nothing, quagga will fall back
The format for asnumber output (or printing into aspath strings)
should be in the configuration. If it is set there by a
configuration command, the
format chosen is obviously the one used (regardless of the
If the format selection is missing in the configuration
that is no error. The format is automatically set
when an output of an as number is being made for the first time.
The setting will then appear as configuration command when the
running configuration is saved the next time.
The autoselected value for the format is chosen as follows:
If AS4 numbers have been input (either from a read
in configuration or by the user) and any one format
was used exclusively, then that format will be the one
If asdot and asdot+ have been used, asdot+ takes precedence.
If asplain and any other format(s) have been used, asplain
If no clue can be found, i.e. no AS4 number has been input
yet, asplain will be used.
If you go through the precedence above you can correctly say
that asplain is in fact the fallback aka "default" when
no hint whatsoever can be found by quagga and it has to use
The procedure ensures that any configuration, either one from
the asplain only CVS versions or from an AS4 patched quagga
(with any chosen format excepting asip) will run without any
Support of the as number format "asip" (which was there
"only for testing" anyway) has been dropped. This is possible
because there was a clear "use at your own peril" warning
about that thing.
Support for the '+'-notation for extended communities which
forced AS4 encoding of the value has been dropped. By comparing
AS4 and AS2 encoded values by just comparing the as
the value (disregarding the encoding for this kind of comparison)
there is no need for
That must still be implemented,
The '+' will be simply skipped when it is read, but it will not
be output again when a configuration file is written out.
Be aware that this skipping is supposed to be dropped with
quagga 1.0 the latest, probably sooner, maybe even when this
patch is merged into mainline.
OK, After these caveats:
You may enter an as number in asplain, asdot or asdot+.
For quagga, this is all the same.
This patch may be used for cvs quagga as of 2007-10-15
onwards up to the last one not having this patch or a
large part of it in it!
Here is your patch:
quagga-freeasnumberformat.patch (50780 Bytes)
Feedback: j.kammer (at) eurodata.de