summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | ospf6d: Have ospf6d cleanup when it terminates normallyTom Goff2012-01-029-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A clean exit makes it easier to use memory debuggers. * ospf6_asbr.c: (ospf6_asbr_terminate) Add a function to do route map cleanup. * ospf6_lsa.c: (ospf6_lsa_terminate) Add a function to cleanup the lsa handler vector. * ospf6_main.c: (ospf6_exit) Add an function that causes ospf6d to gracefully exit. * ospf6_message.c: (ospf6_message_terminate) Add a function that frees the send and receive buffers. * ospf6_top.c: (ospf6_delete) Enable the ospf6_delete() function. Disable ospf6 before freeing everything. Signed-off-by: Vyacheslav Trushkin <me@dogonthesun.net> Conflicts: ospf6d/ospf6_lsa.h
| | * | lib: Add a function to delete all interfacesTom Goff2012-01-022-0/+19
| | | | | | | | | | | | | | | | | | | | if.c: (if_terminate) This adds a cleanup function that can be called when a daemon exits, similar to vty_terminate().
| | * | ospf6d: add verifying user's privilegesVyacheslav Trushkin2012-01-021-0/+7
| | | |
| | * | ospfd: fix bug in NSSA ABR status checkDenis Ovsienko2012-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf_abr.c * ospf_abr_nssa_am_elected(): feed "best" instead of "address of best" into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr field of the structures to get better typed pointers
| | * | lib: address type-punned pointers in prefix_same()Denis Ovsienko2012-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | IPV4_ADDR_SAME() wasn't passed the right union member, this could cause a bug due to strict-aliasing. IPV6_ADDR_SAME() case got its fix before the error could be created by macro upgrade.
| | * | bgpd: justify checks for IPv4 class D/EDenis Ovsienko2012-01-023-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/prefix.h * IPV4_CLASS_DE(): make consistent with counterpart macros * bgp_packet.c * bgp_open_receive(): test using macro instead of ">=" * bgp_route.c * bgp_update_rsclient(): idem * bgp_update_main(): idem
| | * | ospfd: fix packet reception for FreeBSD 10.Dmitrij Tejblum2012-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf_packet.c (ospf_recv_packet): FreeBSD, starting from version 10, will not subtract the IP header size from ip_len. This is the patch from FreeBSD's ports/net/quagga/files/patch-ospfd__ospf_packet.c, by Boris Kovalenko.
| | * | zebra: ZEBRA_HELLO and mopping up routes (BZ#448)Vyacheslav Trushkin2012-01-025-2/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | lib: fix compile warnings from set-never-usedStephen Hemminger2012-01-021-6/+0
| | | | | | | | | | | | | | | | The if_dump code had empty loop, that caused set-never-used warning.
| | * | Revert "lib: address -Wunused-but-set-variable"Denis Ovsienko2012-01-024-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Stephen Hemminger's commits contain all the changes and several other warning fixes. This reverts commit 6947dbebdc91b6272f8107a6e0dd211457438606.
| | * | lib: fix SMUX compiler warningsStephen Hemminger2012-01-021-4/+3
| | | | | | | | | | | | | | | | | | | | Make progname a string, and cast when calling asn1. Remove variable set but never used.
| | * | zebra: fix warnings in forward procStephen Hemminger2012-01-021-5/+4
| | | | | | | | | | | | | | | | | | | | Check result of fgets(), and don't set variable that is never used.
| | * | bgpd: cleanup privs on terminationStephen Hemminger2012-01-021-0/+1
| | | | | | | | | | | | | | | | | | | | When doing valgrind testing, the privledges from zprivs_init() need to be cleaned up on exit.
| | * | ospfd: remove unused codeStephen Hemminger2012-01-025-101/+6
| | | | | | | | | | | | | | | | | | | | The code for nssa_range and other bits that were written but never used.
| | * | bgpd: store nexthop info for redistributed IPV6 routesStephen Hemminger2012-01-023-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BGP was ignoring nexthop info for static and other redistributed routes for IPv6. Build extra attribute info to store the nexthop. See also: https://bugzilla.vyatta.com/show_bug.cgi?id=6073
| | * | ospfd: avoid redundant lookup in ospf_redistribute_withdrawStephen Hemminger2012-01-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old algorithim looked up every node twice as it withdrew the entry. It looks up entry once in redistribute_withdraw, then looks it up again info_delete. Use result of first lookup to do the free directly. This may explain the slow performance observed in https://bugzilla.vyatta.com/show_bug.cgi?id=4421
| | * | lib: fix memory leak on connect() failureStephen Hemminger2012-01-021-12/+11
| | | | | | | | | | | | | | | | | | | | Change sockunion_log() to not use strdup(). This fixes a small memory leak that occurs on every failed connect(), and is simpler/cleaner.
| | * | lib: call filter delete hook before freeing access listStephen Hemminger2012-01-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The delete_hook was being run after calling access list delete function. This would cause ospf to dereference a NULL, in ospf_filter_update because 'access->name' was already freed. See also: https://bugzilla.vyatta.com/show_bug.cgi?id=7654
| | * | lib: fix type-punning in ip_masklen()Denis Ovsienko2012-01-021-2/+7
| | | | | | | | | | | | | | | | | | | | ip_masklen() was likely to return incorrect results after being compiled with -fstrict-aliasing (-O2, -O3, -Os)
| | * | lib: optimize ip_masklen()Denis Ovsienko2012-01-021-25/+2076
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new implementation makes use of a 64KB mapping table, which makes it possible to compute masklen faster and with constant execution time. The map also allows for additional version of the function, which can detect errors in input argument. The previous implementation had a variable cost of execution, which depended on masklen in a non-linear manner, and at its worst (/31) was 4 times slower, than the new implementation. The only case of old function just slightly outperforming the new one is /0, which is of little practical interest.
| | * | Revert "lib: optimize apply_mask_ipv6()"Denis Ovsienko2012-01-011-7/+17
| | | | | | | | | | | | | | | | | | | | Experience with IPv4 counterpart of this function suggests, that this way of type-punning is likely to cause errors.
| | * | ospfd: more info in LSA checksum warning (BZ#685)Jaroslav Fojtik2011-12-211-2/+7
| | | |
| | * | zebra: spellingDenis Ovsienko2011-12-131-2/+2
| | | |
| | * | build: delete .cvsignore filesDenis Ovsienko2011-12-1327-299/+0
| | | |
| | * | ospfd: spellingDenis Ovsienko2011-12-131-2/+2
| | | |
| | * | lib: clearing zclient.c for some cases of buildingVyacheslav Trushkin2011-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | lib/zclient.c: using of HAVE_TCP_ZEBRA in zclient_socket_* definitions extended by else clause.
| | * | quagga: option "-z" ("--socket <path>") addedVyacheslav Trushkin2011-12-1312-52/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | isisd: indent longopts arrayVyacheslav Trushkin2011-12-131-9/+9
| | | |
| | * | bgpd: implement 'match probability' in route-mapsVyacheslav Trushkin2011-12-131-1/+105
| | | | | | | | | | | | | | | | | | | | New clause 'match probability <percentage value>' was added in route-maps (bgpd/bgp_routemap.c modified).
| | * | ospf6d: justify multicast group managementVyacheslav Trushkin2011-12-133-82/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf6_network.[ch] * ospf6_sso(): new function supersedes ospf6_join_allspfrouters(), ospf6_leave_allspfrouters(), ospf6_join_alldrouters() and ospf6_leave_alldrouters() * ospf6_interface.c * ospf6_interface_state_change(): update respectively * interface_up(): ditto * interface_down(): ditto
| | * | ripngd: limit max of "timers basic" to 65535 as documentedUlrich Weber2011-12-131-21/+3
| | | | | | | | | | | | | | | | and use VTY_GET_INTEGER_RANGE instead of calling strtoul
| | * | bgp: use VTY_GET_INTEGER_RANGE() in bgp_clear()Ulrich Weber2011-12-131-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | Second patch replaces "VTY_GET_LONG ("AS", as_ul, arg);" by "VTY_GET_INTEGER_RANGE ("AS", as, arg, 1, BGP_AS4_MAX);" as done in all other code, which parses AS numbers.
| | * | ospf6d: implement 'match interface' for route-mapsVyacheslav Trushkin2011-12-132-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ospf6_routemap_rule_match_interface* was imported from ospfd daemon with minor changes. new CLI options defined. `ospf6_routemap_rule_match_interface' was changed to support IPv6 (ospfv3) route's external information.
| | * | doc: rectify "match ip next-hop" in ripd (BZ#537)Roderick Schertler2011-11-211-4/+4
| | | |
| | * | bgpd: fix AS4_PATH attr flag check (BZ#676)Denis Ovsienko2011-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AS_PATH is a well-known, transitive path attribute and cannot be flagged as "Partial". This is what commit 77a20b8af32c926176f8492a086d9e4ec670496b implemented, but it did not account, that bgp_attr_aspath() is also used to process AS4_PATH, which is an optional, transitive path attribute and as such may be flagged as "Partial". This change justfies the test condition.
| | * | bgpd: fix 2 more cases of length error reportingDenis Ovsienko2011-11-211-6/+8
| | | | | | | | | | | | | | | | | | | | * bgp_attr.c (bgp_attr_originator_id, bgp_attr_cluster_list): use bgp_notify_send_with_data()
| | * | lib: use prefix bit length macrosDenis Ovsienko2011-11-211-7/+7
| | | |
| | * | ospfd: use IS_LSA_SELF() where appropriateDenis Ovsienko2011-11-211-7/+7
| | | |
| | * | bgpd: rewrite attr flag error loggingDenis Ovsienko2011-11-211-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_attr.c * attr_flag_str: new message list * bgp_attr_flags_diagnose(): new function, implements previously added error logging in a generic way * bgp_attr_origin(): use bgp_attr_flags_diagnose() * bgp_attr_nexthop(): ditto * bgp_attr_med(): ditto * bgp_attr_local_pref(): ditto * bgp_attr_atomic(): ditto * bgp_attr_originator_id(): ditto * bgp_attr_cluster_list(): ditto * bgp_mp_reach_parse(): ditto * bgp_mp_unreach_parse(): ditto
| | * | ospfd: spelling/format fixDenis Ovsienko2011-11-211-1/+1
| | | |
| | * | bgpd: check AGGREGATOR attr flags (BZ#678)Denis Ovsienko2011-11-211-0/+21
| | | | | | | | | | | | | | | | | | | | * bgp_attr.c * bgp_attr_aggregator(): check Optional/Transitive flag bits
| | * | lib: optimize apply_mask_ipv6()Denis Ovsienko2011-11-211-17/+7
| | | |
| | * | lib: optimize apply_mask_ipv4()Denis Ovsienko2011-11-211-18/+3
| | | |
| | * | bgpd: fix error message in bgp_attr_aspath()Denis Ovsienko2011-11-211-1/+1
| | | |
| | * | lib: make masklen2ip6() safer and fasterDenis Ovsienko2011-11-212-17/+136
| | | |
| | * | vty_serv_sock_family unusedStephen Hemminger2011-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | If the vty_serv_sock_addrinfo is being used, then vty_serv_sock_family is unsed. Fix by adjusting ifdef/else/endif
| | * | ospf6d: decode message type with LOOKUP()Denis Ovsienko2011-11-212-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf6_message.h * OSPF6_MESSAGE_TYPE_CANONICAL(): dismiss * OSPF6_MESSAGE_TYPE_NAME(): dismiss * ospf6_message.c * ospf6_message_type_str: rewrite as a message list, add max value * ospf6_packet_examin(): update to use LOOKUP() * ospf6_receive(): idem * ospf6_send(): idem
| | * | lib: address -Wunused-but-set-variableDenis Ovsienko2011-11-214-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * if.c * if_dump(): 'node', 'c' * distribute.c * distribute_list_all(): 'dist' * distribute_list(): 'dist' * districute_list_prefix_all(): 'dist' * if_rmap.c * if_rmap(): 'if_rmap' * vty.c * vty_accept(): 'vty'
| | * | lib: spellingDenis Ovsienko2011-11-211-10/+10
| | | |
| | * | lib: add sockopt helper for setting IPV6_V6ONLY and use itDavid Lamparter2011-11-214-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.