Age | Commit message (Collapse) | Author |
|
|
|
* bgpd/bgp_attr.c: (bgp_attr_aspath) error message could be misleading,
clearly log what flag was incorrect.
(Problem noted in "bgpd: fix error message in bgp_attr_aspath()" in
Quagga-RE)
|
|
|
|
|
|
* bgp_attr.c
* attr_flag_str: new message list
* bgp_attr_flags_diagnose(): new function, implements previously added
error logging in a generic way
* bgp_attr_origin(): use bgp_attr_flags_diagnose()
* bgp_attr_nexthop(): ditto
* bgp_attr_med(): ditto
* bgp_attr_local_pref(): ditto
* bgp_attr_atomic(): ditto
* bgp_attr_originator_id(): ditto
* bgp_attr_cluster_list(): ditto
* bgp_mp_reach_parse(): ditto
* bgp_mp_unreach_parse(): ditto
|
|
|
|
The function is implemented in ospf_lsa.c, move its "extern" declaration
to ospf_lsa.h for consistency.
|
|
* ospf_ase.c
* ospf_ase_complete_direct_routes(): dismiss unused variable
|
|
|
|
* bgp_nexthop.c (show_ip_bgp_scan_tables): access proper structure field
in AF_INET6 case, handle ifindex NH type properly
|
|
bgp_nexthop_onlink(): zlookup is not used here at all
bgp_nexthop_lookup_ipv6(): rely on the detection performed by "query"
function (this also changes the fallback value to 0), reorder if-block
bgp_nexthop_lookup(): idem
|
|
* bgp_nexthop.c: (show_ip_bgp_scan) transform into
show_ip_bgp_scan_tables(), which uses inet_ntop() and can dump
nexthops on request; (show_ip_bgp_scan_detail_cmd) new function
|
|
bgp_nexthop_lookup_ipv6(): declare variables where they are actually
used, drop no-op initialization (the field is already 0)
bgp_nexthop_lookup(): ditto
bgp_nexthop_check_ebgp(): rename to bgp_nexthop_onlink()
bgp_nexthop_cache_changed(): rename to bgp_nexthop_cache_different()
|
|
* if.c: (if_dump) loop that doesn't do anything, wants to be
before the zlog of what it's meant to print out so all the connected
addresses get printed out. Trival: just a debug function
|
|
* (general) Move functions in headers into files, to be compiled into
shared object files. Remove inline qualifier from functions. Let the
compiler do the work.
|
|
|
|
|
|
|
|
When the same ip address is used on several interfaces,
and one of them gets deleted (or equivalent: set to down and
then address removed), rib_delete_ipv[46] will also remove
the connected route from other interfaces.
rib_delete_ipv[46] is called twice when an interface is
deleted:
- for the "ifdown" event
- for the address removal
(note: this may be specific to the netlink interface of linux)
The second call does not find the connected route to that same
ifindex anymore, but deletes similar connected routes to any
other ifindex instead.
Reason: the ifindex check is on the same level as the check
for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. If everything
matches except for the ifindex, the "else" part (intended for
different route types) is executed, thus removing the route
from the wrong interface.
fix: move ifindex check inside the "then" part of the check
for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. Now connected
routes to other ifindexes will not spill over to the "else"
part for different route types anymore.
|
|
* fix disagreement with C99 in zlog_debug calls
Format specifier in some zlog_debug calls for size_t values
was changed in order to C99 ('%u' -> '%zu').
* fix -Wsign-compare warnings
Type of return value of ospf6_packet_max() was changed.
|
|
...otherwise 4294967295 is not a valid value on 32bit systems
|
|
* ospf6_route.c: (ospf6_route_best_next) Allows unlock route, even
when there's no next route. This is consistent with how
ospf6_route_next() behaves.
* ospf6_intra.c: (ospf6_intra_prefix_lsa_remove) Make sure the last
route considered is always unlocked. This is needed when the for
loop terminates because ospf6_route_is_prefix() returns zero.
Signed-off-by: Vyacheslav Trushkin <me@dogonthesun.net>
|
|
A clean exit makes it easier to use memory debuggers.
* ospf6_asbr.c: (ospf6_asbr_terminate) Add a function to do route map
cleanup.
* ospf6_lsa.c: (ospf6_lsa_terminate) Add a function to cleanup the lsa
handler vector.
* ospf6_main.c: (ospf6_exit) Add an function that causes ospf6d to
gracefully exit.
* ospf6_message.c: (ospf6_message_terminate) Add a function that frees
the send and receive buffers.
* ospf6_top.c: (ospf6_delete) Enable the ospf6_delete() function.
Disable ospf6 before freeing everything.
Signed-off-by: Vyacheslav Trushkin <me@dogonthesun.net>
Conflicts:
ospf6d/ospf6_lsa.h
|
|
if.c: (if_terminate) This adds a cleanup function that can be called
when a daemon exits, similar to vty_terminate().
|
|
|
|
|
|
When the same ip address is used on several interfaces,
and one of them gets deleted (or equivalent: set to down and
then address removed), rib_delete_ipv[46] will also remove
the connected route from other interfaces.
rib_delete_ipv[46] is called twice when an interface is
deleted:
- for the "ifdown" event
- for the address removal
(note: this may be specific to the netlink interface of linux)
The second call does not find the connected route to that same
ifindex anymore, but deletes similar connected routes to any
other ifindex instead.
Reason: the ifindex check is on the same level as the check
for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. If everything
matches except for the ifindex, the "else" part (intended for
different route types) is executed, thus removing the route
from the wrong interface.
fix: move ifindex check inside the "then" part of the check
for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. Now connected
routes to other ifindexes will not spill over to the "else"
part for different route types anymore.
|
|
* fix disagreement with C99 in zlog_debug calls
Format specifier in some zlog_debug calls for size_t values
was changed in order to C99 ('%u' -> '%zu').
* fix -Wsign-compare warnings
Type of return value of ospf6_packet_max() was changed.
|
|
...otherwise 4294967295 is not a valid value on 32bit systems
|
|
|
|
* ospf_abr.c
* ospf_abr_nssa_am_elected(): feed "best" instead of "address of best"
into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr
field of the structures to get better typed pointers
|
|
IPV4_ADDR_SAME() wasn't passed the right union member, this could cause
a bug due to strict-aliasing. IPV6_ADDR_SAME() case got its fix before
the error could be created by macro upgrade.
|
|
* lib/prefix.h
* IPV4_CLASS_DE(): make consistent with counterpart macros
* bgp_packet.c
* bgp_open_receive(): test using macro instead of ">="
* bgp_route.c
* bgp_update_rsclient(): idem
* bgp_update_main(): idem
|
|
* ospf_packet.c (ospf_recv_packet): FreeBSD, starting from version 10, will not
subtract the IP header size from ip_len.
This is the patch from FreeBSD's ports/net/quagga/files/patch-ospfd__ospf_packet.c,
by Boris Kovalenko.
|
|
ZEBRA_HELLO message is used by routing daemons to inform zebra
what type of routes daemon will be announcing to zebra. Also
zebra uses route_type_oaths array to track which daemon announces
which protocol. Zebra mops up routes if daemon didn't for some
reason.
|
|
ip_masklen() was likely to return incorrect results after being compiled
with -fstrict-aliasing (-O2, -O3, -Os)
|
|
The new implementation makes use of a 64KB mapping table, which makes it
possible to compute masklen faster and with constant execution time. The
map also allows for additional version of the function, which can detect
errors in input argument.
The previous implementation had a variable cost of execution, which
depended on masklen in a non-linear manner, and at its worst (/31) was
4 times slower, than the new implementation. The only case of old
function just slightly outperforming the new one is /0, which is of
little practical interest.
|
|
|
|
* ospf_abr.c
* ospf_abr_nssa_am_elected(): feed "best" instead of "address of best"
into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr
field of the structures to get better typed pointers
|
|
IPV4_ADDR_SAME() wasn't passed the right union member, this could cause
a bug due to strict-aliasing. IPV6_ADDR_SAME() case got its fix before
the error could be created by macro upgrade.
|
|
* lib/prefix.h
* IPV4_CLASS_DE(): make consistent with counterpart macros
* bgp_packet.c
* bgp_open_receive(): test using macro instead of ">="
* bgp_route.c
* bgp_update_rsclient(): idem
* bgp_update_main(): idem
|
|
* ospf_packet.c (ospf_recv_packet): FreeBSD, starting from version 10, will not
subtract the IP header size from ip_len.
This is the patch from FreeBSD's ports/net/quagga/files/patch-ospfd__ospf_packet.c,
by Boris Kovalenko.
|
|
ZEBRA_HELLO message is used by routing daemons to inform zebra
what type of routes daemon will be announcing to zebra. Also
zebra uses route_type_oaths array to track which daemon announces
which protocol. Zebra mops up routes if daemon didn't for some
reason.
|
|
The if_dump code had empty loop, that caused set-never-used warning.
|
|
Stephen Hemminger's commits contain all the changes and
several other warning fixes.
This reverts commit 6947dbebdc91b6272f8107a6e0dd211457438606.
|
|
Make progname a string, and cast when calling asn1.
Remove variable set but never used.
|
|
Check result of fgets(), and don't set variable that is
never used.
|
|
When doing valgrind testing, the privledges from zprivs_init() need
to be cleaned up on exit.
|
|
The code for nssa_range and other bits that were written but
never used.
|
|
BGP was ignoring nexthop info for static and other redistributed
routes for IPv6. Build extra attribute info to store the nexthop.
See also:
https://bugzilla.vyatta.com/show_bug.cgi?id=6073
|