forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build FRR 8.3.1 RPMs (for Route Views) #1
Labels
collector
Issue related to Route Views collector(s).
enhancement
New feature or request
help wanted
Extra attention is needed
triage
Needs intake-processing & prioritization.
Comments
ryeleo
added
collector
Issue related to Route Views collector(s).
enhancement
New feature or request
help wanted
Extra attention is needed
labels
Oct 3, 2022
ryeleo
pushed a commit
that referenced
this issue
Nov 10, 2022
Fixing the crash: > #0 0x0000560aa80f8e30 in lspdb_const_find (h=<error reading variable: Cannot access memory at address 0x7fff5e95efe8>, item=<error reading variable: Cannot access memory at address 0x7fff5e95efe0>) at ./isisd/isis_lsp.h:64 > #1 0x0000560aa80f8e9d in lspdb_find (h=0x560aaa1ed3b8, item=0x7fff5e95f050) at ./isisd/isis_lsp.h:64 > #2 0x0000560aa80f92f9 in lsp_search (head=0x560aaa1ed3b8, id=0x7fff5e95f200 "") at isisd/isis_lsp.c:100 > FRRouting#3 0x0000560aa8113d69 in spf_adj_list_parse_tlv (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, id=0x560aad331a78 "", desig_is_id=0x0, pseudo_metric=0, metric=3, oldmetric=false, subtlvs=0x0) at isisd/isis_spf.c:1330 > FRRouting#4 0x0000560aa811419d in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1429 > FRRouting#5 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > FRRouting#6 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > (...) > #65507 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65508 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65509 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65510 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442 > #65511 0x0000560aa8114313 in isis_spf_build_adj_list (spftree=0x560aaa1f09d0, lsp=0x560aaa1f4e50) at isisd/isis_spf.c:1455 > #65512 0x0000560aa8114f09 in isis_run_spf (spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1775 > #65513 0x0000560aa8115057 in isis_run_spf_with_protection (area=0x560aaa1ed3b0, spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1801 > #65514 0x0000560aa8115311 in isis_run_spf_cb (thread=0x7fff5f15e5a0) at isisd/isis_spf.c:1859 > #65515 0x00007f90bac66dcc in thread_call (thread=0x7fff5f15e5a0) at lib/thread.c:2002 > #65516 0x00007f90bac013ee in frr_run (master=0x560aa9f5cb40) at lib/libfrr.c:1196 > #65517 0x0000560aa80e7da2 in main (argc=2, argv=0x7fff5f15e7b8, envp=0x7fff5f15e7d0) at isisd/isis_main.c:273 The fix is similar to the crash fix included in d9884a7 ("isisd: Prepare IS-IS for Link State support"). The fix was: > diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c > index 94353a5bc8..92d329f035 100644 > --- a/isisd/isis_lsp.c > +++ b/isisd/isis_lsp.c > @@ -2166,7 +2178,7 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid, > if (lsp->hdr.seqno == 0 || lsp->hdr.rem_lifetime == 0) > return LSP_ITER_CONTINUE; > > - /* Parse main LSP. */ > + /* Parse LSP */ > if (lsp->tlvs) { > if (!fabricd && !pseudo_lsp && family == AF_INET > && mtid == ISIS_MT_IPV4_UNICAST) { > @@ -2236,13 +2248,17 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid, > } > } > > - /* Parse LSP fragments. */ > - for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) { > - if (!frag->tlvs) > - continue; > + /* Parse LSP fragments if it is not a fragment itself */ > + if (!LSP_FRAGMENT(lsp->hdr.lsp_id)) > + for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) { > + if (!frag->tlvs) > + continue; > > - isis_lsp_iterate_ip_reach(frag, family, mtid, cb, arg); > - } > + if (isis_lsp_iterate_ip_reach(frag, family, mtid, cb, > + arg) > + == LSP_ITER_STOP) > + return LSP_ITER_STOP; > + } > > return LSP_ITER_CONTINUE; > } Fixes: 7b36d36 ("isisd: make the SPF code more modular") Fixes: 5e56a50 ("isisd: fix infinite loop when parsing LSPs") Signed-off-by: Louis Scalbert <[email protected]> (cherry picked from commit 8c8a5a0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
collector
Issue related to Route Views collector(s).
enhancement
New feature or request
help wanted
Extra attention is needed
triage
Needs intake-processing & prioritization.
Acceptance Criteria
infra
repo, with help of @routeviews/maintainersBuilding FRR Instructions
For RouteViews, we use a custom version of FRR.
Mainly, we customize FRR to enable telnet sessions to access the FRR shell.
This document walks through the process to modify FRR source code and build scripts then run the build.
Additionally, this document discusses how to deploy and test the FRR build once it is ready to go!
Downloading and Patching FRR
This document describes the building and packaging process for frr in the context of routeviews.
These instructions are based on FRR Packaging for RedHat instructions and FRR Packing for Debian instructions.
Download FRR Source Code
First, you'll need to clone git repo and choose the branch/version that you want to build.
In this example, we are building the latest 'stable/8.1' version of FRR source code.
It is a good idea to create a routeviews-specific local branch (off of the stable branch).
Apply VTY Patch
We patch the VTY code with some enhanced logging to make our lives easier.
In file
/lib/libfrr.c
find the methodstatic void frr_vty_serv(void)
.Within that method, encase the line
vty_serv_sock(di->vty_addr, di->vty_port, di->vty_path);
with logging, like the following:Create Build Flags for
--enable-privileged-vty
In file
/configure.ac
Add the following:
And:
In the corresponding sections with similar commands.
CentOS 7 Packaging Instructions
Required Packages
First, you must install required packages:
In addition, a special version
libyang
andlibyang-devel
are required to build FRR.Today, this version of libyang is actually only available via an FRR RPM repository.
The instructions to add this repo to your CentOS 7 build server are copied below:
With the FRR RPM repo available, now you can simply install libyang2 using yum:
Create RPM Package
Creating the RPM package requires many steps; from bootstrapping to
Bootstrap
Run the following commands in the root directory of the repo:
Establish
rpmbuild
directoryCreate the
rpmbuild
directory - from the root directory of the frr repo:Choose FRR Features
rpmbuild/SPECS/frr.spec
for editing.# with-feature options
section except for the flags indicated in the table below:with_bfdd
with_eigrpd
with_multipath
with_watchfrr
with_opsfapi
with_opsfclient
At the end of
# with-feature options
, add the following line to enable our newly added 'enable_privileged_vty' feature:In the middle of the
%configure \
section, add the following lines (also to enable our newly added 'enable_privileged_vty' feature):Build the RPM
Finally, everything is in place so that we can run
rpmbuild
!If the rpmbuild command succeeds, all of the RPM packages will be written to the
rpmbuilds/[S]RPMS/
directories.The rpmbuild output will indicate where these files have been written:
Additional required packages (at runtime)
In addition to the packages we just created, we need ensure some supporting rpms are up to date as well.
They can be found as artifacts on the (public) FRR Build Server.
At the time of writing, only the following rpms are required:
The text was updated successfully, but these errors were encountered: