Age | Commit message (Collapse) | Author |
|
* lib/sockunion.c,
* zebra/zebra_rib.c: replace ->sin.sin_addr.s_addr with sockunion2ip
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
[reworded commit message]
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
sockunion_str2su() use is prone to memory leaks. Remove it's use all over
the code.
At least these commands leaked a sockunion union:
- show ip bgp vpnv4 ... routes
- show ip bgp ... received prefix-filter
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Use of this function is prone to memory leaks.
This fixes a memory accounting bug for vty denied connections.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
A route-map with the mentioned statement causes a memory leak for every
prefix that matches.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
A route-map with a 'match peer local' statement it's shown like
'match peer (null)' on config output...
... and it's unparsable on daemon startup.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Metrics are unsigned values.
* bgpd/bgp_{debug,route,vty}.c,
* zebra/zebra_vty.c: replace %d with %u for metrics & distances
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
[reworded commit message]
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
|
|
* Separate out BGP socket initialisation from bgp_get, and make it an
explicit function. Allows unit tests to work again and probably also
benefits dry-run.
* bgpd.c: (bgp_get) move socket init out...
(bgp_socket_init) to here
* bgp_main.c: and call it after dry-run.
* bgpd.h: (bgp_socket_init) add prototype
|
|
* aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning.
* bgp_capability_test.c: compile warnings.
* bgp_mp_attr_test.c: update for attr parser context struct
* ecommunity_test.c: ecommunity_free/ecommunity
* test-checksum.c: some unused vars and funcs without need of prototypes.
|
|
This reverts commit d78e2b8b562f8496aaf2977f7371415b71e82433. Next 2
commits fix it.
|
|
|
|
it doesn't compile currently; it'll be fixed after the 0.99.21 release.
* tests/bgp_mp_attr_test.c: wrap in #if 0 for now
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* redhat/*.service: add systemd service file for each routing daemon
* redhat/quagga.sysconfig: add comment about watchquagga and systemd
* redhat/Makefile.am: add systemd service files to distribution
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Taken from Fedora packaging with additional fixes.
* redhat/*.init: make all initscripts LSB-compliant;
store the daemon configuration file location in $CONF_FILE,
and perform existence testing before starting the daemon
* redhat/babeld.init: add initscript for Babel routing engine
* redhat/quagga.sysconfig: add command-line options for babeld;
remove the daemon configuration file locations from $*_OPTS;
clarify directions for configuring watchquagga
* redhat/Makefile.am: add babeld.init to distribution
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Taken from Fedora packaging.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Signed-off-by: David Ward <david.ward@ll.mit.edu>
[changed /usr/bin/perl to /usr/bin/env perl]
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
the BGP multipath code was developed against a pre-f6f434b Quagga where
bgp_attr_unintern and ecommunity_free took single-star pointers. They
now take double-star pointers.
* bgpd/bgp_mpath.c: fix up bgp_attr_unintern & ecommunity_free calls.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
In upstream babel, we include different kernel_foo files depending on the
platform we compile for. In Quagga, this is not needed, and it avoids
tricky autotools issues. (All autotools issues are tricky.)
[David: without this commit, build breaks.]
From: Juliusz Chroboczek <jch@pps.jussieu.fr>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
babeld wouldn't build in a dist tarball without this.
From: Denis Ovsienko <infrastation@yandex.ru>
Signed-off-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
[fixed up git message]
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
continually changing the zserv protocol without bumping up the version
number has made it impossible to talk to zebra without knowing the exact
version. in reality, increasing the version number more often guards
against inadvertedly running incompatible versions of a daemon and zebra
as well as aids external development.
* lib/zclient.h: #define ZSERV_VERSION 2
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
This reverts commit af56d404cd56d94ad3b2ec3f159650eb72baef0a,
which was accidentally duplicating functionality from commit
2ea1ab1 "zebra: ZEBRA_HELLO and mopping up routes (BZ#448)"
Conflicts:
zebra/zebra_rib.c
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Vladimir Podobaev reported that the following commands crashed the
daemon.
router bgp 123
bgp dampening
no bgp dampening 1 2 3 4
no bgp dampening
The problem was that bgp_damp_info_clean() tried to dereference the
already freed reuse_list array in the second call to "no bgp dampening".
Fixed by checking in bgp_damp_disable() that the dampening it's
enabled before doing the cleanup.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
|
|
- And allows to walk the LSDB.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
|
|
Increase the maximum number of nexthops per route by using a larger
buffer for netlink messages.
* zebra/rt_netlink.c: Use a buffer of 4096 bytes to parse/build
netlink messages. Add a hash define for this number
(NL_PKT_BUF_SIZE). Most places in the code were previously using a
buffer of 1024 bytes.
|
|
this is essentially half of a rewrite of isisd. please note that a lot
of things are still broken and isisd is not ready for production use.
|
|
All daemons modified to support custom path to zserv
socket.
[reapplied from b511468 after isisd merge]
|
|
|
|
this re-removes CVS keywords and .cvsignore files. original commits:
b82cdeb delete CVS keywords
05e54ee build: delete .cvsignore files
|
|
this merges a bgp capability negotiation fix where bgpd would fail if no
multiprotocol capability was present, but other capabilities were.
|
|
this patchset allows collapsing multiple received routes in BGP into one
multipath route that will, if readvertised, contain an aggregate of all
received attributes.
|
|
Reapply the bits of revision b4e45f6 that pertain to isisd. That is:
git log -n 1 -p b4e45f6 -- isisd
These were dropped in the merge with the Google ISIS code (14d2bbaa).
The commit message for b4e45f6 is:
fix zebra protocol after MP-BGP changes
The previous commits modified both zebra and bgpd for additional
SAFI field, but not any other routing daemon, which led to zebra
daemon crashing with failed assertion.
|
|
The steps were:
$ git checkout google-is-is
$ git merge quagga
$ git checkout google-is-is -- isisd
# Resolve conflicts in the following:
lib/md5.h
zebra/rt_netlink.c
zebra/zebra_rib.c
zebra/zserv.c
Note that the content in the isisd directory is left unchanged in the
merge. As a result, changes made to isisd as part of the following
commits on the quagga mainline are dropped.
# 8ced4e82 is the merge base, e96b3121 is the current quagga master
$ git log --oneline --reverse 8ced4e82..e96b3121 -- isisd
5574999 isisd: fix crash on "no router isis" (BZ#536)
8998075 isisd: raise hello rate for DIS (BZ#539)
306ca83 isisd: include hash.h, not hash.c
b82cdeb delete CVS keywords
2f65867 isisd: indent longopts array
b511468 quagga: option "-z" ("--socket <path>") added
05e54ee build: delete .cvsignore files
b4e45f6 fix zebra protocol after MP-BGP changes
7fd6cd8 isisd: fix circuit state machine
907fd95 isisd: send proper LSP after DIS election
d034aa0 isisd: fix wrong next-hops from SPF
c25eaff isisd: unexpected kernel routing table (BZ#544)
e6b03b7 isisd: implement MD5 circuit authentication
|
|
|
|
Conflicts:
bgpd/bgp_route.c
|
|
Address problem where bgpd would reject a session if a peer sent some
capabilities in its Open message, but did not include a Multiprotocol
extensions capability. Note that the session would come up if there
were no capabilities at all in the Open message.
* Add the 'mp_capability' out parameter to
bgp_capability_parse(). Set it to '1' if a Multiprotocol
extensions capability is encountered.
* Switch on 'mp_capability' instead of 'capability' in the calling
functions to determine if the peer indicated the set of AFI/SAFIs
it supports.
The net result is that when a peer does not send an MP capability,
it is assumed to support the AFI/SAFIs configured for it locally.
|
|
Change interface up/down notification messages to also include the
hardware address of the interface. The format of these messages is now
identical to the interface add message -- move the serialization code
to common functions.
* lib/zclient.c: Modify zebra_interface_if_set_value() to also parse
the hardware address. Invoke it from zebra_interface_add_read()
and and zebra_interface_state_read().
* zebra/zserv.c: Add zserv_encode_interface(). Invoke it from
zserv_interface_add(), zserv_interface_delete() and
zserv_interface_update().
|
|
* lib/if.c: Change if_delete_retain() to delete all connected
addresses, but to not free the list that holds them. Free the list
just before the interface structure itself is freed, in
if_delete().
|
|
* zebra/zebra_rib.c: Add code to clean up routes added by a client
(as identfied by 'rib type').
* zebra/zserv.[ch]: Maintain the type of the routes added by a
client on the 'zserv' structure -- assume that a given client uses
a single route type for now.
Clean up routes from a client when the client goes away (in
zebra_client_close()).
From: Josh Bailey <joshb@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* zebra/zebra_rib.c: (rib_queue_add, rib_queue_init) Add some more
logs and asserts.
From: Subbaiah Venkata <svenkata@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
* zebra/zserv.c
- zread_ipv4_delete(): Pass a null 'gate' parameter to
rib_delete_ipv4() if the route being deleted does not specify a
next hop IP address. We were previously passing a pointer to a
cleared out IP address.
- zread_ipv4_add(): Fix indentation.
From: Subbaiah Venkata <svenkata@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* zebra/rt_netlink.c:
- Pick up the hardware address of an interface when we receive a
netlink link change message. Extract code for parsing the
link-layer hardware address into a new function so we can reuse
it.
- netlink_routing_table(): Update to handle multipath routes.
- netlink_route_change(): Update to handle multipath routes. Fix
problem where the metric was not being read out.
* zebra/zebra_rib.[ch]: Extern nexthop_ipv4_ifindex_add() -- it is
now called from the netlink code.
From: Josh Bailey <joshb@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* lib/stream.[ch]:
- Add stream_set_endp(). This can be used to trim data (for
example, padding) at the end of a stream.
- Fix swapped 'getp' and 'endp' parameters in STREAM_WARN_OFFSETS.
From: Subbaiah Venkata <svenkata@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* lib/md5.[ch] Add implementation of HMAC-MD5 from RFC 2104.
From: Josh Bailey <joshb@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
* lib/linklist.h
- Change the listnextnode, listhead and listtail macros so that
they allow the list pointer to be NULL.
- Modify the ALL_LIST_ELEMENTS* macros such that they clear the
data pointer at the beginning and end of the loop.
From: Josh Bailey <joshb@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
nonwithstanding any desire for optimisation, these versions are shorter
and more concise. reading the comments, they might even be easier to
understand.
I've tested them on i686 and x86_64, and checked that correct assembler
code is emitted for ARM, MIPS and PowerPC.
IPv6 is left as an exercise for another day, none of the ideas I had led
to a "yes, this is the one to go with" solution.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
This reverts commit d171bf58ef12ace43d48565e6870722dece1e6ed.
There are multiple reasons for this revert, including bug #720, but also
quite simply the unreadability of having 2000 lines of an autogenerated
table in the middle of a source file.
Signed-off-by: David Lamparter <equinox@diac24.net>
Reported-by: Martin Winter <mwinter@opensourcerouting.org>
|