mirror_frr/ospf6d
Donald Sharp 81e06dd3c3 ospf6d: Prevent crash in adj_ok
The adj_ok thread event is being added but not killed
when the underlying interface is deleted.  I am seeing
this crash:

OSPF6: Received signal 11 at 1636142186 (si_addr 0x0, PC 0x561d7fc42285); aborting...
OSPF6: zlog_signal+0x18c                  7f227e93519a     7ffdae024590 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: core_handler+0xe3                  7f227e97305e     7ffdae0246b0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: funlockfile+0x50                   7f227e863140     7ffdae024800 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7f227e84f000)
OSPF6:     ---- signal ----
OSPF6: need_adjacency+0x10                561d7fc42285     7ffdae024db0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: adj_ok+0x180                       561d7fc42f0b     7ffdae024dc0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: thread_call+0xc2                   7f227e989e32     7ffdae024e00 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: frr_run+0x217                      7f227e92a7f3     7ffdae024ec0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: main+0xf3                          561d7fc0f573     7ffdae024fd0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: __libc_start_main+0xea             7f227e6b0d0a     7ffdae025010 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7f227e68a000)
OSPF6: _start+0x2a                        561d7fc0f06a     7ffdae0250e0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: in thread adj_ok scheduled from ospf6d/ospf6_interface.c:678 dr_election()

The crash is in the on->ospf6_if pointer is NULL.  The only way this could
happen from what I can tell is that the event is added to the system
and then we immediately delete the interface, removing the memory
but not freeing up the adj_ok thread event.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-05 18:00:10 -04:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
Makefile build: non-recursive ospf* 2017-08-04 11:09:50 +02:00
ospf6_abr.c Merge pull request #9752 from opensourcerouting/ospf6d-nssa-ranges 2021-10-19 19:15:40 -04:00
ospf6_abr.h ospf6d: code cleanup. 2021-10-06 08:54:47 -07:00
ospf6_area.c ospf6d: Add autocomplete for area X filter-list prefix 2021-10-28 14:01:13 +03:00
ospf6_area.h ospf6d: add support for NSSA Type-7 address ranges 2021-10-05 21:25:55 -03:00
ospf6_asbr.c Merge pull request #9831 from manojvn/379909_383518 2021-10-28 20:05:16 +03:00
ospf6_asbr.h ospf6d: install summary route NULL0 as nexthop 2021-07-21 05:16:54 +00:00
ospf6_bfd.c isisd, ospf6d, pimd: set vrf_id when creating bfd sessions 2021-05-31 15:04:13 +03:00
ospf6_bfd.h ospf6d: rework BFD integration 2021-04-22 16:10:01 -03:00
ospf6_flood.c Merge pull request #9752 from opensourcerouting/ospf6d-nssa-ranges 2021-10-19 19:15:40 -04:00
ospf6_flood.h ospf6d: introduce support for Graceful Restart (restarting mode) 2021-09-16 12:26:48 -03:00
ospf6_gr_helper.c ospf6d: Do not explicitly set the thread pointer to NULL 2021-10-08 08:56:42 +03:00
ospf6_gr.c ospf6d: fix LSA name in debug message 2021-10-12 17:33:32 -03:00
ospf6_gr.h ospf6d: introduce support for Graceful Restart (restarting mode) 2021-09-16 12:26:48 -03:00
ospf6_interface.c ospf6d: Prevent crash in adj_ok 2021-11-05 18:00:10 -04:00
ospf6_interface.h ospf6d: Cleanup headers to our standard 2021-09-09 16:42:52 -04:00
ospf6_intra.c ospf6d: Do not explicitly set the thread pointer to NULL 2021-10-08 08:56:42 +03:00
ospf6_intra.h ospf6d: introduce support for Graceful Restart (restarting mode) 2021-09-16 12:26:48 -03:00
ospf6_lsa.c ospf6d: add "nssa" option to the "debug ospf6 lsa" command 2021-10-05 21:25:55 -03:00
ospf6_lsa.h ospf6d: remove unnecessary code 2021-10-05 21:21:43 -03:00
ospf6_lsdb.c ospf6d: Review comment fixes 2021-07-21 05:16:54 +00:00
ospf6_lsdb.h ospf6d: fix lock leak of using ALL_LSDB in GR helper 2021-08-22 05:26:20 -04:00
ospf6_main.c *: Drop break after using frr_help_exit() in switch/case 2021-08-25 10:49:05 +03:00
ospf6_message.c ospf6d: Prevent use after free 2021-11-05 18:00:07 -04:00
ospf6_message.h ospf6d: add dbdesc messages to tx FIFO 2021-06-18 09:40:42 +01:00
ospf6_neighbor.c ospf6d: Prevent crash in adj_ok 2021-11-05 18:00:10 -04:00
ospf6_neighbor.h ospf6d: Prevent crash in adj_ok 2021-11-05 18:00:10 -04:00
ospf6_network.c ospf6d: read ospf6 socket until failure 2021-06-18 09:40:42 +01:00
ospf6_network.h ospf6d: add dbdesc messages to tx FIFO 2021-06-18 09:40:42 +01:00
ospf6_nssa.c Merge pull request #9831 from manojvn/379909_383518 2021-10-28 20:05:16 +03:00
ospf6_nssa.h ospf6d: assorted code cleanup 2021-10-05 21:25:55 -03:00
ospf6_proto.c ospf6d: add DN bit in prefix options 2021-02-23 18:04:27 +01:00
ospf6_proto.h ospf6d: Support for nssa in ospfv3 2021-06-04 07:23:10 -03:00
ospf6_route.c Merge pull request #9833 from idryzhov/cleanup-if-by-index-all-vrf 2021-11-05 15:17:31 -04:00
ospf6_route.h ospf6d: add support for NSSA Type-7 address ranges 2021-10-05 21:25:55 -03:00
ospf6_routemap_nb_config.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
ospf6_routemap_nb.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
ospf6_routemap_nb.h ospf6d: North-bound implementation for ospf6d rmaps 2021-03-30 22:59:30 +03:00
ospf6_snmp.c ospf6d: remove unnecessary break. 2021-10-26 00:57:09 -07:00
ospf6_spf.c ospf6d: avoid writing dumb ospf6 info at startup 2021-11-03 11:48:55 +01:00
ospf6_spf.h ospf6d: introduce support for Graceful Restart (restarting mode) 2021-09-16 12:26:48 -03:00
ospf6_top.c lib: allow to create interfaces in non-existing VRFs 2021-10-19 15:29:51 +03:00
ospf6_top.h Merge pull request #9585 from opensourcerouting/ospf6d-nssa-dflt-originate 2021-09-24 13:42:49 -04:00
ospf6_zebra.c *: convert zclient callbacks to table 2021-10-20 13:28:46 +02:00
ospf6_zebra.h ospf6d: implement Type-7 default routes for NSSA areas 2021-09-21 17:47:13 -03:00
ospf6d.c ospf6d: rework filtering commands to be in line with ospfd 2021-09-20 13:06:35 -03:00
ospf6d.h ospf6d: cleanup useless checks 2021-09-15 19:21:47 +03:00
README ospf6d: add "auto-cost reference-bandwidth" command 2014-03-21 06:28:48 +01:00
subdir.am ospf6d: add support for NSSA Type-7 address ranges 2021-10-05 21:25:55 -03:00

		  Zebra OSPF daemon for IPv6 network

			     2003/08/18

