summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'current' into dn42quagga_1.1.0-dn42.11-rc0David Lamparter2010-02-052-0/+32
|\
| * lib: get rid of extraneous output with vty_prependDavid Lamparter2010-02-052-0/+32
| | | | | | | | | | | | | | | | | | 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.
* | lib: fix merge foobar in thread_fetchDavid Lamparter2010-02-051-1/+1
| | | | | | | | | | | | | | | | 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...
* | Merge branch 'current' into dn42David Lamparter2010-02-053-19/+27
|\|
| * zebra: cleanup blackhole supportDavid Lamparter2010-02-051-2/+2
| | | | | | | | | | | | | | | | 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.
| * lib, ospfd: remove ZEBRA_FLAG_BLACKHOLE from the zclient APIDavid Lamparter2010-02-052-17/+25
| | | | | | | | | | | | | | 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()
* | Merge branch 'patches/pj_workqueue' into dn42David Lamparter2010-02-054-23/+135
|\ \ | | | | | | | | | | | | Conflicts: lib/thread.c
| * | lib: Make workqueue more conservative about ramping upPaul Jakma2010-02-051-8/+9
| | | | | | | | | | | | | | | | | | * workqueue.c: (work_queue_run) Err more on the side of keeping granularity down, by being more conservative about increasing it. Also, fix mispelling.
| * | lib: Add a command to clear the thread CPU history dataPaul Jakma2010-02-053-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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
| * | lib: Thread scheduler should be fair and not let events starve I/O and timersPaul Jakma2010-02-051-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | Merge branch 'patches/smallones' into dn42David Lamparter2010-02-055-141/+115
|\ \ \
| * | | vty_serv_sock_family unusedStephen Hemminger2010-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | If the vty_serv_sock_addrinfo is being used, then vty_serv_sock_family is unsed. Fix by adjusting ifdef/else/endif
| * | | vty: fix warningsStephen Hemminger2010-02-043-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | bgp: move cleanup fifo codeStephen Hemminger2010-02-041-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | lib: Improve error reporting from broken config filesSteve Hill2010-02-043-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | lib: fix whitespace of Do better filtering of arguments...Paul Jakma2010-02-041-89/+89
| | | | | | | | | | | | | | | | | | | | | | | | cherry-diff-picked from Paul's rib_reform branch Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge branch 'merged/pimd' into dn42David Lamparter2010-02-0410-2/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/route_types.txt
| * | | | pimd: post-merge fixupsDavid Lamparter2010-02-041-0/+3
| | | | |
| * | | | Merge remote branch 'qpimd/pim' into merged/pimdDavid Lamparter2010-02-049-2/+52
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.ac lib/zebra.h vtysh/vtysh.c
| | * | | [pim] Clean-upEverton Marques2009-11-182-0/+4
| | | | |
| | * | | [pim] Hooks for ssmpingd supportEverton Marques2009-10-081-0/+1
| | | | |
| | * | | [pim] Initial pim 0.155Everton Marques2009-10-027-3/+49
| | | | |
* | | | | Merge branch 'merged/ospfd' into dn42David Lamparter2010-02-042-34/+20
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Merge branch 'patches/jt_unnumbered' into ospf-merge-3David Lamparter2010-02-041-0/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ospfd/ospfd.c
| | * | | | zebra, lib: Add ZEBRA_INTERFACE_UNNUMBERED interface flag.Joakim Tjernlund2010-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use interface <ifname> "unnumbered" command to set unnumbered mode. "no unnumbered" will clear it. Changed to use *_FLAG macros by David Lamparter. Cc: David Lamparter <equinox@diac24.net>
| * | | | | lib: Optimize Fletcher and Internet checksumsJoakim Tjernlund2010-02-041-34/+19
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Did some simple optimizations to reduce the number of instructions in the hot path for both fletcher_checksum() and in_cksum().
* | | | | Merge branch 'patches/smallones' into dn42David Lamparter2010-02-041-181/+144
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | lib: Do better filtering of arguments, optional args particularlyPaul Jakma2010-02-031-181/+144
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * command.c: (cmd_deopt) helper to extract the inside argument string from an optional argument. (cmd_match) Consolidate matching code from cmd_filter_by_* to here. Use cmd_deopt to match on the /inner/ argument of an optional string, rather than treating optional arguments as matching pretty much any string. (cmd_filter) consolidate cmd_filter_by_* to here, and use cmd_match. Further, do a two-pass filter, to make use of the fact that we know the "strongest" match (e.g. range-match args beat variables) and can filter out weaker ones. Along with ability to match on inside of optional arguments, this makes our command definitions more powerful, and should allow us to avoid much redundancy in command defs. (is_cmd_ambiguous) look inside optional args, for better matching.
* | | | Merge branch 'patches/sh_bgp-write-cork' into dn42David Lamparter2010-02-046-34/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/sockunion.c
| * | | | BGP: enable TCP corkingStephen Hemminger2010-02-032-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On BGP write, use TCP_CORK to provide hints to kernel about TCP buffering. This will cause BGP packets to occur in bigger chunks (full size MTU), improving performance and getting rid of one of the problems reported in the UNH BGP conformance test.
| * | | | thread: remove except fd setStephen Hemminger2010-02-032-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fd_set exceptfd is never used by any Quagga thread. According to documentation it is only meaningful for out of band data, and no routing protocol uses out of band data. It saves some small amount of kernel overhead to not use it.
| * | | | stream: remove unused stream_read_unblockStephen Hemminger2010-02-032-30/+0
| |/ / / | | | | | | | | | | | | | | | | The one place this was being used in BGP is now gone, can remove deprecated interface.
* | | | Merge branch 'patches/fr_isisd-fixes' into dn42David Lamparter2010-02-042-0/+76
|\ \ \ \
| * | | | isisd: md5 link authenticationFritz Reichmann2010-02-032-0/+76
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Implement isis circuit md5 authentication * Replace command "isis passwd" with "isis passwd {clear|md5}" * Verify HMAC MD5 on ISIS Hello PDUs * Add HMAC MD5 authentication to md5.h/md5.c from RFC2104
* | | | Merge branch 'patches/dl_bug-537' into dn42David Lamparter2010-02-042-0/+56
|\ \ \ \
| * | | | lib: prefix2sockunion, prefix_common_bits helper functionsDavid Lamparter2010-02-032-0/+56
| |/ / / | | | | | | | | | | | | | | | | | | | | prefix2sockunion converts a struct prefix* to a union sockunion *; prefix_common_bits counts the number of common bits in the prefix's address part.
* | | | Merge branch 'patches/jt_times2' into dn42David Lamparter2010-02-042-49/+85
|\ \ \ \
| * | | | lib: fix header broken by times(2) branchDavid Lamparter2010-02-031-4/+0
| | | | |
| * | | | lib: Use times(2) to calculate relative time.Joakim Tjernlund2010-02-031-36/+84
| | | | | | | | | | | | | | | | | | | | | | | | | times(2) is monotonic, use it to calculate relative_time and scale the value using sysconf(_SC_CLK_TCK);
| * | | | lib: Unexport recent_timeJoakim Tjernlund2010-02-031-9/+1
| |/ / / | | | | | | | | | | | | | | | | Exporting a variable is bad practise and since recent_time isn't used, make it static.
* | | | dn42: motdDavid Lamparter2010-02-041-3/+3
| | | |
* | | | dn42: enable HSLS, OLSR, BATMAN, DHCPDavid Lamparter2010-02-042-6/+21
| |/ / |/| |
* | | lib: fs namespacing 3/5: use path_state for zserv socketDavid Lamparter2010-02-042-1/+5
| | | | | | | | | | | | | | | | | | this uses the path_state helper for determining the path of quagga's zserv.api socket. this allows for running multiple instances of zebra each with its own interface.
* | | lib: fs namespacing 1/5: add path_* helpersDavid Lamparter2010-02-043-3/+102
| | | | | | | | | | | | | | | | | | path_state and path_config return full path names to configuration / state files. path_set_namespace can be used to include a namespace part into the paths returned.
* | | zebra: NetBSD: get IPSRCSEL preference value from kernelDavid Lamparter2010-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | fetch the address preference value from the kernel through SIOCGIFADDRPREF and pass it to quagga through connected_add_ipv4, which stores it in struct connected->preference. IPSRCSEL is a NetBSD kernel option(4), documented in in_getifa(9) and is available since NetBSD 4.0 but not enabled in default GENERIC.
* | | netlink: process scope value, save itDavid Lamparter2010-02-031-0/+3
| | | | | | | | | | | | | | | add struct connected "scope" field, fill it from kernel data and display it in "show interface" address list.
* | | lib: lookup(): support 0 as a key, use NULL str for end of listDavid Lamparter2010-02-031-1/+1
| | |
* | | lib: add sockopt helper for setting IPV6_V6ONLY and use itDavid Lamparter2010-02-033-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getaddrinfo returns a list of socket parameters for listening. it will contain both IPv4 and IPv6 listening sockets. unless we use IPV6_V6ONLY on the IPv6 ones, only the socket listed first will work. if the IPv4 one came first, the IPv6 one would get an "Address in use" error. this functionality was already present for bgpd and its listening sockets. as it is needed for vtys as well, make it a common helper.
* | | lib: put route_types.txt to real useDavid Lamparter2010-02-036-231/+259
| | | | | | | | | | | | | | | | | | | | | this replaces most occurences of routing protocol lists by preprocessor defines from route_types.h. the latter is autogenerated from route_types.txt by a perl script (previously awk). adding a routing protocol now is mostly a matter of changing route_types.txt and log.c.
* | | build: libzebra link fix: add libcapDavid Lamparter2010-02-031-1/+1
|/ / | | | | | | | | libzebra uses capability functions; some systems require libcap for linking libzebra therefore