| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
fixes that stupid infinite loop on interface deletion.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
dn42 releases will from now on use even/odd numbers for stable/unstable
versions, so dn42.11 was unstable and dn42.12 is stable.
dn42.12 is dn42.11 with 3 bugfixes. no other changes have been made.
|
|
|
|
|
|
|
|
|
| |
meh. forgot to even look at the interface deletion path. this doesn't
really work well when looking for the local address in the subnet list
which has the connected prefix in it... loop ensues.
fix by using the connected prefix when looking at the list of connected
prefixes. duh.
|
|
|
|
|
|
|
| |
quagga configure adds -g to CFLAGS, but not to LDFLAGS. annoying
inconsistency ensues. just add -g to LDFLAGS so we have debug info by
default. it doesn't slow down stuff, and if people want small binaries
they strip them anyway.
|
| |
|
|
|
|
|
|
|
| |
avoid writing out configurations that we can't read back; in particular,
the scope field does get set for IPv6 addresses received from netlink
and would be written out for "ipv6 address" lines - but it can't
actually be configured.
|
|
|
|
|
|
| |
pimd caused "show ip route" to be broken in vtysh because
show_ip_route_cmd existed twice. fix by renaming pimd's version to
"show ip mroute".
|
|
|
|
|
|
|
|
|
|
| |
a8c48bb76f291c673438d2061753d05a0d9b3276 very hiddenly broke the FIFO
logic by intermixing bgp_advertise's prev/next and bgp_advertise_fifo's
prev/next, causing bgpd to SEGV on establishing a peering.
let's better have bgp_advertise_fifo point to bgp_advertise_fifo again,
thus allowing the compiler to catch intermixtures. this also reduces the
number of casts from 3 to just one.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the vty_*prepend* family can be used to reduce the amount of output
produced by "show running-config" and "write ...". it buffers output in
struct vty->prepend (1024 bytes) and outputs it when vty_out is called.
if vty_out isn't called, it can be removed with vty_unprepend later.
applied on zebra and ospfd to get rid of empty interface blocks.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
No, at second thought I don't want it in the list twice...
This reverts commit 43f93a5b3a491052b8206e6d94dd3c986aa9f45b.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
well, turns out FreeBSD and NetBSD don't like waiting for a negative
amount of time... and there i was hoping for a time machine. though
Linux doesn't seem to have a problem with negative times...
interesting...
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
NetBSD ships struct nd_opt_rdnss in netinet/icmp6.h. fix zebra RDNSS to
detect and use that if present.
|
|\ \ \ \
| | |_|/
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
properly receive the deletion notify for blackhole routes and mark the
rib entry.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* zebra_rib.c: (rib_delete_ipv4 and rib_delete_ipv6) A route is not
deleted unless the given gateway is first in the nexthop list. This
can leave a route containing an invalid nexthop in the routing table
which might later be used. Instead look at all nexthops to find a
match.
forward-ported to apply on top of Joakim Tjernlund's "don't delete too
many routes" by David Lamparter.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If there are two paralell PtP links to the same router:
C * 192.168.101.112/32 is directly connected, p1-4-19-4-20
C>* 192.168.101.112/32 is directly connected, p1-4-17-4-18
and the cable is to one of the ppp links is pulled, Zebra
deletes both routes instead of just the one that got yanked.
This fixes it to only delete the route to the interface that
got yanked. In fact, the whole delete route pattern matching
expressions needed a total makeover.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
support processing of RTM_BLACKHOLE et al. from kernel and dump them
into appropriate blackhole rib entries.
this exhibits the deletion bug famously fixed by Joakim Tjernlund, if
that patch isn't applied blackhole route deletion from kernel doesn't
work...
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
blackhole support was horribly broken. cleanup by removing blackhole
stuff from ZEBRA_FLAG_*, instead add a "zflags" field inside struct rib.
introduces support for "prohibit" routes (Linux/netlink only)
also clean up blackhole options on "ip route" vty commands.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
kernel_delete_ipv6_old is the only user of netlink_route. kill the
latter, let it be assimilated by the former.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
FLAG_BLACKHOLE is used for different things in different places. remove
it from the zclient API, instead indicate blackhole routes by
ZAPI_MESSAGE_BLACKHOLE, which is converted to the proper zapi indication
by zapi_ipv4_route()
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
lib/thread.c
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* The ospf_ase_calculate_timer can take a long time to run, as it scales
O(# of AS-External LSAs), in domains with lots of external routes.
Fix this by using a work-queue for the per-LSA processing, thus splitting
it up a bit.
* ospf_ase.h: (ospf_ase_calculate_route, ospf_ase_calculate_schedule) no
need for these to be exported.
* ospf_spf.c: (ospf_spf_calculate_timer) ospf_ase_calculate_schedule is gone.
* ospfd.h: (struct ospf) add a work-queue for the AS-External route
calculation.
* ospf_ase.c: (ospf_ase_calc_completion) completion func, for when
ase-calculation is done. Also have to take care to see if the timer
needs to be rescheduled, which is the case if ospf->ase_calc is set again
but there is no timer scheduled.
(ospf_ase_calc_process) workqueue processing function, calls to the
existing ospf_ase_calculate_route.
(ospf_ase_calculate_timer) add to work-queue, instead of calling
ospf_ase_calculate_route directly.
(ospf_ase_calculate_timer_add) do the job of ospf_ase_calculate_schedule
which can be removed. Set flag so we can tell if a timer schedule comes
in while the previous timer is running.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* It's possible for the packet output buffer to be filled up with a long
series of non-Hello packets in between Hellos packets, such that the
router's neighbours don't receive the Hello packet in time, even though
the hello-timer ran at about the right time. Fix this by prioritising
Hello packets, letting them skip the queue and go ahead of any packets
already on the queue.
This problem can occur when there are lots of LSAs and slow links.
* ospf_packet.h: (ospf_hello_send_sub) not used outside of ospf_packet.c
* ospf_packet.c: (ospf_fifo_push_head) add packet to head of fifo (so its
no longer really a fifo, but hey)
(ospf_packet_add_top) add packet to top of the packet output queue.
(ospf_hello_send_sub) Put Hello's at the top of the packet output queue.
make it take in_addr_t parameter, so that this
ospf_hello_send can re-use this code too.
(ospf_hello_send) consolidate code by using ospf_hello_send_sub
(ospf_poll_send,ospf_hello_reply_timer) adjust for ospf_hello_send_sub.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* The hello protocol monitors connectivity in 2 different ways:
a) local -> remote
b) remote -> local
Connectivity is required in both directions (2-way) for adjacencies to
form.
The first requires a round-trip to detect, and is done by advertising
which other hosts a router knows about in its hello messages. This allows
a host to detect which other routers are and are not receiving its
message. If a remote neighbour delists the local router, then the local
router raises a "1-Way Received" event.
The latter is straight-forward, and is detected by setting a timer for the
neighbour. If another Hello packet is not received within this time then
the neighbour is dead, and a separate "Inactive" event is raised.
These are 2 different and relatively independent measures.
Knowing that we can optimise the 2nd, remote->local measure and reset
the timer when /any/ packet arrives from that neighbour. For any packet
is as good as a Hello packet. This can help in marginal situations, where
the number of protocol messages that must be sent sometimes can exceed
the capacity of the network to transmit the messages within the configured
dead-time. I.e. an OSPF network with lots of LSAs, slow links and/or
slow hosts (e.g. O(10k) LSAs, O(100kbit) links, embedded CPUs, and O(10s)
dead-times).
This optimisation allows an OSPF network to run closer to this margin,
and/or allows networks to perhaps better cope with rare periods of
exceptional load, where otherwise they would not.
It's fully compatible with plain OSPF implementations and doesn't
prejudice dead-neighbour detection.
* ospf_nsm.h: Rename HelloReceived event to PacketReceived.
* ospf_nsm.c: (nsm_hello_received) -> nsm_packet_received
* ospf_packet.c: Schedule PacketReceived whenever a valid message is
received.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* workqueue.c: (work_queue_run) Err more on the side of keeping granularity
down, by being more conservative about increasing it.
Also, fix mispelling.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* (general) this can be useful when investigating thread latency problems,
when you don't want to have to restart a daemon between tests.
* thread.c: (cpu_record_(hash_)clear) wipe the stored thread cpu history
data, according to the filter, similar to the vty print code.
(clear_thread_cpu_cmd) new command to clear data.
* thread.h: export new command
* command.c: install it
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* bgp_route.c: (bgp_process_queue_init) rsclient wasn't getting all the
same things initialised as the main queue. Simplify to make it more robust.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* thread.c: (thread_fetch) the current scheduler will service events
indefinitely, ignoring I/O and timers, so long as there are events.
In other words, events can crowd out I/O and timers. In theory this
shouldn't be a huge problem as events are generated only by timers
and I/O, however in practice it means normal-load behaviour is not as
useful a predictor of high-load behaviour as it should be.
Fix this by considering all the kinds of threads, in every run of the
scheduler. For any given run, we prioritise events, however across
runs the scheduler should be fair.
This has been observed to give more stable inter-packet times in
testing of ospfd (i.e. lower std-dev).
(thread_process) new heler to queue all the given threads onto the ready
list
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Right now Zebra doesn't support recursive routes correctly when
the next hop is a dynamic protocol. Imagine the case where a static
route was entered to destination X.X.X.X via Y.Y.Y.Y and a protocol
created a route to Y.Y.Y.Y. Any change from that protocol to
Y.Y.Y.Y would might require zebra to update it's recursive route.
The RIB as is doesn't have the necessary state to do this quickly,
and the rib_update() and the resulting meta-queue is slow (2N) with
lots of routes. That combined with the incremental updates from
protocols makes the whole process potentially N^2. When we enabled
it for BGP, the feed to 30min to complete.
The comprimise I took was to start a delayed thread when zebra receives
an update from protocol. So only a limited number of scans are done.
I know this conflicts with your cleanup; but this might provide additional
help. The existing meta-queue stuff makes the rib update worse not
better.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If the vty_serv_sock_addrinfo is being used, then vty_serv_sock_family
is unsed. Fix by adjusting ifdef/else/endif
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
OSPF compiler warnings:
* remove dead code
* avoid casting int to pointer (instead use unsigned long)
(changes to ospf_ase.c removed by David Lamparter)
Cc: David Lamparter <equinox@diac24.net>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Gcc now warns if function that takes printf style formatting is
passed a non-constant string. This avoid issues when a format character
is entered in some command.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This patch started while looking at the compiler aliasing warnings
from FIFO_HEAD() in BGP. Then I realized the FIFO code was only
being used in BGP, so it made sense to move it from zebra to
BGP. In the process convert from macro's to inline and add more
type safety.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cleans up a few items with error reporting at startup:
- Line numbers are now reported alongside error text
- All errors now go to stderr instead of some stderr and some stdout
- The vty buffer is flushed so that errors now come out in the right order
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cherry-diff-picked from Paul's rib_reform branch
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Conflicts:
lib/route_types.txt
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | |_|_|/ / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Conflicts:
configure.ac
lib/zebra.h
vtysh/vtysh.c
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|