Commit Graph

133 Commits

Author SHA1 Message Date
paul
7f352b860e 2004-02-19 Sowmini Varadhan <sowmini.varadhan@sun.com>
* ospf_abr.c: (ospf_abr_update_aggregate) UNH 3.12b,c, address range
          should be configured with the highest cost path within the range,
          not lowest.
2004-02-19 19:37:47 +00:00
paul
940b01aa6a 2004-02-17 Paul Jakma <paul@dishone.st>
* ospf_zebra.c: (ospf_interface_delete) Do not delete the interface
          params, nor the interface structure, if an interface delete
          message is received from zebra.
        * ospf_interface.c: (ospf_if_delete_hook) Delete the interface
          params and interface, ie that which was previously removed in
          (ospf_interface_delete) above.
2004-02-17 20:07:30 +00:00
gdt
6a8da8521d add an XXX at a point where ifindex_num is assumed to be one w/o
checking.
2004-02-13 17:40:51 +00:00
hasso
2db3d05da3 Don't crash when attempting to read path->oi->ifp if oi doesn't exist any
more. I'm not sure if this read should be attempted at all, but I'm trying
to keep code safe AND stable.
2004-02-11 21:52:13 +00:00
hasso
cb05eb285f Fix by Vadim Suraev - [zebra 14710] #6. 2004-02-11 21:10:19 +00:00
paul
2d75d05218 2004-01-19 Paul Jakma <paul@dishone.st>
* tests/test-sig.c: New file, regression test for sigevents.
        * lib/Makefile.am: add sigevent.{c,h}
        * (isis|rip|ripng|ospf|ospf6|bgp)d/\1_main.c: modify for sigevents.
        * zebra/main.c: ditto.
