| Age | Commit message (Collapse) | Author | 
 | 
Replace `struct list *` with `DLIST(if_connected, ...)`.
NB: while converting this, I found multiple places using connected
prefixes assuming they were IPv4 without checking:
- vrrpd/vrrp.c: vrrp_socket()
- zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(),
  irdp_advert_off()
(these fixes are really hard to split off into separate commits as that
would require going back and reapplying the change but with the old list
handling)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
We should probably prevent any type of namespace collision
with something else.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.
In this commit rename the thread.[ch] files to event.[ch].
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Done with a combination of regex'ing and banging my head against a wall.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
these changes are for improving the code maintainability
Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
 | 
 | 
Since f60a1188 we store a pointer to the VRF in the interface structure.
There's no need anymore to store a separate vrf_id field.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
 | 
 | 
There are a few places in the code where we use PREFIX_COPY(_IPV4/IPV6)
macro to copy a prefix. Let's always use prefix_copy function for this.
This should fix CID 1482142 and 1504610.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
 | 
 | 
Add these file and introduce some new fundamental types
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie Savage <diivious@hotmail.com>
 | 
 | 
Rename struct eigrp_nexthop_entry to struct eigrp_route_descriptor
Rename struct eigrp_prefix_entry to struct eigrp_prefix_descriptor
Fix all the associated function names as well.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donnie SAvage <diivious@hotmail.com>
 | 
 | 
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
 | 
 | 
Search and destroy the inet_ntoa usage in eigrp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
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>
 | 
 | 
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
 | 
 | 
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
 | 
 | 
Have the prefix_free code take a double pointer to free the data.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
If the vrf does not exist, politely do not create
the socket.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
We assign a value to the eigrp data structure and then
immediately overwrite it in the for loop.  No need to
do a eigrp_lookup.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
When iterating over all eigrp instances, narrow to the correct
vrf that we are working on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Setup EIGRP to use a socket per vrf for communication
amongst it's peers.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
The less code running under elevated privileges the better.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
The prefix data structure was being freed yet still needed in the
future and it's a fundamental part of the eigrp_interface data
structure let's keep it there instead of having it be deleted
and then not.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
If we are inside the for loop then eigrp *must* be valid.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
In eigrp we were using a uint32_t to hold the `struct in_addr` data
for the router id values.  This caused us to do unnecessary conversions
pre and post for in/out.  Let's just use the standard `struct in_addr`
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
The eigrp interface structure was storing a pointer to the
connected interface structure and on shutdown of an interface
this would cause zebra to call eigrp back with a shutdown of
that interface, as part of that operation the connected interface
structure is being deleted, but eigrp was keeping a pointer to
the connected structure.  At the same time we were keeping the address
of the connected structure and this is all we need, so keep a copy
of that data and use that instead.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Convert, where appropriate, to using LIB_ERR_XXX for zlog_ferr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: F. Aragon <paco@voltanet.io>
 | 
 | 
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>
 | 
 | 
Signed-off-by: Lou Berger <lberger@labn.net>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
This improves code readability and also future-proofs our codebase
against new changes in the data structure used to store interfaces.
The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but
for now only babeld is using it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
This is an important optimization for users running FRR on systems with
a large number of interfaces (e.g. thousands of tunnels). Red-black
trees scale much better than sorted linked-lists and also store the
elements in an ordered way (contrary to hash tables).
This is a big patch but the interesting bits are all in lib/if.[ch].
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
We need one struct eigrp_interface per ifp structure
not a ifp->info structure with a ei per connected.
Some minor code cleanup as well with macros and
their weird usage.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
The struct 'eigrp_neighbor_entry' really represents
a nexthop for a prefix.  Rename the structure to
better represent what we are representing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
There are a number of spelling errors in eigrp. But this one is
particular annoying because it is a variable name, not in a comment.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
 | 
 | 
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
If the router-id is passed up to eigrp before we have
started the instance, allow it to set it up properly
as we start the instance.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Issue reported that a configuration commonly used on other routing implementations
fails in frr.  If under ospf, "network 172.16.1.1/32 area 0" or under eigrp, "network
172.16.1.1/32" is entered, the appropriate interfaces are not included in the routing
protocol.  This was because the code was calling prefix_match, which did not match if
the network statement had a longer mask than the interface being matched.  This fix
takes away that restriction by creating a "lib/prefix_match_network_statement" function
which doesn't care about the mask of the interface.  Manual testing shows both ospf and
eigrp now can be defined with more specific network statements.
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
 | 
 | 
May result in alignment errors on certain platforms
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
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>
 | 
 | 
* Correct the metric calculation as well as the default metrics;
* Do not show invalid routes in the "show ip eigrp topology".
* Add support to VRFs;
* When downloading a neighbor remove the related routes;
* Fix bugs in the parser of packages they were creating
Invalid default routes;
* Add and remove routes in the zebra;
* Add command "on router eigrp AS";
* Make "delay" and "bandwitch" commands work as well as
Display them in running config;
* Add "no" version of several commands;
* Fix a serious momory leaks;
* Fix segfault when there is no 'successor' route to a
Given prefix;
* Other minor corrections;
Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Apparently u_int64_t is not available (or we don't pull
the right headers in for solaris based systems ).
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 |