README for newer code is not yet. General usage should remain
the same. For further usage, see command helps by typing '?'
in vty, and then imagin ! ;p) Previous README contents follows.

		  Zebra OSPF daemon for IPv6 network

			     2001/12/20

Zebra OSPF6d is OSPF version 3 daemon which is specified by
"OSPF for IPv6" (RFC 2740).

*** NOTE ***
  Zebra ospf6d is in development yet. It may lack some functionalities,
  and may have some bugs. Use the latest version from the anoncvs
  repository (http://www.zebra.org/cvs.html) !

This file README is like memo yet, so please feel free to ask
<yasu@sfc.wide.ad.jp> by E-mail. Patches will be appriciated.

ospf6d's vty port was default to 2606/tcp.
Use commands below.

VIEW NODE:
  show ipv6 ospf6
    To see Router-ID, uptime of ospf6d, some statistics.

  show ipv6 ospf6 database ...
    This command shows LSA database. You can specify
    LS-type/LS-ID/Advertising-Router of LSAs. '*' is recognized.

  show ipv6 ospf6 interface ...
    To see the status of the OSPF interface, and the configuration
    like interface costs.

  show ipv6 ospf6 neighbor ...
    Shows state of neighbors and choosed (Backup) DR on the I/F.

  show ipv6 ospf6 route (X::X)
    This command shows internal routing table of the ospf6d.
    Routes not calculated by OSPFv3 (like connected routes)
    are not shown. If Address is specified (X::X), shows the route
    that the address matches.

  show ipv6 ospf6 route redistribute (X::X)
    Shows the routes advertised as AS-External routes by the router
    itself. If Address is specified (X::X), shows the route
    that the address matches.

CONFIG NODE:
  interface NAME
    To enter INTERFACE NODE

  router ospf6 ...
    To enter OSPF6 NODE

INTERFACE NODE:
  ipv6 ospf6 cost COST
    Sets the interface's output cost. Depends on interface bandwidth by default.

  ipv6 ospf6 hello-interval HELLOINTERVAL
    Sets the interface's Hello Interval. default 10

  ipv6 ospf6 dead-interval DEADINTERVAL
    Sets the interface's Router Dead Interval. default 40

  ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL
    Sets the interface's Rxmt Interval. default 5

  ipv6 ospf6 priority PRIORITY
    Sets the interface's Router Priority. default 1

  ipv6 ospf6 transmit-delay TRANSMITDELAY
    Sets the interface's Inf-Trans-Delay. default 1

OSPF6 NODE:
  router-id A.B.C.D
    Sets the router's Router-ID

  interface NAME area AREA
    Binds interface to specified Area, and start
    sending OSPFv3 packets.

  auto-cost reference-bandwidth COST
    Sets the reference bandwidth for cost calculations, where this
    bandwidth is considered equivalent to an OSPF cost of 1, specified
    in Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth
    100Mbit/s or higher will have a cost of 1. Cost of lower bandwidth
    links will be scaled with reference to this cost).  This
    configuration setting MUST be consistent across all routers within
    the OSPF domain.

Sample configuration is in ospf6d.conf.sample.

--
Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
Kunihiro Ishiguro <kunihiro@zebra.org>