Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
The old algorithim looked up every node twice as it withdrew
the entry. It looks up entry once in redistribute_withdraw, then
looks it up again info_delete. Use result of first lookup
to do the free directly.
This may explain the slow performance observed in
https://bugzilla.vyatta.com/show_bug.cgi?id=4421
|
|
Change sockunion_log() to not use strdup(). This fixes a small memory
leak that occurs on every failed connect(), and is simpler/cleaner.
|
|
The delete_hook was being run after calling access list delete function.
This would cause ospf to dereference a NULL, in ospf_filter_update
because 'access->name' was already freed.
See also:
https://bugzilla.vyatta.com/show_bug.cgi?id=7654
|
|
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.
|
|
Experience with IPv4 counterpart of this function suggests, that
this way of type-punning is likely to cause errors.
|
|
Experience with IPv4 counterpart of this function suggests, that
this way of type-punning is likely to cause errors.
|
|
|
|
|
|
(This patch was modified to leave calls to stream_getl() in place, they
are necessary for the stream's internal pointer to advance to the
correct position. -- Denis)
Signed-off-by: Denis Ovsienko <infrastation@yandex.ru>
Fix gcc warnings about varables that are set but never used.
* bgpd/bgp_attr.c
* cluster_unintern(): ret
* transit_unintern(): ret
* bgp_attr_default_intern(): attre
* bgp_mp_reach_parse(): rd_high, rd_low
* bgpd/bgp_route.c
* bgp_announce_check_rsclient(): bgp
* bgpd/bgp_zebra.c
* zebra_read_ipv4(): ifindex
* zebra_read_ipv6(): ifindex
* bgpd/bgpd.c
* bgp_config_write_peer(): filter
* lib/distribute.c
* distribute_list_all(): dist
* distribute_list(): dist
* distribute_list_prefix_all(): dist
* distribute_list_prefix(): dist
* lib/if_rmap.c
* if_rmap(): if_rmap
* lib/vty.c
* vty_accept(): vty
* lib/zclient.c
* zclient_read(): ret
* zebra/irdp_interface.c
* if_group(): zi
* zebra/rt_netlink.c
* kernel_read(): ret, sock
|
|
This is needed to avoid stale routes in some cases; the regression was
introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c.
* ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish()
before possibly returning if no router-LSA is found for the root of
the SPF tree.
|
|
This issue has been pointed out by Lou Berger and Tim Browski.
* bgp_packet.c
* bgp_route_refresh_receive(): restore if() condition, which was
broken by commit fdbc8e77c88f751924299d0bc752371d5cc31116
|
|
|
|
|
|
|
|
|