The FRRouting Protocol Suite
Find a file
Donald Sharp 1d7c7ace3c bgpd: Add lua match command
Please note this is a Proof of Concept and not actually something
that is ready to commit at this point.  The file tools/lua.scr
contains some documentation on how we expect it to work currently.
Additionally not all bgp values have been hooked up into the
ability to lua script yet.

There is still significant work to be done here:

1) Add the ability to pass in more data and to adjust the return values
as appropriate.

To set it up:

1) copy tools/lua.scr into /etc/frr (or whereever the config
directory is )

2) Create a route-map match command:
!
router bgp 55
 neighbor 10.50.11.116 remote-as external
 !
 address-family ipv4 unicast
  neighbor 10.50.11.116 route-map TEST in
 exit-address-family
!
route-map TEST permit 10
 match command mooey
!

3) In the lua.scr file make sure that you have a function
named 'mooey' ( as the above example does ):

function mooey ()
   zlog_debug(string.format("Family: %d: %s %d ifindex: %d aspath: %s localpref: %d",
                            prefix.family, prefix.route,
			    nexthop.metric, nexthop.ifindex, nexthop.aspath, nexthop.localpref))

   nexthop.metric =  33
   nexthop.localpref = 13
   return 3
end

This example script modifies the metric and localpref currently.  I've also provided
a zlog_debug function in lua to allow some simple debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-26 21:21:23 -04:00
.github Merge pull request #2909 from netravnen/feature/git-pl-template 2018-09-04 11:56:43 -04:00
alpine alpine: add unit tests to build 2018-06-14 10:27:24 -07:00
babeld *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
bfdd bfdd zebra: dead code (Coverity 1472624 1473199) 2018-09-26 17:50:33 +02:00
bgpd bgpd: Add lua match command 2018-09-26 21:21:23 -04:00
debianpkg frr: improve README 2018-09-10 15:30:22 +00:00
doc Merge pull request #3020 from donaldsharp/global_5549 2018-09-24 09:55:50 -04:00
docker unit tests: support code coverage instrumentation and reports 2018-07-04 11:06:11 -07:00
eigrpd Merge pull request #3072 from donaldsharp/fix_eigrp_crash_on_int_shut 2018-09-24 10:48:23 -04:00
fpm *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
gdb gdb: Add a directory of files with gdb macros 2016-05-26 15:33:30 +00:00
include include: add netlink.h to our build system 2018-06-21 08:07:30 -04:00
isisd isisd: out of bounds access (Coverity 1473286) 2018-09-25 18:00:02 +02:00
ldpd bgpd, doc, ldpd, lib, tests, zebra: LM fixes 2018-09-18 17:39:16 +02:00
lib lua: Initial Lua import 2018-09-26 21:21:23 -04:00
m4 *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
nhrpd *: style for EC replacements 2018-09-13 19:38:57 +00:00
ospf6d Merge pull request #3023 from qlyoung/ultimate-warning-reference-cards-rename 2018-09-14 17:35:58 +02:00
ospfclient build: fix not building docs w/o sphinx 2018-09-09 20:01:08 +02:00
ospfd ospfd: dead code (Coverity 1472227) 2018-09-26 17:25:42 +02:00
pbrd bgpd lib ospf6d pbrd tests zebra: shadowing fixes 2018-09-13 17:37:08 +02:00
pimd pimd: Fix several address sanitizer issues 2018-09-24 15:12:36 -04:00
pkgsrc *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
ports *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
python *: fix some solaris warnings 2018-09-08 21:30:42 +02:00
qpb *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
redhat frr: improve README 2018-09-10 15:30:22 +00:00
ripd *: style for EC replacements 2018-09-13 19:38:57 +00:00
ripngd *: style for EC replacements 2018-09-13 19:38:57 +00:00
sharpd build: fix not building docs w/o sphinx 2018-09-09 20:01:08 +02:00
snapcraft *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
solaris *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
staticd staticd: Allow table_id to be a distinguisher for installation 2018-09-14 16:30:17 -04:00
tests Merge pull request #3010 from opensourcerouting/no-frr-thread-id 2018-09-22 15:02:09 -04:00
tools bgpd: Add lua match command 2018-09-26 21:21:23 -04:00
vtysh lib vtysh zebra: variable shadowing fixes 2018-09-12 12:27:38 +02:00
watchfrr watchfrr: Modify some stderr messages to zlog_warn 2018-09-25 19:11:25 +02:00
zebra bfdd zebra: dead code (Coverity 1472624 1473199) 2018-09-26 17:50:33 +02:00
.clang-format lib: import new JSON iteration macro 2018-08-08 18:01:20 -03:00
.dir-locals.el .dir-locals.el: show trailing whitespace 2017-11-07 12:05:09 -05:00
.dockerignore alpine packaging: build packages and base image directly from git 2018-04-04 10:05:44 -07:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
bootstrap.sh autoreconf -i 2007-02-06 19:28:28 +00:00
buildtest.sh config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
configure.ac lua: Initial Lua import 2018-09-26 21:21:23 -04:00
COPYING *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
COPYING-LGPLv2.1 build: remove LGPL v2.0, add LGPL v2.1 2016-11-15 17:19:38 +09:00
defaults.h *: reindent 2017-07-17 14:04:07 +02:00
Makefile.am frr: add README.md to EXTRA_DIST 2018-09-10 15:30:22 +00:00
README.md frr: improve README 2018-09-10 15:30:22 +00:00
stamp-h.in Initial revision 2002-12-13 20:15:29 +00:00

FRRouting

FRR is free software that implements and manages various IPv4 and IPv6 routing protocols. It runs on nearly all distributions of Linux and BSD as well as Solaris and supports all modern CPU architectures.

FRR currently supports the following protocols:

  • BGP
  • OSPFv2
  • OSPFv3
  • RIPv1
  • RIPv2
  • RIPng
  • IS-IS
  • PIM-SM/MSDP
  • LDP
  • BFD
  • Babel
  • EIGRP (alpha)
  • NHRP (alpha)

Installation & Use

Packages are available for various distributions on our releases page.

Snaps are also available here.

Instructions on building and installing from source for supported platforms may be found here.

Once installed, please refer to the user guide for instructions on use.

Community

The FRRouting email list server is located here and offers the following public lists:

Topic List
Development dev@lists.frrouting.org
Users & Operators frog@lists.frrouting.org
Announcements announce@lists.frrouting.org

For chat, we currently use Slack. Please email the mailing list to request an invite as we do not issue automatic invites.

Contributing

FRR maintains developer's documentation which contains the project workflow and expectations for contributors. Some technical documentation on project internals is also available.

We welcome and appreciate all contributions, no matter how small!

Security

To report security issues, please use our security mailing list:

security [at] lists.frrouting.org