summaryrefslogtreecommitdiff
path: root/zebra
AgeCommit message (Collapse)Author
2012-01-26zebra: justify some IPv6 ND RA timers wrt RFCDenis Ovsienko
There was a regression introduced with the previous commit: "ipv6 nd home-agent-lifetime 1800000" appeared by default in every interface section of running-config, although this command is invalid in this context. Troubleshooting and bugfixing of the issue tracked out several bugs in router advertisement procedures, some of which are fixed in this commit. * zebra/interface.c * if_zebra_new_hook(): update to treat -1 as "uninitialized" * nd_dump_vty(): idem * zebra/rtadv.c * rtadv_send_packet(): update processing of "router lifetime" field, "home agent" option and "home agent lifetime" field to conform to RFC6275 better * ipv6_nd_ra_interval_msec(): update MaxRtrAdvInterval range check, make sure it never exceeds (initialized) AdvDefaultLifetime * ipv6_nd_ra_interval(): idem * ipv6_nd_ra_lifetime(): update AdvDefaultLifetime range check, make sure it never falls below MaxRtrAdvInterval * ipv6_nd_homeagent_lifetime(): update HomeAgentLifetime range check * no_ipv6_nd_ra_lifetime(): update to treat -1 as "uninitialized" * no_ipv6_nd_homeagent_lifetime(): idem * rtadv_config_write(): idem
2012-01-26zebra: fix output of IPv6 ND RA optionsDenis Ovsienko
The following options could be configured for an interface, but were never visible in the config text: ipv6 nd adv-interval-option ipv6 nd home-agent-preference ipv6 nd home-agent-lifetime ipv6 nd home-agent-config-flag
2012-01-23zebra: fix recent MP-BGP commits for FreeBSDDenis Ovsienko
2012-01-23zebra: Removal of the following warning messagesG.Balaji
warning: too many arguments for format [-Wformat-extra-args]
2012-01-23zebra: IPv6 MP-BGP Routes addition and deletionG.Balaji
This patch contains the following: 1. Addition of IPv6 SAFI_MULTICAST BGP routes into the RTM's RIB. 2. Deletion of IPv6 SAFI_MULTICAST BGP routes from the RTM's RIB.
2012-01-23zebra: IPv4 MP-BGP Routes addition and deletionG.Balaji
This patch contains the following: 1. Addition of IPv4 SAFI_MULTICAST BGP routes into the RTM's RIB. 2. Deletion of IPv4 SAFI_MULTICAST BGP routes from the RTM's RIB.
2012-01-20zebra: include MTU option in RA on request (BZ#665)Denis Ovsienko
This implements a new "ipv6 nd mtu <1-65535>" interface-level command. * doc/ipv6.texi: add description * zebra/rtadv.c * rtadv_send_packet(): send option type 5, when configured * ipv6_nd_mtu(): new VTY helper * no_ipv6_nd_mtu(): ditto * rtadv_config_write(): add new option * rtadv_init(): list new helpers
2012-01-06general: remove inline qualifiers and move in-header functions to objectsPaul Jakma
* (general) Move functions in headers into files, to be compiled into shared object files. Remove inline qualifier from functions. Let the compiler do the work.
2012-01-02zebra: fix IPv6 RA wrt interface removal (BZ#480)Denis Ovsienko
2012-01-02zebra: fix ifindex test condition (BZ#487)Matthias Ferdinand
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.
2012-01-02zebra: ZEBRA_HELLO and mopping up routes (BZ#448)Vyacheslav Trushkin
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.
2011-12-18fix set never used warningsStephen Hemminger
(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
2011-12-13lib: put route_types.txt to real useDavid Lamparter
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. Conflicts: lib/route_types.awk
2011-12-13zebra: fix redistribution of new protocolsDavid Lamparter
redistribute is currently limited to "known" protocols. there is no reason for this limitation, so, remove it.
2011-12-13rib: default distance value for new protocols (v2)David Lamparter
adding protocols and forgetting to update zebra_rib.c currently causes a beyond end of array access for the default distance value. fix by making 150 the default distance for unknown routing protocols. 150 is higher than all other IGPs but lower than iBGP (200)
2011-12-13zebra: set the interface link-layer socket addressTom Goff
* kernel_socket.c: (ifm_read) The reorganization from commit 6fe70d1b35c189cb1e488b2c26551ba7baac6148 removed setting the interface link-layer socket address structure on routing socket platforms. This restores saving the link-layer information because it might be used elsewhere: rtm_write() when no gateway is given, if_dump_vty() and rtadv_send_packet().
2011-12-13zebra: spellingDenis Ovsienko
2011-12-13build: delete .cvsignore filesDenis Ovsienko
2011-12-13quagga: option "-z" ("--socket <path>") addedVyacheslav Trushkin
All daemons modified to support custom path to zserv socket. lib: generalize a zclient connection zclient_socket_connect added. zclient_socket and zclient_socket_un were hidden under static expression. "zclient_serv_path_set" modified.
2011-12-07zebra: fix warnings in forward procStephen Hemminger
Check result of fgets(), and don't set variable that is never used.
2011-09-27zebra: add missing includesDenis Ovsienko
2011-09-27zebra: fix loss of metric for Linux routesDmitry Popov
* rt_netlink.c * netlink_route_change(): fetch metric information like netlink_routing_table() does and pass it further
2011-04-13zebra: trivial warning fixPaul Jakma
* zebra_routemap.c: (route_set_src) get rid of the dummy family variable.
2010-08-19Zebra zserv: bogus conditionalStephen Hemminger
This looks like a bug in original code from misunderstanding of C rules of evaluation.
2010-05-05zebra: fix infinite loop when deleting an interfaceRoman Hoog Antink
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>
2009-12-21zebra: change router-id selection algoStephen Hemminger
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
2009-12-10zebra: deal with irdp compile warningsStephen Hemminger
* 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
2009-12-09zebra: cleanup RIB meta queue codeStephen Hemminger
* zebra/zebra_rib.c * rib_queue_add(): indent comments and simplify debug code * rib_queue_init(): remove unneeded assert() calls and extra return statements
2009-12-08zebra: fix more warnings in rtadvStephen Hemminger
* 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
2009-12-08Merge branch 'master' of ssh://code.quagga.net/var/lib/git/quaggaDenis Ovsienko
2009-12-08zebra: fix more compiler warningsStephen Hemminger
* 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
2009-12-08zebra: remove unused function to fix warningStephen Hemminger
* zebra/interface.c * if_supported_family(): sayonara
2009-12-03zebra: handle RTF_CLONING removal from FreeBSD 8.0David Ward
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.
2009-12-03zebra: fix argument reference in strncpy() call for BSDheasley
2009-12-03zebra: fix RIB debug message for IPv6David Ward
Apply changes from commit f304cb48f0d7d0ff8f36e7aca8293141a9fa9e60 to rib_queue_add. Also includes spelling fixes.
2009-12-03zebra: make declaration const in rtm_flag_dump()Tom Goff
* kernel_socket.c: (rtm_flag_dump) Use a const message pointer to be in sync with commit ce0db9cb11c0bc2e7f89a7d042e50afa495556b4.
2009-09-01zebra: Fix router advertisements for non-Ethernet link layer addressesDavid Ward
* 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
2009-08-28zebra: Add an example config file for testzebraPaul Jakma
* testrib.conf: Example config file for testzebra
2009-08-28zebra: test_main.c should be a bit more helpful about its usagePaul Jakma
* test_main.c: If required arguments are missing, say that.
2009-08-13all: check return value from daemon() callStephen Hemminger
* */*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.
2009-07-28[zebra] Fix crash in test_zebraPaul Jakma
* 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.
2009-07-24[zebra] do not touch socket before pidfile lockingDenis Ovsienko
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).
2009-07-21[zebra] Silence noisy process_subqChris Caputo
zebra_rib.c: process_subq(): #ifdef out debug code.
2009-06-24zebra: Static route does not reach kernel.Joakim Tjernlund
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>
2009-06-23[zebra] linux policy routing support with ipv6Mathieu Goessens
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
2009-06-23RFC 4191 Default Router Preference support for router advertisementsChris Caputo
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>
2009-06-19[cleanup] convert bzero() deprecated by POSIX to memset()Jeremy Jackson
autoscan 2.62 complains about bzero(), so a good fix nowadays is to just replace it.
2009-06-18[daemons/cleanup] Remove disabled log_mode argument support.Jeremy Jackson
* */*main.c: Seems that the actual code was removed previously, but the argument processing code remained.
2009-06-18[zebra/cleanup] make message table read onlyStephen Hemminger
2009-06-18[zebra] Remove unused structure elementStephen Hemminger