summaryrefslogtreecommitdiffstats
path: root/zebra
Commit message (Collapse)AuthorAgeFilesLines
* Merge with main Quagga source as of 29-Jul-2011.ex17Chris Hall2011-08-123-11/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create euro_ix branch. Update version to: 0.99.18ex17 Of particular note: * includes support for GTSM: neighbor ... ttl-security hops X no neighbor ... ttl-security hops X where X is 1-254. For usual case of immediately connected peer, X == 1. Cannot set ttl-security while ebgp-multihop is set, and vice-versa. If underlying O/S does not support GTSM, then will set ttl as per ebgp-multihop. In passing, have fixed various bugs in the main Quagga branch. * initial support for draft-ietf-idr-optional-transitive Does not yet support "neighbor-complete" flag. * main Quagga now uses TCP_CORK and permanent non-blocking Do not beleive TCP_CORK to be necessary for euro_ix code... which has a different buffering strategy. The euro_ix code already runs sockets permanently non-blocking. * various fixes to attribute intern/unintern Trying to remove memory leaks. Nobody seems convinced that this has been perfected, yet. * fixes for ospfd and ospf6d issues. Up to date with master branch up to: commit 538cb284864c17de66152a5236db4cd80e3e7639 Merge: 036a6e6 8ced4e8 Author: Paul Jakma <paul@quagga.net> Date: Fri Jul 29 18:21:50 2011 +0100
| * zebra: trivial warning fixPaul Jakma2011-04-131-7/+4
| | | | | | | | * zebra_routemap.c: (route_set_src) get rid of the dummy family variable.
| * Zebra zserv: bogus conditionalStephen Hemminger2010-08-191-1/+1
| | | | | | | | | | This looks like a bug in original code from misunderstanding of C rules of evaluation.
| * zebra: fix infinite loop when deleting an interfaceRoman Hoog Antink2010-05-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * zebra: change router-id selection algoStephen Hemminger2009-12-211-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Bring "ex" version up to date with 0.99.18ex14Chris Hall2011-03-293-14/+14
| | | | | | | | | | | | | | | | Release: 0.99.18ex14 Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
* | Bring up to date with 0.99.16 releaseChris Hall2010-04-175-8/+19
| | | | | | | | | | | | | | | | | | | | This brings this branch up to date with 0.99.16, EXCEPT for the change to bgpd to use monotonic clock for timing updates. There are places where bgpd expects to find the actual time that things happened... so this change is not though to be complete. Further tidying in zebra, for FreeBSD.
* | Fixing declarations to eliminate compiler warnings in zebra.Chris Hall2010-04-1725-33/+189
| | | | | | | | | | | | | | | | | | | | | | Only parts of zebra/*.c are compiled and linked, depending on what was chosen at "configure" time. A subset of that is compiled and linked for testzebra. Some things were not declared, or not declared everywhere they were required... leading to a number of compiler warnings. These changes are intended to tidy that up.
* | Put back some Quagga additions to getopt.c etc.Chris Hall2010-04-171-2/+1
| | | | | | | | | | | | | | | | Also, backed out a small change in zebra/misc_null.c, which removed a warning, but on reflection may be using deep magic which is not fully understood (by me, anyway). zebra appears to have a number of definitions for the same function, and how that is all linked is not obvious (to me, anyway).
* | Further reduction of warnings under gcc 4.2.1Chris Hall2010-04-162-1/+2
| |
* | Removing compiler warnings.Chris Hall2010-04-161-3/+5
| | | | | | | | | | | | | | | | Removed nearly 100 compiler warnings in the various routing daemons which now clean compile. Removed one warning in vty.c, which was obscured by the other warnings. SO... this commit corrects the previous one.
* | Revised thread/timer handling, work queue and scheduling.Chris Hall2010-02-161-91/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated quagga thread handling to use qtimers when using the new qpnexus -- so all timers are qtimers in the new scheme. Updated work queue handling so that each work queue item is a single malloced structure, not three. (Only bgpd and zebra use the work queue system.) When using qpnexus the background thread queue is no longer a timer queue, but simply a list of pending background threads. When a background thread is waiting on a timer, it is in the qtimer pile, same like any other thread. When using qpnexus, the only remaining quagga thread queues are the event and ready queues. Revised the qpnexus loop so that only when there is nothing else to do will it consider the background threads. Revised write I/O in the BGP Engine so that all writing is via the connection's write buffer. Revised the write I/O in the Routeing Engine, so that it passes groups of updates in a single mqueue message. This all reduces the number of TCP packets sent (because BGP messages are collected together in the connection's write buffer) and reduces the number of mqueue messages involved. (No need for TCP_CORK.) Code and comments review for the new code. modified: bgpd/bgp_advertise.c modified: bgpd/bgp_common.h modified: bgpd/bgp_connection.c modified: bgpd/bgp_connection.h modified: bgpd/bgp_engine.h modified: bgpd/bgp_fsm.c modified: bgpd/bgp_main.c modified: bgpd/bgp_msg_read.c modified: bgpd/bgp_msg_write.c modified: bgpd/bgp_network.c modified: bgpd/bgp_packet.c modified: bgpd/bgp_packet.h modified: bgpd/bgp_peer.c modified: bgpd/bgp_peer_index.h modified: bgpd/bgp_route.c modified: bgpd/bgp_route_refresh.h modified: bgpd/bgp_session.c modified: bgpd/bgp_session.h modified: bgpd/bgpd.c new file: bgpd/bgpd.cx modified: lib/mqueue.h modified: lib/qpnexus.c modified: lib/qpnexus.h modified: lib/qpselect.c modified: lib/qtimers.c modified: lib/qtimers.h modified: lib/sigevent.c modified: lib/stream.c modified: lib/stream.h modified: lib/thread.c modified: lib/thread.h modified: lib/workqueue.c modified: lib/workqueue.h modified: tests/heavy-wq.c modified: zebra/zebra_rib.c
* | Getting BGP Engine to start and removing warnings.Chris Hall2010-01-244-47/+54
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish the wiring required to get bgp_msg_read to process OPEN messages into the connection's open_state, and be able to check for correct peer AS, etc. Removed bugs preventing messages from being written. Added BGP Id check to collision detection logic. Removed as many warnings from comilation as possible. Replaced horrible FIFO kludge in the process. (Introduced the even more horrible miyagi kludge.) modified: bgpd/bgp_advertise.c modified: bgpd/bgp_advertise.h modified: bgpd/bgp_connection.c modified: bgpd/bgp_connection.h modified: bgpd/bgp_debug.c modified: bgpd/bgp_fsm.c modified: bgpd/bgp_msg_read.c modified: bgpd/bgp_msg_write.c modified: bgpd/bgp_network.c modified: bgpd/bgp_nexthop.c modified: bgpd/bgp_notification.c modified: bgpd/bgp_open.c modified: bgpd/bgp_packet.c modified: bgpd/bgp_session.c modified: bgpd/bgp_session.h modified: bgpd/bgpd.c modified: lib/Makefile.am modified: lib/distribute.c modified: lib/if_rmap.c new file: lib/miyagi.h modified: lib/prefix.h modified: lib/sockopt.c modified: lib/stream.c modified: lib/thread.c modified: lib/vty.c modified: lib/zebra.h modified: tests/bgp_capability_test.c modified: tests/bgp_mp_attr_test.c modified: tests/ecommunity_test.c modified: tests/heavy-thread.c modified: tests/heavy-wq.c modified: tests/heavy.c modified: tests/main.c modified: tests/test-checksum.c modified: tests/test-sig.c modified: watchquagga/watchquagga.c modified: zebra/if_netlink.c modified: zebra/ioctl.c modified: zebra/rt_netlink.c modified: zebra/rtread_netlink.c
* zebra: deal with irdp compile warningsStephen Hemminger2009-12-104-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* zebra: cleanup RIB meta queue codeStephen Hemminger2009-12-091-37/+10
| | | | | | | * zebra/zebra_rib.c * rib_queue_add(): indent comments and simplify debug code * rib_queue_init(): remove unneeded assert() calls and extra return statements
* zebra: fix more warnings in rtadvStephen Hemminger2009-12-081-8/+5
| | | | | | | | | * 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
* Merge branch 'master' of ssh://code.quagga.net/var/lib/git/quaggaDenis Ovsienko2009-12-081-13/+0
|\
| * zebra: remove unused function to fix warningStephen Hemminger2009-12-081-13/+0
| | | | | | | | | | * zebra/interface.c * if_supported_family(): sayonara
* | zebra: fix more compiler warningsStephen Hemminger2009-12-081-40/+4
|/ | | | | | | | | | | * 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: handle RTF_CLONING removal from FreeBSD 8.0David Ward2009-12-031-0/+7
| | | | | | | 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.
* zebra: fix argument reference in strncpy() call for BSDheasley2009-12-031-1/+1
|
* zebra: fix RIB debug message for IPv6David Ward2009-12-031-4/+4
| | | | | | | Apply changes from commit f304cb48f0d7d0ff8f36e7aca8293141a9fa9e60 to rib_queue_add. Also includes spelling fixes.
* zebra: make declaration const in rtm_flag_dump()Tom Goff2009-12-031-1/+1
| | | | | * kernel_socket.c: (rtm_flag_dump) Use a const message pointer to be in sync with commit ce0db9cb11c0bc2e7f89a7d042e50afa495556b4.
* zebra: Fix router advertisements for non-Ethernet link layer addressesDavid Ward2009-09-011-2/+16
| | | | | * rtadv.c: round up when calculating the link-layer address option length; add padding to the option if needed to end on an octet boundary
* zebra: Add an example config file for testzebraPaul Jakma2009-08-281-0/+56
| | | | * testrib.conf: Example config file for testzebra
* zebra: test_main.c should be a bit more helpful about its usagePaul Jakma2009-08-281-1/+5
| | | | * test_main.c: If required arguments are missing, say that.
* all: check return value from daemon() callStephen Hemminger2009-08-132-4/+10
| | | | | | * */*main.c: (main) Current versions of Gcc warn if the return value for daemon() is not checked. So add a simple test and exit on failure.
* [zebra] Fix crash in test_zebraPaul Jakma2009-07-281-0/+1
| | | | | | | * kernel_null.c: we're pretending to add an address, so set IFC_REAL. If this isn't done, calling into the 'got address from kernel' half of zebra will implicitly-withdraw the ifc, which could cause a crash in test_zebra.c.
* [zebra] do not touch socket before pidfile lockingDenis Ovsienko2009-07-243-7/+15
| | | | | | | Move zserv socket creation code into zebra_zserv_socket_init() and call it only after pidfile lock has been acquired exclusively. This keeps subsequent zebra daemons from deleting the working socket of an already running process (bug #403).
* [zebra] Silence noisy process_subqChris Caputo2009-07-211-0/+2
| | | | zebra_rib.c: process_subq(): #ifdef out debug code.
* zebra: Static route does not reach kernel.Joakim Tjernlund2009-06-241-2/+4
| | | | | | | | | | | | A static route like below: ip route 172.16.1.0/30 192.168.101.162 11 does not move properly to a new interface when the interface used goes down. Zebra reports that it have moved but kernel isn't informed so the route is lost. * zebra_rib.c: (nexthop_active_update) if ifindex has changed, then the route should be considered to have changed. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* [zebra] linux policy routing support with ipv6Mathieu Goessens2009-06-233-7/+7
| | | | | | | | Quagga support linux policy routing (ip route ... table $X) with zebra.conf table $X option. It works fine on ipv4. On ipv6 the parameter is ignored (table 0 is used). * zebra/...: Pass appropriate table arg to rib_{add,delete}_ipv6
* RFC 4191 Default Router Preference support for router advertisementsChris Caputo2009-06-234-2/+82
| | | | | | | | | | | | | | | Adds "ipv6 nd router-preference (high|medium|low)" and "no ipv6 nd router-preference" interface commands. Files modified: doc/ipv6.texi zebra/interface.c zebra/interface.h zebra/rtadv.c zebra/rtadv.h Signed-off-by: Chris Caputo <ccaputo@alt.net>
* [cleanup] convert bzero() deprecated by POSIX to memset()Jeremy Jackson2009-06-192-2/+2
| | | | | autoscan 2.62 complains about bzero(), so a good fix nowadays is to just replace it.
* [daemons/cleanup] Remove disabled log_mode argument support.Jeremy Jackson2009-06-182-13/+3
| | | | | * */*main.c: Seems that the actual code was removed previously, but the argument processing code remained.
* [zebra/cleanup] make message table read onlyStephen Hemminger2009-06-181-1/+1
|
* [zebra] Remove unused structure elementStephen Hemminger2009-06-181-3/+0
|
* [zebra] Force rib_update when connected route deletedStephen Hemminger2009-06-181-0/+4
|
* [cleanup] Use correct buffer size for inet_ntop()Stephen Hemminger2009-06-183-23/+25
| | | | | Don't need big buffer 1024 to hold IPV4 (INET_ADDRSTRLEN) or IPv6 (INET6_ADDRSTRLEN) message.
* [zebra] Only announce connected routes if link is detectedStephen Hemminger2009-06-181-1/+1
| | | | | Need to check both IFF_UP and IFF_RUNNING if link-detect is enabled, before announcing routes.
* [zebra] MTU is unsignedStephen Hemminger2009-06-181-1/+1
| | | | | The MTU data in the netlink message is always unsigned 32 bits. Don't use integer.
* [zebra] remove incorrect debug messageStephen Hemminger2009-06-181-2/+0
|
* [zebra] Cleanup meta-queue codeStephen Hemminger2009-06-181-64/+70
| | | | | | | | Do some cleanup work on recently added meta-queue code: * use table rather than switch * indent with quagga standard indentation * since meta_queue_new is only used at initialization allocation failure should be fatal.
* [zebra] netlink interface minor cleanupStephen Hemminger2009-06-182-7/+4
| | | | Add more prototypes and make some functions static
* [zebra] Fix vyatta bug 2814: Add "show ip route summary" command.Stig Thormodsrud2009-06-181-35/+86
|
* [cleanup] Make command nodes staticStephen Hemminger2009-06-122-4/+4
| | | | | The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
* [cleanup] functions taking no args should be declared with void argsStephen Hemminger2009-06-121-1/+1
| | | | | Use Ansi-C prototypes rather than old K&R method of declaring function without arguments
* [cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger2009-06-124-36/+14
| | | | Simple conversion of XMALLOC/memset to XCALLOC
* [snmp] Compiler warning fixes for when "--enable-snmp" is configured.Chris Caputo2009-06-021-14/+19
| | | | | Compiled on 32-bit and 64-bit linux gcc 4.1.2 platforms. No run-time testing on 32-bit and limited run-time testing on 64-bit.
*-. Merge commit 'remotes/jocke/ospf_neighbour'; commit ↵Paul Jakma2008-09-011-1/+3
|\ \ | | | | | | | | | 'remotes/jocke/snmp_crosscompile'