Age | Commit message (Collapse) | Author |
|
* bgp_packet.c: (bgp_route_refresh_receive) add validation of
"Length" (RFC5292) field value, check input stream bounds
each time bytes are pulled from it
|
|
|
|
When deleting a VLAN interface after flushing its
addresses, zebra uses 100% CPU time and freezes.
* interface.c: The while loop in line 407 that
should clean up connected routes never hits one
of the 2 lines "last = node;" and thus loops
forever.
Signed-off-by: Roman Hoog Antink <rha@open.ch>
|
|
|
|
these are autogenerated by autoreconf, drop them from git.
|
|
this fixes warnings from vtysh extract.pl by making sure the isis method
files always 'work'. (previously, extract.pl would grab unselected isis
method sources and then complain about missing headers)
|
|
startup-config
* ospf6_interface.c: When '[no] ipv6 ospf6 advertise prefix-list'
appears in the startup configuration for ospf6d, a crash occurs,
because ospf6d attempts to schedule LSAs when the 'oi->area'
structure has not yet been initialized.
Now, when the command above is issued (either in the startup
configuration or at runtime), ospf6d will only schedule LSAs if
the 'oi->area' structure has been initalized. A similar test is
already used when handling the commands 'ipv6 ospf6 priority'
and 'ipv6 ospf6 cost'.
|
|
|
|
* ospf_zebra.c: (ospf_distribute_list_update_timer) forces a
refresh of default route each time it finds a default prefix.
This is suboptimal, just record that it needs to be done and
do it once.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
|
|
* ospf_zebra.c: (ospf_distribute_list_update_timer)
If there are updates to the distribute list every 5 second or less,
ospf_distribute_list_update_timer() will never run as the timer gets
rearmed for each update. This fixes it by never rearming an active
distribute list timer.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
|
|
Roman Hoog Antink <rha@open.ch> reports:
When adding a connected route (using vtysh, without restart) to the
redistribution access list of ospfd, while static routes already exist,
the update timer ospf_distribute_list_update_timer() is being run for
static routes only. That way, the connected route never appears in the
OSPF database, until quagga is completely restarted.
The update timer for connected routes is cancelled in
ospfd/ospfd_zebra.c:ospf_distribute_list_update():976, were a new timer
is scheduled for static routes, caused by the loop in ospf_filter_update().
* ospf_zebra.c: (ospf_distribute_list_update_timer) make it
refresh all external routes. This fixes the problem
reported by Roman.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
|
|
* (HACKING.pending): List known places where work on quagga that is
not (yet) integrated into the main tree can be found.
|
|
|
|
|
|
|
|
* configure.ac: bump up version number
|
|
Stephen:
A recent change breaks build Quagga on Debian Lenny with amd64 (but not
i386). Not sure whether this is cause by ld, gcc, or libtool; but
whatever it just won't work for a large number of users.
Mathias:
I would guess it's a problem of libtool because it adds "-fPIC -DPIC" to
the compiler flags but doesn't remove -fPIE. That wouldn't be a problem
if the compiler would ignore the -fPIE in favor to the latter -fPIC, but
obviously it does not. [...] Those objects were actually compiled with
-fPIC but also -fPIE which seems to confuse gcc.
|
|
Because the final executables are built as position independent
executables (PIE) -- when configure has detected compiler supported for
PIE -- the objects in the library archive must be built in that way,
too. Otherwise the runtime linker has to do unneccesary relocation for
each start of the program. Even worse, the programs won't even be able
to start on a (hardened) kernel that doesn't allow those relocations to
happen by preventing making the .text segment writable (PaX's MPROTECT
feature comes to mind). The attached patch fixes this issue by adding
the appropriate flags to the Makefile.am.
|
|
BGP uses time() to get system time of day; but that value
fluctuates with time adjustments from NTP. This can cause premature
flapping of peer sessions and other failures.
Use the system monotonic clock supported by Quagga thread library
to avoid issue.
See: http://bugzilla.vyatta.com/show_bug.cgi?id=4467
* bgpd/bgp_fsm.c
* bgp_uptime_reset(): dismiss function
* bgpd/bgpd.c
* bgp_clock(): new function
* bgpd/bgp_damp.c
* bgp_reuse_timer(): employ bgp_clock() instead of time(NULL)
* bgp_damp_withdraw(): idem
* bgp_damp_update(): idem
* bgp_damp_scan(): idem
* bgp_damp_info_vty(): idem
* bgp_damp_reuse_time_vty(): idem
* bgpd/bgp_fsm.c
* bgp_routeadv_timer(): idem
* bgp_stop(): idem
* bgp_establish(): idem
* bgpd/bgp_packet.c
* bgp_update_receive(): idem
* bgpd/bgp_route.c
* bgp_update_rsclient(): idem
* bgp_update_main(): idem
* bgp_static_update_rsclient(): idem
* bgp_static_update_main(): idem
* bgp_static_update_vpnv4(): idem
* bgp_aggregate_route(): idem
* bgp_aggregate_add(): idem
* bgp_redistribute_add(): idem
* bgpd/bgp_snmp.c
* bgpPeerTable(): idem
* bgpTrapEstablished(): idem
* bgpTrapBackwardTransition(): idem
* bgpd/bgpd.c
* peer_create(): idem
* peer_uptime(): idem
* bgp_master_init(): idem
|
|
* ospf_packet.c: (ospf_ls_upd) DISCARD_LSA continues, and so should be
after debug messages, not before them.
|
|
* ospf_lsdb.c: (lsdb_prefix_set) memset is unneeded, as all fields are
initialised explicitly, and this function can be in the top-3 of a
profile when there are a lot of LSAs.
|
|
* lib/memory.h
* mtype_zcalloc(): correct function prototype
* XFREE(): make both definitions consistent in setting
the pointer to NULL after freeing the memory
These changes will only have an effect if MEMORY_LOG is defined
(it is not by default).
|
|
The router-id table looks like is supposed to be sorted in current
quagga code, but the nodes are not added with the sorting
function.
The sorting function is host byte order dependent.
The values need to converted before comparison.
Fixing this causes Zebra to choose the largest IP address
as router-id, rather than the last address. This probably will
surprise some users. The other option would be to just remove the
comparison function and keep the existing LIFO behavior.
Lastly, simple subtraction works well for comparing.
* zebra/router-id.c
* router_id_add_address(): employ listnode_add_sort()
* router_id_cmp(): employ ntohl(), then compare integers
|
|
* isisd/isis_pdu.c
* maskbit: this pre-initialized array is not modified
* lib/prefix.c
* maskbit: idem
* lib/command.c
* facility_map: idem
* itoa64: idem
* default_motd: make local var static
* facility_name(): update local var accordingly
* facility_match(): idem
|
|
* bgpd/bgp_aspath.c
* ashash: only used in one file, make static
* aspath_count_numas(): dead code, sayonara
* bgpd/bgpd.c
* peer_nsf_stop(): only used in one file, make static
* bgpd/bgp_packet.h
* bgp_capability_receive(): add missing prototype for a
global function
|
|
* ripd/rip_interface.c
* rip_request_neighbor(): comment out, unused
* rip_request_neighbor_all(): idem
* rip_interface_up(): Cast flags otherwise compiler complains
about %lld not matching uint64_t on 64 bit x86. Print in hex
since flags are bit field.
* rip_interface_add(): idem
* rip_interface_delete(): idem
* ripd/rip_zebra.c
* rip_redistribute_set(): comment out, unused
* ripd/ripd.h
* rip_redistribute_check(): move prototype here so compiler
can check function against prototype
* ripd/ripd.c
* rip_update_default_metric(): comment out, unused
|
|
* ospf6d/ospf6_interface.c
* loopind(): sayonara
* ospf6d/ospf6_top.c
* ospf6_delete(): comment out, it might be useful if real shutdown is
added
|
|
* lib/prefix.h
* prefix6_bit(): add IPv6 wrapper for prefix_bit()
* ospf6d/ospf6_lsdb.c
* ospf6_lsdb_type_router_head(): employ prefix6_bit()
* ospf6_lsdb_type_head(): idem
|
|
* ripngd/ripng_interface.c
* ripng_check_max_mtu(): unused, sayonara
* ripng_interface_down(): cast flag arguments to logging function
* ripng_interface_add(): idem
* ripng_interface_delete(): idem
* ripngd/ripngd.c
* ripng_recv_packet(): avoid aliasing warning dereferencing pointer
|
|
* zebra/irdp.h
* irdp_send_thread(): move prototype to common header file
* irdp_advert_off(): idem
* process_solicit(): idem
* irdp_read_raw(): idem
* send_packet(): idem
* zebra/irdp_interface.c
* inet_2a(): move function to where it is used
* in_cksum(): lib/checksum.h already provides prototype
* irdp_send_thread(): prototype moved away
* inet_2a(): idem
* irdp_advert_off(): idem
* b1, b2, b3, b4: get rid of global buffers for inet_2a()
* if_group(): add local buffer for inet_2a()
* if_add_group(): idem
* if_drop_group(): idem
* irdp_config_write(): idem
* Adv_new(): make static
* zebra/irdp_main.c
* irdp_read_raw(): prototype moved away
* send_packet(): idem
* in_cksum(): lib/checksum.h already provides prototype
* inet_2a(): function moved to irdp_interface.c
* zebra/irdp_packet.c
* b1, b2, b3, b4: get rid of global buffers for inet_2a()
* in_cksum(): lib/checksum.h already provides prototype
* process_solicit(): prototype moved away
* irdp_read_raw(): fix uninitialized variable
|
|
* bgpd/bgp_fsm.c
* bgp_clearing_completed(): only used in one file, can be static
* bgpd/bgp_packet.c
* afi2str(): sayonara
* safi2str(): sayonara
* bgpd/bgp_route.c
* bgp_distance_reset(): sayonara
* bgpd/bgp_zebra.c
* bgp_ifindex_by_nexthop(): sayonara
|
|
* zebra/zebra_rib.c
* rib_queue_add(): indent comments and simplify debug code
* rib_queue_init(): remove unneeded assert() calls and
extra return statements
|
|
Make one version of check prefix bit, and put it inline
with proper prototype. This gets rid of some macro's and also some
assert() that can never happen on a non-broken compiler.
* bgpd/bgp_table.c
* CHECK_BIT(): sayonara
* check_bit(): sayonara
* SET_LINK(): sayonara
* set_link(): make use of prefix_bit() instead of check_bit()
* bgp_node_match(): idem
* bgp_node_lookup(): idem
* bgp_node_get(): idem
* lib/prefix.h
* prefix_bit(): new inline version of check_bit()
* lib/table.c
* CHECK_BIT(): sayonara
* check_bit(): sayonara
* SET_LINK(): sayonara
* set_link(): make use of prefix_bit() instead of check_bit()
* route_node_match(): idem
* route_node_lookup(): idem
* route_node_get(): idem
* ospf6d/ospf6_lsdb.c
* CHECK_BIT(): sayonara
* ospf6_lsdb_lookup_next(): make use of prefix_bit() instead of
CHECK_BIT()
* ospf6_lsdb_type_router_head(): idem
* ospf6_lsdb_type_head(): idem
* ospf6d/ospf6_route.c
* CHECK_BIT(): sayonara
* ospf6_route_match_head() make use of prefix_bit() instead of
* CHECK_BIT()
|
|
* md5.c
* md5_calc(): If building on little endian then X
will be 'const uint32_t' which causes compiler
warning in code that never gets used. Just move
the endif to make sure code is not checked.
|
|
* zebra/rtadv.c
* rtadv_free(): remove unused function
* rtadv_recv_packet(): break up cast/dereference to avoid
compiler type pun warning
* rtadv_read(): initialize ifindex, because compiler can't
figure out that it is okay
|
|
|
|
* zebra/zebra_rib.c
* nexthop_active_update(): make local int vars unsigned
* nexthop_active_check(): return unsigned for consistency
* rib_dump(): cast time in printf format
* vrf_free(): remove unused function
* vrf_lookup_by_name(): idem
* rib_if_up(): idem
* rib_if_down(): idem
|
|
* zebra/interface.c
* if_supported_family(): sayonara
|
|
* table.c: general type safety and compiler help:
* maskbit[]: become const
* route_node_match(): take const args
* route_node_match_ipv4(): idem
* route_node_match_ipv6(): idem
* check_bit(): idem, plus adjust local vars typing
|
|
|
|
heasley: I've used this for a while to track usage.
|
|
It seems that there is a bug in ospf6d in ospf6_lsa_compare(): If LSA A
has sequence number smaller than 0x80000000 and LSA B has sequence
number larger than 0x80000000, ospf6_lsa_compare() returns that B is
more recent than A, although RFC says that sequence numbers should be
compared as signed numbers (0x8000001 smallest and 0x7FFFFFFF largest).
In ospfd, the function ospf_lsa_more_recent() has it right.
The problem appears when Quagga is used together with OSPFv3 in
development version of BIRD daemon ( http://bird.network.cz/ ),
which creates LSAs with maximum sequence number (0x7FFFFFFF)
as a part of flushing/premature aging LSA from OSPF area.
Because both daemons has different idea of which LSA instance
is more recent, it would lead to LSA storm.
|
|
|
|
The RTF_CLONING flag has been removed in FreeBSD 8.0 with arp-v2 (see
http://svn.freebsd.org/viewvc/base/stable/8/UPDATING?view=markup),
since it no longer has any meaning. This patch checks if RTF_CLONING
exists before using it.
|
|
|
|
|
|
Avoid a potential conflict with the C99 defines 'true' and 'false'
found in <stdbool.h> by choosing better variable names.
Also fix the calls to these ioctls, as described in <net/bpf.h>
in FreeBSD, NetBSD, and OpenBSD:
* BIOCGBLEN, BIOCIMMEDIATE, BIOCSSEESENT (the parameter should be
of type 'u_int')
* BIOCPROMISC (there should be no parameters)
|
|
|
|
Several bits of text can be local or are unused.
|
|
|