summaryrefslogtreecommitdiffstats
path: root/zebra
Commit message (Collapse)AuthorAgeFilesLines
* zebra: fix infinite loop when deleting an interfaceRoman Hoog Antink2011-01-191-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: fix interface deletion bug introduced by ptp address supportDavid Lamparter2010-03-271-7/+7
| | | | | | | | | 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.
* zebra: labels, scopes and preference are IPv4 onlyquagga_1.1.0-dn42.11-rc1David Lamparter2010-02-201-6/+11
| | | | | | | 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.
* Merge branch 'current' into dn42quagga_1.1.0-dn42.11-rc0David Lamparter2010-02-052-3/+10
|\
| * lib: get rid of extraneous output with vty_prependDavid Lamparter2010-02-052-3/+10
| | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'patches/hpp_rdnss' into dn42David Lamparter2010-02-052-8/+10
|\ \
| * | zebra: fix rdnss on NetBSDDavid Lamparter2010-02-052-8/+10
| | | | | | | | | | | | | | | NetBSD ships struct nd_opt_rdnss in netinet/icmp6.h. fix zebra RDNSS to detect and use that if present.
* | | Merge branch 'current' into dn42David Lamparter2010-02-057-428/+396
|\ \ \ | | |/ | |/|
| * | zebra: rib: support blackhole kernel deletion notificationDavid Lamparter2010-02-051-0/+12
| | | | | | | | | | | | | | | properly receive the deletion notify for blackhole routes and mark the rib entry.
| * | zebra: consider all nexthops when looking for a gateway matchTom Goff2010-02-051-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * | zebra: Don't delete too many routes.Joakim Tjernlund2010-02-051-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | zebra: netlink: grab blackhole list from kernelDavid Lamparter2010-02-052-11/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
| * | zebra: cleanup blackhole supportDavid Lamparter2010-02-057-310/+239
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | zebra: netlink: kill netlink_routeDavid Lamparter2010-02-051-77/+40
| | | | | | | | | | | | | | | kernel_delete_ipv6_old is the only user of netlink_route. kill the latter, let it be assimilated by the former.
* | | Merge branch 'patches/smallones' into dn42David Lamparter2010-02-054-11/+44
|\ \ \
| * | | zebra: rib update in background and recursive routesStephen Hemminger2010-02-054-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'merged/pimd' into dn42David Lamparter2010-02-042-6/+181
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/route_types.txt
| * \ \ \ Merge remote branch 'qpimd/pim' into merged/pimdDavid Lamparter2010-02-042-6/+181
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.ac lib/zebra.h vtysh/vtysh.c
| | * | | [pim] Initial pim 0.155Everton Marques2009-10-022-6/+181
| | | | |
* | | | | Merge branch 'merged/ospfd' into dn42David Lamparter2010-02-041-0/+52
|\ \ \ \ \
| * | | | | zebra, lib: Add ZEBRA_INTERFACE_UNNUMBERED interface flag.Joakim Tjernlund2010-02-041-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'patches/hpp_rdnss' into dn42David Lamparter2010-02-044-0/+170
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | zebra: fix rtadv/rdnss vtysh breakageDavid Lamparter2010-02-041-2/+2
| | | | | |
| * | | | | IPv6 Router Advertisement Option for RDNSSHagen Paul Pfeifer2010-02-034-0/+170
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv6 Router Advertisement Option for DNS Configuration (RFC 5006)[1] introduced a mechanism to hand out recursive DNS server addresses via router advertisement (RA) messages. This simple combines the IPv6 stateless address auto-configuration process with the ability to get DNS server information - in one message. This options frees many environments from operating an additional DHCPv6 server that provides such information. This patch extends quagga by the ability to generate and transport RDNS addresses. RDNSS options are currently supported at radvd(1) and the Linux Kernel by handover this information to the user-space (via netlink socket). A simple RA configuration with two RDNS entries can be enabled via no ipv6 nd suppress-ra ipv6 nd prefix 2001:db8::/64 ipv6 nd rdnss 2001:db8::1 ipv6 nd rdnss 2001:db8::2 It is additionally possible to specify the lifetime of an RDNSS option as stated in [1] section 4.1. The default is infinity lifetime (0xfffffff) as it serves the most common application areas. ip nd rdnss 2001:db8::1 300000 [1] http://tools.ietf.org/html/rfc5006 Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
* | | | | Merge branch 'patches/smallones' into dn42David Lamparter2010-02-041-0/+12
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| |
| * | | zebra: set the interface link-layer socket addressTom Goff2010-02-031-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | * 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().
* | | lib: fs namespacing 4/5: add -N command-line parameterDavid Lamparter2010-02-041-2/+7
| | | | | | | | | | | | | | | this adds a -N option to all daemons which specifies the namespace name to include in all paths through path_set_namespace
* | | lib: fs namespacing 3/5: use path_state for zserv socketDavid Lamparter2010-02-041-1/+2
| | | | | | | | | | | | | | | | | | 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 2/5: use path_state for vty pathsDavid Lamparter2010-02-044-7/+23
| | | | | | | | | | | | | | | | | | use the path_state helper functions for determining vty socket paths in all quagga daemons. this allows for running multiple daemons if a namespace name is set.
* | | zebra: NetBSD: support setting IPSRCSEL preferenceDavid Lamparter2010-02-042-11/+78
| | | | | | | | | | | | | | | | | | | | | | | | add 'ip address X preference Y' vty command and appropriate infrastructure for setting it through ioctl(SIOCSIFADDRPREF). 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.
* | | zebra: NetBSD: get IPSRCSEL preference value from kernelDavid Lamparter2010-02-048-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | zebra: configure PtP address on ifaliasreq systemsDavid Lamparter2010-02-041-5/+41
| | | | | | | | | | | | | | | | | | | | | support configuring a point-to-point address on systems using ioctl / struct ifaliasreq. error out when interface/address type mismatch. tested on FreeBSD 8.0-RELEASE.
* | | zebra: add 'ip address ... scope WORD' vty+netlinkDavid Lamparter2010-02-042-14/+81
| | | | | | | | | | | | | | | add a new "scope WORD" flag on ip address creation commands to set the address's scope.
* | | netlink: process scope value, save itDavid Lamparter2010-02-039-16/+25
| | | | | | | | | | | | | | | add struct connected "scope" field, fill it from kernel data and display it in "show interface" address list.
* | | netlink: display scope value in debugDavid Lamparter2010-02-033-0/+53
| | | | | | | | | | | | | | | add functions to convert scope value from int to string and back. put them to use to display address scope in debug output.
* | | zebra: shorten code for command helpDavid Lamparter2010-02-031-25/+17
| | | | | | | | | | | | (preparational cleanup...)
* | | zebra: add '[no] ip address A.B.C.D peer A.B.C.D/M'David Lamparter2010-02-031-15/+91
| | | | | | | | | | | | | | | introduce a new command to configure a Point-to-Point address on an interface.
* | | zebra: netlink backend support setting a P-t-P addressDavid Lamparter2010-02-031-4/+13
| | | | | | | | | | | | | | | | | | add a few bits to properly set a pointopoint address via netlink. the structures have all the neccessary support, just need to send the proper message bits to the kernel.
* | | zebra: add connected_check_ptp infrastructureDavid Lamparter2010-02-033-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | add a connected_check_ptp function which does the same as connected_check, but takes an additional peer prefix argument. also fix related prefixlen mixup in PtP addresses (the local part of a PtP address always is /32, but previously the peer mask got copied.)
* | | zebra: accept "connected" routes from protocols other than ConnectedDavid Lamparter2010-02-031-1/+2
| | | | | | | | | | | | | | | OLSR injects a /32 route for each connected router. treat these routes as connected for route nexthop/interface resolution.
* | | zebra: fix bug #486 (lingering after IP address deletion)David Lamparter2010-02-031-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zebra address bookkeeping is a mess. this is just a workaround to have IPv4 address deletion somewhat working on Linux. the if_unset_prefix call is synchronous, when it returns success the address deletion completed successfully. this is either signaled by a netlink ACK or by an OK return value from ioctl(). [cherry-picked from 48f685f3...]
* | | lib: put route_types.txt to real useDavid Lamparter2010-02-031-63/+15
| | | | | | | | | | | | | | | | | | | | | 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.
* | | zebra: fix redistribution of new protocolsDavid Lamparter2010-02-031-34/+12
| | | | | | | | | | | | | | | redistribute is currently limited to "known" protocols. there is no reason for this limitation, so, remove it.
* | | rib: default distance value for new protocols (v2)David Lamparter2010-02-031-1/+5
|/ / | | | | | | | | | | | | | | 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)
* | 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
* | 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