summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-05lib: fix access list mac removal commandRafael Zalamena
Copy & paste mistake: MAC commands need `X:X:X:X:X:X` and not `X:X::X:X/M` types. Also, MAC access-list don't use `exact-match`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: add 'no ... remark LINE' commandsRafael Zalamena
Implement the commands `no ... remark LINE` for cisco and zebra style access lists to match `ipX prefix-list description LINE` command set. It useful when you just want to go through the command history and prepend a `no` to a `remark` or `description` command. Example: ``` access-list foo remark just another acl ! ! ... ! ! Suddenly we decide we no longer think that remark is useful, ! lets press up key to find that line in history and append `no`: no access-list foo remark just another acl ``` Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: bump filter CLI XPath buffers sizeRafael Zalamena
Bump the size of the buffers so the new compilers don't complain about possible truncation: ``` lib/filter_cli.c: In function ‘ipv6_prefix_list_magic.isra.0’: lib/filter_cli.c:1336:5: error: ‘%lld’ directive output may be truncated writing between 1 and 20 bytes into a region of size between 16 and 527 [-Werror=format-truncation=] 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); | ^~~~~~~~~~~~~~~~~~~~~~ lib/filter_cli.c:1336:25: note: format string is defined here 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); lib/filter_cli.c:1336:5: note: directive argument in the range [-9223372036854775803, 9223372036854775807] 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); | ^~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix prefix list mask length checkRafael Zalamena
Implement the restriction from the old CLI to northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix prefix list description commandRafael Zalamena
Changes: - Use `description` on CLI but `remark` on YANG like access-list (also because `description` is a reserved word). - Rename YANG model field and northbound code. - Fix wrong sequence type get. - Fix wrong action XPath in action callback. - Fix wrong concat in (ipv6|mac) access-list. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: migrate filter configuration writerRafael Zalamena
Use northbound to write the configuration from now on. While here, fix how `exact-match` configuration is being created. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix filter northbound crash when batchingRafael Zalamena
Look up next sequence number by checking XPath instead of trying to access unallocated context data structures. This only applies for creation, on destroy the data structures must be there. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: introduce the yang_dnode_iterate helperRenato Westphal
Implement helper function that iterates over data nodes that satisfy XPath query. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-06-05lib: fix rebase conflictsRafael Zalamena
Changes: - Remove unused variable. - Make prototypes static like the declaration. - Fix new compilers complaint about uninitialized values. - Fix new compilers complaint about small buffer for `snprintf` concatenation. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix northbound conflictsRafael Zalamena
Changes: - Use the northbound callback prototypes. - Re-implement the removed function: `ipv4_network_addr` (more information: https://github.com/FRRouting/frr/pull/5535 ) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: migrate prefix-list to use northboundRafael Zalamena
Implement all northbound CLI commands for prefix lists. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix filter northbound double removalRafael Zalamena
Don't auto remove filter main access list data structure, it has to be done manually (or via northbound). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: migrate filter CLI to use northboundRafael Zalamena
Migrate all filter commands to use the newly implemented northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05*: add filter northbound supportRafael Zalamena
Allow all daemons to work with filter northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: implement filter northboundRafael Zalamena
Implement all access-list and prefix-list northbound callbacks. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: export prefix-lists functionsRafael Zalamena
Export all functions that are going to be used by the northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: export access-lists shared functionsRafael Zalamena
These functions are going to be used by the new filter northbound implementation. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05yang: update filter yang modelRafael Zalamena
Important changes: * Limit the access-list name length according to header definition; * Add another list (sequence) inside instances to avoid repeated fields; Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-04Merge pull request #6513 from donaldsharp/allow_filter_deletionDonatas Abraitis
lib: Allow deletion of some access-lists
2020-06-03lib: Allow deletion of some access-listsDonald Sharp
Recent rework of access lists to allow sequence numbers accidently introduced the inability to delete some access lists. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-03Merge pull request #6508 from RichardWu-Hebut/masterDonald Sharp
zebra: Fix zebra crashed in building FPM netlink message when bgp sen…
2020-06-03zebra: Fix zebra crashed in building FPM netlink message when bgp sends ↵Richard Wu
aggregation routes to zebra. Issue: When BGP sends aggregation routes to zebra, the next hop is black hole. Then Zebra will try to build the netlink FPM message, but there is no next hop as it is a black hole route. Then the netlink_route_info_fill function returns 0. In the result, zebra will crashed in "assert(data_len)" of zfpm_build_route_updates. This issue also happen when I create a static black hole route via staticd. Fix: As the netlink message of the blackhole route is legal, it should return success. Signed-off-by: Richard Wu <wutong23@baidu.com>
2020-06-02Merge pull request #6506 from volta-networks/ldp_pwstatus_cleanupRenato Westphal
ldpd: remove unused 'pwstatus' field from message zapi_pw_status
2020-06-02Merge pull request #6236 from mjstapp/zebra_opaque_moduleRenato Westphal
lib,zebra: New zebra opaque zapi module
2020-06-02ldpd: remove unused 'pwstatus' field from message zapi_pw_status.Karen Schoener
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-06-02Merge pull request #6503 from donaldsharp/bgp_routemap_crashRafael Zalamena
bgpd: Fix crash in `match ip next-hop address` command
2020-06-02bgpd: Fix crash in `match ip next-hop address` commandDonald Sharp
When issuing the command `match ip next-hop address` bgp would crash. This is because the no form of the command was making the address optional and we would try to read data we should not be. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-02Merge pull request #6456 from ton31337/fix/set_ipv6_ll_if_zeroSri Mohana Singamsetty
bgpd: Use IPv6 LL address as nexthop if global was set to ::/LL
2020-06-02Merge pull request #6500 from chiragshah6/evpn_dev2Sri Mohana Singamsetty
bgpd: move advertise-vni-all above vni config
2020-06-02doc: update zebra/zapi docMark Stapp
Add the new OPAQUE zapi messages; a couple of edits. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: handle OPAQUE registrations and forward messagesMark Stapp
Add initial support to maintain client daemon registrations for OPAQUE messages. Use the registered zapi client info to forward copies of OPAQUE messages sent to zebra. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02sharpd: add handler for OPAQUE messagesMark Stapp
Add a simple handler to receive OPAQUE zapi messages for testing. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: add zserv_send_batch apiMark Stapp
Add a zserv api to send a batch (a fifo) of messages to a zapi client. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02sharpd: send opaque message registrationsMark Stapp
For testing, add cli to sharpd to send opaque message registration and un-registration messages. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: don't print stale text if no GR infoMark Stapp
Don't print GR show output header if no GR info is present for a zapi client. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02sharpd: send new OPAQUE messagesMark Stapp
Add a simple cli to exercise the new OPAQUE messages. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: call zapi message handler with a batchMark Stapp
The zapi code processes a batch of incoming messages, using a fifo. Hand the entire batch into the main zebra handling code, and let it loop through the individual messages. Divert the special OPAQUE messages from the normal processing flow, and offer them to the new zebra_opaque module instead. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: add lock and busy counter for zclientsMark Stapp
Add a mutex used to manage the list of zclients. Add a busy counter to the zapi client session, so that we can use a client session from another pthread. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02zebra: add zebra opaque moduleMark Stapp
Add the zebra_opaque module, designed to offload some opaque zapi message processing to a new, dedicated pthread. Add to the build; also re-sort the lists of zebra files in subdir.am. Start, stop, and clean-up the opaque module, integrate with zebra start and shutdown. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02lib: add OPAQUE zapi messageMark Stapp
Add a zapi message type designed to carry opaque data. Add 'send' api, and prototype for client handler function. Also add registration/unreg messages, so that clients can 'subscribe' to receive these messages as they're passing through zebra. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-02lib: add stream_fifo_init, more constMark Stapp
Add utilities that init and deinit a stream_fifo - this lets us use an on-stack fifo in some places, avoiding malloc'ing. Also add const to some apis (no functional changes there). Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01bgpd: move advertise-vni-all above vni configChirag Shah
Move config 'advertise-vni-all' above all evpn configuration as vni specific confi commands have check for advertise-vni-all enabled first. Ticket: CM-29312 Reviewed By: Testing Done: router bgp 5650 ... advertise-all-vni vni 1002 route-target import 55500:10002 route-target export 55500:10002 exit-vni ... Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-06-02Merge pull request #6497 from qlyoung/fix-centos7-docker-buildDonatas Abraitis
docker: fix centos7 install
2020-06-01Merge pull request #6480 from volta-networks/feat_pwstatusRenato Westphal
ldpd: Relay data plane pseudowire status in LDP notification
2020-06-01Merge pull request #6266 from mjstapp/backup_nhgsRenato Westphal
zebra: backup nexthops/nhlfes for LSPs
2020-06-01docker: fix centos7 installQuentin Young
We require python3-sphinx for RPM builds, but it wasn't being installed. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-01zebra: backup LSP zapi processingMark Stapp
Move some processing of zapi label messages so they can be handled more efficiently. Handle zapi delete and replace messages. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01zebra: add check_free apiMark Stapp
Add a 'check' api to hold the code that determines whether an LSP can be freed or not. Replace calls to the free api with check calls. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01zebra: rename 'nhg_copy' to 'nhe_copy'Mark Stapp
It copies nhes... Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01zebra: show backup nhlfes with dynamic LSPsMark Stapp
Include backup nhlfe info with the show output of dynamic LSPs (no json yet). Signed-off-by: Mark Stapp <mjs@voltanet.io>