summaryrefslogtreecommitdiffhomepage
path: root/pkg/packet/bgp
AgeCommit message (Collapse)Author
2021-10-19support Wireguard tunnel encapsulationMikael Magnusson
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2021-10-18bgp: Validate router-id against 0.0.0.0 and ASN-wideDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-25pkg/packet/bgp: avoid copying PrefixDefault lock in Test_CompareFlowSpecNLRIMatt Layher
Signed-off-by: Matt Layher <mlayher@fastly.com>
2021-08-24pkg/packet/bgp: add mutex to PrefixDefault to avoid data raceMatt Layher
Signed-off-by: Matt Layher <mlayher@fastly.com>
2021-08-12Fix extended-nexthop & add-path capability parsing.Konrad Zemek
The capabilities' DecodeFromBytes() was eating as much data as given, while these functions would normally be called with all the data remaining to parse - e.g. including following capabilities. Fixes osrg/gobgp#2399
2021-07-25Use `BGP_HEADER_LENGTH` instead of `19` in the codeKirill Smorodinnikov
2021-06-30added check on data length for SRv6EndpointBehaviorStructure and ↵zvfvrv
SegmentTypeB, others minor fix
2021-06-30add support of the optional "SRv6 Endpoint Behavior and SID Structure" in ↵zvfvrv
segment type b
2021-06-30fix marshal and unmarshalzvfvrv
2021-06-30wip SegmentTypeB without SRv6 Endpoint Behavior and Structurezvfvrv
2021-06-13Add support for encapsulation tunnel type in the extended community support ↵Guangtong Cao
in gobgp policy.
2021-06-07fix: fix check according to golang s1025Imcom Jin
https://staticcheck.io/docs/checks#S1025
2021-05-24Add FQDN capabilityDonatas Abraitis
It's not kinda RFC (draft), but it's implemented and used in various other open-source software like FRRouting, Bird, ExaBGP. It's very handy when dealing with lots of peers. Exampe between GoBGP and FRRouting: ``` % ./cmd/gobgp/gobgp neighbor 192.168.10.123 | grep -A4 fqdn: fqdn: advertised and received Local: name: donatas-pc, domain: Remote: name: exit1-debian-9, domain: ``` ``` % vtysh -c 'show bgp neighbors 192.168.10.17 json' | jq .'"192.168.10.17".neighborCapabilities.hostName' { "advHostName": "exit1-debian-9", "advDomainName": "n/a", "rcvHostName": "donatas-pc", "rcvDomainName": "n/a" } ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-19Add GENEVE encapsulation supportRavi Aysola
2021-03-14add support for tunnel egress endpoint sub-TLVMikael Magnusson
As specified in draft-ietf-idr-tunnel-encaps-22. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2021-03-01Fix LsTLVIgpRouterID.DecodeFromBytesKirill Smorodinnikov
According to https://tools.ietf.org/html/rfc7752#section-3.2.1.4, IGPRouterID could be 4-octet for OSPFv2 or OSPFv3 non-pseudonode.
2021-02-27Extend LsLinkDescriptor.StringKirill Smorodinnikov
Cover additional cases when only one part of the link is presented.
2021-01-27go fmtedSergey Elantsev
2021-01-23fixed panics on parsing malicious bgp packetsSergey Elantsev
2021-01-23support UDP destination port sub-TLVMikael Magnusson
As specified in draft-ietf-idr-tunnel-encaps. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2021-01-20packet/bgp: Fix TunnelEncapSubTLV.DecodeFromBytesMikael Magnusson
Return data of the correct length from TunnelEncapSubTLV.DecodeFromBytes. This fixes a problem with TunnelEncapSubTLVUnknown which caused it to contain more bytes in its Value unless it was the last SubTLV. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2020-12-20fixed mistypeSergey Elantsev
2020-12-20fixed possible crashes on parsing of bgp messagesSergey Elantsev
2020-12-14change commentsSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-12-09interop fixSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-11-30Unit tests and dependenciesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-11-30Code changesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-11-25code changesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-10-21packet: handle malformed prefix lenFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2020-07-13implement LsAddrPrefix marshal json functionJieJhih Jhang
2020-06-24Add //go:generate stringer directives for public enum types.Dmitri Nikulin
All such directives can be invoked by running $ go generate Stringer itself can be obtained by running $ go get golang.org/x/tools/cmd/stringer See https://github.com/osrg/gobgp/issues/2265
2020-06-24Regenerate stringer code for public enum types.Dmitri Nikulin
This adds support for several values which were added to enums without corresponding changes to the stringer generated code. New versions of stringer, including the one used for this change, add compile-time checks for whether any existing enum values have changed. Adding new values does not violate this check. Resolves https://github.com/osrg/gobgp/issues/2265
2020-05-13extend attributes proto for Prefix SID supportSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-07address more static check failuresSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-07Addressing review commentsSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-07remove debug messagesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-07Finish methods and restructure filesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-06code Decode and Serialize for Prefix SID types and add unit testsSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-06add unit test to help with developmentSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-05add object definitionsSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-05additional changesSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-05coding the featureSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-05-04adding prefix_sid_attrSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-04-24Add BGP-LS SRLG supportTom Shine
2020-03-15replaced fmt.Sprintf with strconv.Itoa for Protocol.String()Sergey Elantsev
2020-03-15optimized allocations in packet/bgp validationsSergey Elantsev
2020-03-14optimized allocations in packet/bgpSergey Elantsev
2020-03-09optimized EVPNMacIPAdvertisementRoute, SerializeExtendedCommunities and ↵Sergey Elantsev
PathAttributeIP6ExtendedCommunities allocations.
2020-03-02bgp: silence statickcheck errorsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-07-26pkg/packet/bgp: fix PathAttributeAs4Path to accept empty AS_PATHFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>