summaryrefslogtreecommitdiff
path: root/bgpd/bgp_flowspec_util.h
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-08-21bgpd: ipv6 flowspec address decoding and validationPhilippe Guibert
as per [0], ipv6 adress format introduces an ipv6 offset that needs to be extracted too. The change include the validation, decoding for further usage with policy-routing and decoding for dumping. [0] https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-09 Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-08-21bgpd: flowspec code support for ipv6Philippe Guibert
until now, the assumption was done in bgp flowspec code that the information contained was an ipv4 flowspec prefix. now that it is possible to handle ipv4 or ipv6 flowspec prefixes, that information is stored in prefix_flowspec attribute. Also, some unlocking is done in order to process ipv4 and ipv6 flowspec entries. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-03-22bgpd: More `const struct prefix` workDonald Sharp
Modify more code to use `const struct prefix` throughout bgp. This is all prep work for adding an accessor function for bgp_node to get the prefix and reduce all the places that code needs to be touched when we get that work done. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-21bgpd: Convert lots of int type functions to bool/voidDonatas Abraitis
Some were converted to bool, where true/false status is needed. Converted to void only those, where the return status was only false or true. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2018-12-28bgpd: flowspec redirect IP info is retrieved into nh trackingPhilippe Guibert
redirect IP nh of flowspec entry is retrieved so that the nexthop IP information is injected into the nexthop tracking, and is associated to the bgp_path structure. This permits validating or unvalidating the bgp_path for injection in zebra or not. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-07-24bgpd: display more than one FS entre per IPPhilippe Guibert
because the IP destination criterium may match several entries, the show command may return more than one entry. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-28bgpd: align fragment flowspec decoding with tcpflagsPhilippe Guibert
As fragment bitmask and tcpflags bitmask in flowspec protocol is encoded in the same way, it is not necessary to differentiate those two fields. Moreover, it overrides the initial fragment limit set to 1. It is now possible to handle multiple framgent values. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-04-30bgpd: add convert function from flowspec to pbr matchPhilippe Guibert
This utility function analyses flowspec nlri and converts it into readable structures. The structure is based on bgp_pbr_match structure previously defined. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-03-30bgpd: enhance show bgp ipv4 flowspec <IP>Philippe Guibert
This command gives detail about a FS entry which contains an IP that matches one of the rules of the FS entry. The output is the same output as when one does show bgp ipv4 flowspec detail Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-03-30bgpd: support for json in show bgp ipv4 flowspec commandsPhilippe Guibert
The json format is returd when requested from the two commands: - show bgp ipv4 flowspec - show bgp ipv4 flowspec detail Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-03-30bgpd: add flowspec utilities to decode, convert fs nlriPhilippe Guibert
The FS nlri is depicted so as to be able to be in readable format, either by human, or by some other ( remote daemon ?). This work is a derived work from [0]. Initially done for validation only, this work is extended. The FS NLRI is able to decode addresses, numbers ( protocols, ports, tcp values) combined ( or not) with operators. This makes possible to have a NLRI entry for a set of ports, and/or for an other set of value of port. This implementation mainly brings the API visible. The API should be consistent across the various usages. [0] https://github.com/chinatelecom-sdn-group/quagga_flowspec/ Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: jaydom <chinatelecom-sdn-group@github.com>