summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_openbsd.c
AgeCommit message (Collapse)Author
2024-03-21zebra: changes for code maintainabilitysri-mohan1
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-01-04*: sys/uio.h does not need to be in zebra.hDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-04*: Remove sys/ioctl.h from zebra.hDonald Sharp
Practically no-one uses this and ioctls are pretty much wrappered. Further wrappering could make this even better. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-17zebra: reduce number of switch statements with dplane opcodesMark Stapp
Replace several switch blocks that contain every dplane opcode with simpler sets of if()s. In these cases the code only uses a couple of opcodes. Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-05zebra: Add code to get/set interface to pass up from dplaneDonald Sharp
1) Add a bunch of get/set functions and associated data structure in zebra_dplane to allow the setting and retrieval of interface netlink data up into the master pthread. 2) Add a bit of code to breakup startup into stages. This is because FRR currently has a mix of dplane and non dplane interactions and the code needs to be paused before continuing on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
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>
2023-01-31zebra: Add missing enums to switch statementsDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-02zebra: Convert to `struct zebra_nhlfe` as per our internal standardDonald Sharp
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-06-11zebra: add boolean to control pw reachability checkingMark Stapp
Add a boolean to control whether pseudowire reachability checking needs to be strict. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-14*: un-split strings across linesDavid Lamparter
Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
2020-06-01zebra: convert LSP nhlfe lists to use typesafe listsMark Stapp
Convert the embedded lists of nhlfes and snhlfes in zebra LSPs and SLSPs to use typesafe dlists. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-09*: Remove parenthesis on return for constantsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-03*: frr_elevate_privs -> frr_with_privsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-25zebra: consolidate dataplane interface name and ifindex attrsMark Stapp
Move interface name and index to shared data struct, and remove operation-specific values. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-14zebra: Move multipath_num into zrouterDonald Sharp
The multipath_num variable is a property of zebra_router, so move it there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-07zebra: use const in dplane pw nhlfe accessorsMark Stapp
Use const in the accessors for pseudowire nhlfe data; pull that through the kernel-facing apis that use that data. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-03-07zebra: rename pseudowire destination apiMark Stapp
In prep for adding nexthop info for pws, rename the accessor for the pw destination. Add a nexthop-group to the pw data in the dataplane module. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-02-25*: remove unnecessary semicolon from switchesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-01-25zebra: convert PW updates to async dataplaneMark Stapp
Add accessors for pw attributes; init pw attributes; replace 'hook' calls for pw install/uninstall with dplane apis. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-22zebra: openbsd LSP update codeMark Stapp
Finish the LSP update code for the async dataplane for the openbsd platform. Remove synch apis now that we've converted to the async code path. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-22zebra: infra for LSP updates using dplaneMark Stapp
Adding infra to zebra dplane to support LSP updates. Add kernel api for LSP updates that uses a dataplane context; add stub apis for netlink, bsd, and 'null' kernel paths. Add version of netlink mpls update code that takes a dplane context struct instead of a zebra lsp struct. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-09-19zebra: Create zebra_dplane.c and .hMark Stapp
Add first sketchy 'dplane' files. Signed-off-by: Mark Stapp <mjs@voltanet.io> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-13*: LIB_[ERR|WARN] -> EC_LIBQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13zebra: ZEBRA_[ERR|WARN] -> EC_ZEBRAQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-06zebra: fix includesQuentin Young
Add and remove error related includes as necessary. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-06zebra: flog_warn conversionQuentin Young
Convert Zebra to user error subsystem. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: use frr_elevate_privs() (1/2: coccinelle)David Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-14*: rename ferr_zlog -> flog_err_sysQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: rename zlog_fer -> flog_errQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14zebra, lib: error references for zebraQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14bgpd, lib, zebra: Convert LIB_ERR_PRIVILEGESDonald Sharp
For all the places we zlog_err about raising/lowering privileges, use zlog_ferr. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30zebra: Add `enum dp_req_result` to lsp install/deletesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30zebra: Rename SOUTHBOUND_XXX to DP_XXXDonald Sharp
The SOUTHBOUND_XXX enum was named a bit poorly. Let's use a bit better name for what we are trying to do. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-11-29zebra: Fix lsp add/del from kernel using SETFLAGDonald Sharp
Setup a interface such that the add/del of lsp's from the kernel can have a callback for success/failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16zebra: Move some LSP flag handling to common codeDonald Sharp
The LSP_FLAG_CHANGED and LSP_FLAG_INSTALLED flags should be handled in the common call function for adding/updating/removing a lsp to/from the kernel. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-22zebra: increase maximum label stack depthRenato Westphal
* Bump MPLS_MAX_LABELS from 2 to 16; * Adjust the static_nh_label structure and the mpls_label2str() function; * On OpenBSD, print an error message when trying to push more than one label at once (kernel limitation). While here, add support for MPLSv6 FTNs in OpenBSD. This is not the full package. We still can't pop multiple labels at once, or do things like swap a label and push other ones. We'll address that in the future. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-09zebra: add support to openbsd's mpw(4) for pseudowiresRenato Westphal
Thanks to rzalamena@ for writing mpw(4) :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-31build: zebra: remove *_method Makefile hacksDavid Lamparter
replace with preprocessor checks in source files. Much simpler... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-13Merge branch 'stable/3.0'David Lamparter
Dropped: redhat/README.rpm_build.md redhat/daemons redhat/frr.init redhat/frr.logrotate redhat/frr.spec.in Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-07zebra: fix uninstallation of mpls lsps in openbsdRenato Westphal
While here, fix a warning in kernel_lsp_cmd(). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-27zebra-mpls: replace legacy bzero by memsetRenato Westphal
bzero() was deprecated in POSIX.1-2001 and removed in POSIX.1-2008 in deference to memset(). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-27zebra-mpls: add support for MPLSv6 in OpenBSDRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-03-01bgpd, zebra: Allow setting ecmp from daemon cliDonald Sharp
When starting up bgp and zebra now, you can specify -e <number> or --ecmp <number> and that number will be used as the maximum ecmp that can be used. The <number specified must be >= 1 and <= MULTIPATH_NUM that Quagga is compiled with. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-11-28zebra: add missing license headers to two filesRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23zebra: check at startup if the kernel supports MPLSRenato Westphal
Replace all HAVE_MPLS #ifdef's by a run-time check if MPLS is supported by the kernel or not. This way we don't need to create multiple packages for each OS distribution. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-09-23mpls: add support to the OpenBSD kernelRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>