2004-01-19 21:31:15 +00:00
gdt
af273652d5 {lib,ospfd,ospfapi}/Makefile.am:
Use pkginclude_HEADERS rather than include_HEADERS to place includes
in ${prefix}/include/quaggainstead of polluting ${prefix}/include.
2003-12-08 18:12:34 +00:00
paul
239aecc01c 2003-12-08 Mattias Amnefelt <mattiasa@kth.se?
* ospf_packet.c: (ospf_recv_packet) OpenBSD now leaves iph.ip_len
          network byte order. (bugzilla #67).
2003-12-08 10:34:54 +00:00
paul
29226d4ad5 2003-12-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospfd/ospf_flood.c: (ospf_flood_through_interface) fix compile
	  warning.
2003-12-06 17:10:11 +00:00
gdt
8f40e891b3 * ospfd.c (ospf_network_match_iface): Rewrite code for clarity
while trying not to change semantics.  Add ifdefed-out code to
	avoid matching ppp interfaces whose destination address does not
	also match the prefix under consideration, to help out people with
	problems due to as-yet-unfixed bugs with p2p interfaces coming and
	going.
2003-12-05 14:01:43 +00:00
gdt
d6b72f7ab1 Add support for --enable-exampledir to specify where to place example
files, defaulting to sysconfdir (matching previous behavior).

This is needed to support (cleanly) NetBSD pkgsrc, which requires that
example config files go in $(prefix)/share/examples/pkgname, rather
than in $(prefix)/etc/pkgname.
2003-12-03 17:24:27 +00:00
paul
b5f2c1267e 2003-11-10 Claus Endres <claus@endresconsulting.com>
* ospfd/ospf_interface.c: (ospf_if_table_lookup) grab reference to
          rn->info /before/ calling route_unlock_node() as some systems
          may deliberately poison freed memory, eg FreeBSD 5.1.
          see [quagga-dev 417].
2003-11-10 23:56:29 +00:00
paul
3738d8cab7 2003-10-27 Simon <lists@routemeister.net>
* ospfd/ospfd.c: if_is_pointopoint() takes (struct interface *), was
          being called with struct connected. Change to co->ifp.
2003-10-27 22:02:00 +00:00
paul
70cf3f1089 2003-10-27 kamatchi soundaram <kamatchi@tdd.sj.nec.com>
* ospfd/ospfd.c: Do not increment act_int for an area, as it is done
          by ospf_ism.c::ism_change_state() - results in incorrect figure
          for active interfaces in an area.
2003-10-27 21:53:38 +00:00
paul
04bd484bf2 2003-10-24 Paul Jakma <paul@dishone.st>
* configure.ac: Check for fcntl()
        * {bgpd,ospf,ospf6d,ripd,ripngd}/Makefile.am: Install conf file via
          regular automake means, not magic install incantations, see
          bug #38.
        * lib/Makefile.am: install the headers, needed to link libzebra.a
          (and hence libospf.a, OSPF-API, etc.)
2003-10-24 04:24:39 +00:00
paul
b1809beadd 2003-10-24 sowmini.varadhan@sun.com
* ospfd/ospf_network.c: (ospf_sock_init) Exit if socket can not be
          created.
2003-10-24 00:49:17 +00:00
paul
affe1d9c7f 2003-10-15 Paul Jakma <paul@dishone.st>
* ospfd/ospf_interface: (ospf_if_lookup_table) fix compile errors
	  from previous patch. doh.
2003-10-15 21:40:57 +00:00
paul
20916fba5c 2003-10-15 Paul Jakma <paul@dishone.st>
* ospfd/ospf_interface: (ospf_if_lookup_table) new function to
          lookup oi for a given prefix in a given interfaces table of oi's.
          (ospf_if_new) use ospf_if_lookup_table to deal with zebra
          reporting new interface multiple times.
          NB: This patch is a complete plaster-band of a hack. First, why is
          zebra reporting interface events multiple times? Second, why does
          ospfd maintain so many damn lists and tables relating to oi's -
          these should be reconciled into one or two tables.
2003-10-15 21:14:20 +00:00
paul
7ddf1d6eaf 2003-10-13 sowmini.varadhan@sun.com
* ospf_lsa.h: Add OSPF_LSA_PREMATURE_AGE flag.
	* ospf_lsa.c: added better debug comments. check sequence number in
	  ospf_lsa_install. ospf_maxage_lsa_remover() checks for
 	  OSPF_LSA_PREMATURE_AGE and re-originates the lsa after ls_acks are
	  received.
	* ospf_flood.c: improve debug statement- print ls_seqnum.
2003-10-13 09:06:46 +00:00
paul
31a476c7e9 2003-09-29 Paul Jakma <paul@dishone.st>
* zebra/connected.c: revert the 'generic PtP' patch as it causes
	far too many problems. People who use FreeSWAN should investigate
	native linux ipsec.
	* zebra/rt_netlink.c: ditto
	* lib/if.c: ditto
	* ripd/ripd.h: ditto
	* ripd/ripd.c: ditto
	* ripd/rip_interface.c: ditto
	* ospfd/ospfd.c: ditto
	* ospfd/ospf_snmp.c: ditto
	* bgpd/bgp_nexthop.c: ditto
2003-09-29 19:54:53 +00:00
paul
d324181c06 2003-09-29 Paul Jakma <paul@dishone.st>
* ospfd/ospf_packet.c: Add debug output for some of the previously
	  completely silent drops of 'bad' packets.
2003-09-29 12:42:39 +00:00
paul
2ca35ddb04 2003-09-24 Thomas Giger TGC <thomas.giger@tgc.de>
* ospf_packet.c (ospf_associate_packet_vl): pass NULL struct
	  interface to ospf_if_lookup_by_local_addr() rather than the
	  receiving interface ifp, packets for VL's could come in any
	  interface. See quagga-dev 250.
2003-09-23 23:20:08 +00:00
paul
537d8ea92b 2003-08-27 Jay Fenlason <fenlason@redhat.com>
* bgpd/bgp_routemap.c: attr->med is type u_in32_t, should be
	  compared with UINT32_MAX
	* ospfd/ospfd.c: remove redundant assert
	* zebra/rtadv.c: add missing include for zebra/rib.h
2003-08-27 06:45:32 +00:00
paul
048ba1d0a9 2003-08-15 Paul Jakma <paul@dishone.st>
* ospfd/ospf_route.c: Fixup extraneous list_delete which was causing
	  SEGVs of ospfd.
2003-08-15 16:04:21 +00:00
paul
d81fadfd88 2003-08-14 Paul Jakma <paul@dishone.st>
* zebra/main.c: Fixup ZEBRA_{GROUP,USER} defines ->
	  QUAGGA_{USER,GROUP}
	* bgpd/bgp_main.c: ditto
	* ospf6d/ospf6_main.c: ditto
	* ospfd/ospf_main.c: ditto
	* ripd/rip_main.c: ditto
	* ripngd/ripng_main.c: ditto
	* zebra/main.c: ditto
2003-08-14 05:32:12 +00:00
paul
e8f2984c00 2003-08-12 Paul Jakma <paul@dishone.st>
2003-08-12 Paul Jakma <paul@dishone.st>

        * Makefile.am: redhat/zebra.* -> redhat/quagga.*
        * configure.ac: Bump autoconf prerequisite to 2.53.
          dist name zebra -> quagga.
          general Zebra -> Quagga where appropriate (ie not zebra daemon).
          User and group zebra->quagga.
          s/ZEBRA\(_VERSION\)/QUAGGA\1/.
        * bgpd/bgp_main.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/
        * lib/command.c: Update banners and s/ZEBRA\(_VERSION\)/QUAGGA\1/
        * lib/print_version.c: ditto
        * lib/version.h: s/ZEBRA\(_VERSION\)/QUAGGA\1/ and bump version.
          Change ZEBRA_URL.
        * lib/smux.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/
        * lib/vty.h: Change Zebra.conf to Quagga.conf (integrated file)
        * ospf6d/ospf6{,_main}.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/
        * ospfd/ospf_main.c: s/ZEBRA\(_VERSION\)/QUAGGA\1/
2003-08-12 13:08:31 +00:00
paul
bb8ff1e7fe 2003-08-11 Yasuyuki Haga <yasuhaga@nifty.ne.jp>
* ospfd/ospf_zebra.c: (ospf_zebra_delete) Set ifindex if no nexthop
	  supplied. log if no (ifindex || nexthop) supplied.
2003-08-12 06:00:30 +00:00
paul
d8e1d6bcc3 2003-08-10 Yasuyuki Haga <yasuhaga@nifty.ne.jp>
* ospfd/ospf_zebra.c: (ospf_zebra_delete) Do not dereference the
	ifp, it mightn't exist.
2003-08-10 04:04:41 +00:00
paul
96735eeafe 2003-08-10 amir <amir@datacore.ch>
* Add missing 'i' to getopts, short form of --pid_file.
	  see http://bugzilla.quagga.net/show_bug.cgi?id=25
2003-08-10 02:51:22 +00:00
hasso
622149ad4d Temporary "fix" for segfault. See bug #29 in bugzilla for details. 2003-08-07 09:29:13 +00:00
paul
5fdc1e5257 2003-08-06 Anders K. Pedersen <mailnews+router-quagga-dev@news.cohaesio.com>
* ospfd/ospf_vty.c: (ospf_config_write) fix output of
	passive-interface when IP has been specified - we still need to
	print the interface.
2003-08-06 22:41:29 +00:00
paul
106d2fd572 2003-08-01 Cougar <cougar@random.ee>
* lib/if.c: (if_cmp_func) new function, compare interface names in
	alphabetical order.
	(if_create) Take name as argument and add interface in sorted order.
	(if_get_by_name),(interface_cmd) fixup calls to if_create - see
	above.
	(if_init) register list comparison function.
	* lib/if.h: Add comparison function, modify if_create prototype.
	* lib/zclient.c: Modify call to if_create.
	* ospfd/ospf_interface.c: (ospf_vl_new) modify call to if_create.
	change sprintf to snprintf.
	* zebra/kernel_socket.c: (ifm_read) modify call to if_create.
2003-08-01 00:24:13 +00:00
paul
736d3441e2 2003-07-25 kamatchi soundaram <kamatchi@tdd.sj.nec.com>
* ospf_packet.c (ospf_ls_upd_send_queue_event): get next route
          node in body of the loop to avoid chance that route node
          is unlocked and deleted before the next iteration tries to
          get next route node.
2003-07-24 23:22:57 +00:00
paul
7021c425a9 2003-07-15 Paul Jakma <paul@dishone.st>
* lib/version.h: add ZEBRA_URL (unused for now)
        * lib/vty.c: CMD_ERR_NOTHING_TODO when reading conf file should not
          be fatal. slight reformating.
        * ospfd/ospf_zebra.c: ignore reject/blackhole routes if zebra sends
          these type of routes. probably should be a new type of route to
          allow daemons to more easily choose whether to redistribute them
          - rathen than just a flag (eg for reject/blackhole).
          reorder the is_prefix_default test for ZEBRA_IPV4_ROUTE_DELETE to
          avoid the inverted test - slightly more readable.
        * redhat/zebra.spec.in: Add ospfapi port to services file, if
          with_ospfapi.
        * zebra/rib.h: Change nexthop types to an enum.
        * zebra/rt_netlink.c: run it through indent -nut.
          Add nexthop_types_desc[] descriptive array for nexthop types.
          (netlink_route_multipath) debug statements indicate which branch
          they are in and print out nexthop type.
        * zebra/zebra_rib.c: slight reformatting.
        * zebra/zebra_vty.c: Pass ZEBRA_FLAG_BLACKHOLE flag to
          static_add_ipv4() if Null0 route is configured. print out Null0 if
          STATIC_IPV4_BLACKHOLE route, and ignore flags (shouldnt be
          possible to set flags from vty) for config and show route.
2003-07-15 12:52:22 +00:00
paul
8fc0f64b14 2003-07-13 Paul Jakma <paul@dishone.st>
* ospf_lsa.c: fix up some places where an NSSA specific define,
	  (OSPF_LSA_LOCAL_XLT) was referenced in if statements without being
	  ifdef'ed by HAVE_NSSA.
2003-07-13 01:36:06 +00:00
paul
d4a53d583c 2003-07-12 Paul Jakma <paul@dishone.st>
* (global): Add/fixup NSSA ABR translation functionality
	* ospfd.h: Adjust the NSSA ROLE defines. Rename STATE to TRANSLATE.
	  Rename the LSA_NSSA_GET define to LSA_OPTIONS_NSSA_GET.
	* ospfd.c: Adjust to match changes to ospfd.h
	* ospf_te.c: Adjust to match change to LSA_NSSA_GET.
	* ospf_lsa.h: slights reformatting.
	  Add new NSSA functions, ospf_translated_nssa_compare() (not
	  currently used), ospf_translated_nssa_refresh() and
	  ospf_translated_nssa_originate().
	* ospf_lsa.c: Implemented aforementioned new functions. Fix up
	  several NSSA hooks to /not/ be called for Type-5s which are
	  translated. Add additional hooks. Set the ROUTER_LSA_NT bit in
	  router-lsa flags if ABR does translation. New function,
	  ospf_lsa_translated_nssa_new() implemented. Dont register
	  translated LSAs for refreshing - instead we implicitly rely on
	  the ASBR refreshing the Type-7, and refresh the translated Type-5
	  at the same time. Some minor reformatting. Extra debug info added.
	  Also, existing debug statements modified to report LSA Id.
	* ospf_flood.c: call ospf_translated_nssa_refresh() when refreshing
	  Type-7. minor reformatting.
	* ospf_dump.c: Dump NSSA LSAs.
	* ospf_asbr.h: slight reformatting. Export
	  ospf_external_route_lookup() (though, not used. probably will
          undo this).
        * ospf_abr.c: Slight reformatting in many places. Update to match
          ospfd.h changes.
          (ospf_abr_translate_nssa): make it work, using the new ospf_lsa
	  translation functions.
	  (Several places): change struct prefix * to struct prefix_ipv4 *.
	  (might as well do the casts at higher levels). Add more debug
	  info.
	  (ospf_abr_announce_stub_defaults): announce default to NSSA areas
	  too.
	  (ospf_abr_announce_nssa_defaults): do nothing. this function
          probably should die. (see ospf_abr_announce_stub_defaults).
	  (ospf_abr_task_timer): run NSSA tasks.
2003-07-12 21:30:57 +00:00
paul
afbacce120 2003-07-09 Paul Jakma <paul@dishone.st>
* ospf_apiserver.c: Add missing close bracket
2003-07-09 16:09:20 +00:00
paul
5549c6b365 2003-07-09 Paul Jakma <paul@dishone.st>
* ospfd/ospf_apiserver.c: check for NULL from ospf_lookup()
2003-07-09 15:46:33 +00:00
hasso
0c14ad88aa Don't install Type-7 LSA's into nonNSSA area. 2003-07-03 08:36:02 +00:00
paul
9d5260374a 2003-06-30 Paul Jakma <paul@dishone.st>
* (show_ip_ospf_database_header) Fix unconditional NSSA-dependent
          printf.
2003-06-30 22:46:14 +00:00
paul
93fe5c5bed 2003-06-30 Paul Jakma <paul@dishone.st>
* ospf_packet.c: (ospf_ls_upd_send_queue_event) undo fix suggested
          Mikael Lonnroth. As per Kamatchi Soundaram /
          [zebra 19590], original behaviour is correct.
2003-06-30 21:41:26 +00:00
paul
4957f4946d 2003-06-27 Paul Jakma <paul@dishone.st>
* ospf_vty.c: (global) add, unused, description array for lsa flags.
	  (show_ip_ospf_database_header): pretty print options, printf hex
          numbers as 0x, print lsa flags and note if it is a translated LSA.
          (show_lsa_detail_proc): print out OSPF_LSA_LOCAL_XLT LSAs.
	* ospf_packet.c: (ospf_write) print out destination IP in debug info
          if write fails.
2003-06-27 01:28:45 +00:00
paul
8cb90ff71d 2003-06-26: Mikael Lonnroth <gml@advancevpn.com>
* ospf_packet.c: (ospf_ls_upd_send_queue_event) clean up list node
	  and unlock lsa if we break early. (eg packet size too large).
2003-06-26 03:00:40 +00:00
paul
b0a053be42 2003-06-19 Paul Jakma <paul@dishone.st>
* ospf_vty.c (ospf_area_stub_no_summary): fix typo.
	  (ospf_area_nssa_cmd_handler): new function to handle the
	  area.*nssa commands.
	  (ospf_area_nssa_cmd): changed to call ospf_area_nssa_cmd_handler
	  (ospf_area_nssa_translate_cmd) ditto
	  (ospf_area_nssa_translate_cmd): changed from ALIAS to defun, call
	  ospf_area_nssa_cmd_handler
	  (ospf_area_nssa_translate_no_summary_cmd): ditto
	  (no_ospf_area_nssa_cmd): call ospf_schedule_abr_task()
	  (show_ip_ospf_area): Formatting cleanups. Properly print out NSSA
          area configuration.
	  show_router_lsa_detail: Add missing newline
	  (show_network_lsa_detail): ditto
	  (show_summary_lsa_detail): ditto
	  (show_summary_asbr_lsa_detail): ditto
	  (show_ip_ospf_route_router): fix spacing
	  (config_write_ospf_area): actually write out proper state for NSSA
	  area.
2003-06-22 09:04:47 +00:00
paul
e2c6c153d1 2003-06-19 Paul Jakma <paul@dishone.st>
* ospf_abr.c (ospf_abr_nssa_am_elected): new function.
	  Look through LSDB for an area and try determine whether other
	  routers are more 'electable' than this router. Presumes caller
	  has checked Role.
	  (ospf_abr_nssa_check_status): new function. check any NSSA related
          status changes. At present determines NSSATranslatorState should
	  be enabled or disabled.
	  (ospf_abr_announce_network_to_area): remove the redundant
	  call to ospf_abr_announce_network_to_area() (as per Vadim,
	  [zebra 14710], problem 7).
	  (global): Update NSSATranslator to NSSATranslatorState as per
	  ospfd.h changes
	  (ospf_abr_announce_nssa_defaults): call
	  ospf_abr_announce_network_to_area() to inject default summaries.
	  (ospf_abr_nssa_task): undo commented out calls to
	  ospf_abr_prepare_aggregates() and ospf_abr_send_nssa_aggregates(),
	  if they're borked, lets fix them.
	  (ospf_abr_task): remove call to ospf_abr_nssa_task() - move this
	  to the timer scheduler.
	  (ospf_abr_task_timer): call ospf_abr_nssa_task() and
	  ospf_abr_nssa_check_status()
	  (misc): some minor reformatting.
2003-06-22 08:49:25 +00:00
paul
084c7844ae 2003-06-19 Paul Jakma <paul@dishone.st>
* ospfd.c (ospf_area_nssa_set): Set defaults for NSSA Role, State
	  and Stability Interval and no_summary.
	  (ospf_area_nssa_translator_role_(un?)set): Update to
	  NSSATranslatorRole
2003-06-22 08:35:18 +00:00
paul
464c82043a 2003-06-19 Paul Jakma <paul@dishone.st>
* ospfd.h (struct ospf_area): remove NSSATranslator. Add
	  NSSATranslatorState and NSSATranslatorStabilityInterval (currently
	  not used).
	  (global): add OSPF_NSSA_TRANS_STABLE_DEFAULT, default for
	  NSSATranslatorStabilityInterval. Update the LSA_NSSA_GET to
	  reflect struct ospf_area changes.
2003-06-22 08:32:35 +00:00
paul
6d1fab6341 2003-06-19 "Suraev, Vadim" <vadim.suraev@terayon.com>
* ospf_route.c: delete routes generated from AS-External routes if
	  there is a inter/intra route. Adds ospf_route_delete_same_ext()
	  which prunes external routes, which is called from
	  ospf_route_install() when new route table is installed.
2003-06-22 08:28:18 +00:00
paul
0c9491b304 2003-06-19 Paul Jakma <paul@dishone.st>
* ospf_lsa.h: elaborate on comment for ROUTER_LSA_NT
	  add IS_ROUTER_LSA_NT macro.
2003-06-22 08:23:01 +00:00
paul
942b6c1989 2003-06-19 Paul Jakma <paul@dishone.st>
* ospf_lsa.c (router_lsa_flags): Set the correct flags for
	  router-lsa's. Eg OSPF_FLAG_ASBR is /not/ an LSA flag, its an
	  internal ospfd flag (just happens to have same value as
	  ROUTER_LSA_EXTERNAL). Set ROUTER_LSA_EXTERNAL for ASBRs,
	  ROUTER_LSA_BORDER for ABRs and ROUTER_LSA_NT for NSSA ABRs which
	  are OSPF_NSSA_ROLE_ALWAYS translators.
2003-06-22 08:22:18 +00:00