summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp
AgeCommit message (Collapse)Author
2017-02-14Adding support for port number 0 and above instead of only above 0Emil Palm
2017-02-03cli: Communication on Administrative Shutdown NOTIFICATIONIWASE Yusuke
This patch enable to send an arbitrary message on the Cease NOTIFICATION message with "Administrative Shutdown" and "Administrative Reset" subcodes with "--reason" option. Usage: $ gobgp neighbor <neighbor address> shutdown --reason "some messages" $ gobgp neighbor <neighbor address> reset --reason "some messages" Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-29Fix End of RIB handlingEiichiro Watanabe
- All of EoR except IPv4 unicast have MP_UNREACH only. (RFC4724) - length of the MP_UNREACH attr. should be 3bytes. - length of the value should be 0bytes. - Should send EoR marker in initial exchange of BMP Route Monitoring. (RFC7854)
2017-01-16packet/bgp/bgp_test: UT for PathAttributeMpReachNLRIIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp/bgp_test: UT for IPv6 MpReachNLRI with IPv4 peeringIWASE Yusuke
This patch adds a test case for PathAttributeMpReachNLRI with IPv6 prefix and IPv4 peering (IPv4 nexthop address). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Confirm IPv4/v6 conversion when AFI_IP6IWASE Yusuke
Currently, GoBGP will miss-convert IPv4 nexthop address to IPv6 address when advertising AFI_IP6 routes with IPv4 peering. For example, if the local address of GoBGP is "172.20.0.1", the advertised nexthop will be miss-converted into "AC14:1::". In this case, the nexthop address should be "::ffff:172.20.0.1". This patch fixes this problem. According to this change, this patch also fixes "nexthoplen" calculation to parse and serialize NextHop field, otherwise it will cause "mpreach nexthop length is incorrect" at GoBGP or "Invalid NextHop length" at BGP peers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Remove redundant type declaration "AsPathParamFormat"IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Remove redundant blank argument in rangeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Avoid colliding with module "net"IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Fix typosIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-16packet/bgp: Fix unused return parameter "err"IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2016-11-29Fix Open Message optional parameter length == 1 GoBGP crashes issues.kishiguro
2016-11-17add go vet testWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-04support neighbor belongs to VRFWataru Ishida
$ gobgp vrf add red rd 100:100 rt both 100:100 $ gobgp neighbor add 10.0.0.1 as 2 vrf red $ gobgp vrf red neighbor Peer AS Up/Down State |#Advertised Received Accepted 10.0.0.1 2 never Active | 0 0 0 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-27bgp: remove duplicate large communitiesWataru Ishida
closes #1143 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-26New Early IANA AllocationPier Carlo Chiodi
2016-10-09*: Notification support for BGP GRWataru Ishida
implement draft-ietf-idr-bgp-gr-notification-07 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-09packet/bgp: BGPCapabilityCode.String() pretty stringingWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-09packet/bgp: add long-lived graceful restart capabilityWataru Ishida
2016-10-07Add BLACKHOLE community support (RFC7999)Shu Sugimoto
2016-10-04packet/bgp: fix handling of IPv4 mapped IPv6 prefixesWataru Ishida
closes #1117 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-02Update LARGE_COMMUNITY path attribute codepointJob Snijders
IANA has assigned value 30 (LARGE_COMMUNITY Attribute) in the "BGP Path Attributes" sub-registry under the "Border Gateway Protocol (BGP) Parameters" registry. http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-2
2016-10-02packet/bgp: fix bug of CompareFlowSpecNLRI()Wataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-15bgp/cli: support evpn route type 5 (ip prefix advertisement)Wataru Ishida
see draft-ietf-bess-evpn-prefix-advertisement-03 $ gobgp g ri -a evpn add prefix 10.0.0.0/24 etag 20 rd 100:100 rt 100:100 gw 10.10.10.10 label 100 $ gobgp g ri -a evpn add prefix 200::/64 etag 20 rd 100:100 rt 100:100 gw 200::1 label 10000 close #1082 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-15bgp/cli: support flowspec ip-proto/ether-type range matchWataru Ishida
$ gobgp g ri -a ipv4-flowspec add match protocol '>tcp' then accept $ gobgp g ri -a ipv4-flowspec add match protocol '>40&<50' then accept $ gobgp g ri -a l2vpn-flowspec add rd 100:100 match ether-type '>ipv4' then accept close #1084 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-14bgp/cli: Support Large CommunityWataru Ishida
see https://tools.ietf.org/html/draft-heitz-idr-large-community-04 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-14bgp: support latest Opaque Signaling draftWataru Ishida
see https://tools.ietf.org/html/draft-lapukhov-bgp-opaque-signaling-02 $ gobgp global rib -a opaque add key hello value world $ gobgp global rib -a opaque del key hello Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-08-16cli: support setting flowspec "procotol" in octetISHIDA Wataru
$ gobgp global rib -a ipv4-flowspec add match protocol 100 then discard close #1052 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-08-02packet: Change graceful restart tuple (afi/safi/flags) parsing to use ↵Tim Evens
capability length instead of remaining parameter length. Fixes #1037
2016-07-30packet/bgp: treat 0x000000 as a withdraw labelISHIDA Wataru
though RFC3107 says the label field should be set to 0x800000 in the withdrawn routes, some platform uses 0x000000 for that purpose. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-30cli: support adding flowspec vpn routesISHIDA Wataru
$ gobgp global rib add -a ipv4-l3vpn-flowspec rd 100:100 match destination 10.0.0.0/24 then discard Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-30bgp: fix bug of flowspec vpn parser/serializerISHIDA Wataru
close #997 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-16Fix inversion between v4 and v6 in ValidateAttributeThomas Morin
This fixes a trivial inversion of v4/v6 calls in ValidateAttribute. Bug-Url: #991
2016-06-26support AGGREGATOR and AS4_AGGREGATOR conversionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-27bgp: flat the VPN labelAntoine Eiche
2016-06-14bgp: add FlatUpdate to merge Flat representationsAntoine Eiche
Update a Flat representation by adding elements of the second one. If two elements use same keys, values are separated with ';'. In this case, it returns an error but the update has been realized.
2016-06-14bgp: partial TwoOctetAsSpecificExtended.Flat and OpaqueExtended.Flat ↵Antoine Eiche
implementation Only EC_SUBTYPE_ROUTE_TARGET and EC_SUBTYPE_ENCAPSULATION are implemented.
2016-06-14bgp: add dummy Flat methods to Extended CommunitiesAntoine Eiche
2016-06-14bgp: add dummy Flat method to PathAttributeAntoine Eiche
2016-06-13bgp: add tunnel type MPLS in UDPAntoine Eiche
As specified in RFC7510 / RFC Errata 4350
2016-06-13packet: export pathAttrFlagsFUJITA Tomonori
Used to check if an attribute is known or unknown. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-13packet: export PathAttributeInterface GetFlags()FUJITA Tomonori
Needs to access to Flags. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-09collector: use AddrPrefixInterface.Flat to generate PrefixAntoine Eiche
The tag NLRI is also added to the update table.
2016-06-09bgp: add Flat method on AddrPrefixInterfaceAntoine Eiche
This method returns a map[string]string which can be used to create structured outputs, specialized by implemented types.
2016-05-26bgp: check buf length before parsing graceful-restart capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-26bgp: return NewMessageError instead of fmt.ErrorfISHIDA Wataru
to send a notification to the peer, we must return NewMessageError, not fmt.Errorf Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-19server: return flowspec routes in rfc compliant mannerISHIDA Wataru
The order of the flowspec routes matters because they will be used as ACL rules and what rule will be applied depends on the order. RFC5575 specifies how flowspec routes should be sorted. This commit implements what it says. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet/bgp: add error handling in flowSpecIpProtoParser()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet: add MarshalJSON method for FlowSpecUnknown structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet/bgp: refactor flowspec AFI(), SAFI() methodsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>