Commit graph

12 commits

Author SHA1 Message Date
Andrew Cooks 89e18bfad1 ospf6d: move lsa structs to ospf6_lsa.h
It will be cleaner to have the LSAs in a single header and the future
TLVs in a single header.

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Donald Sharp 0cbd5855a9 ospf6d: Convert ospf6_lsa_unlock to a better api
Make the ospf6_lsa_unlock take the same parameters
that the ospf_lsa_unlock does to make it consistent
and to also ensure that no-one can make the mistake
of getting the pointer cleared up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-12 17:56:29 -04:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
David Lamparter e536bb107d build: break up tests/subdir.am
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-11-11 14:40:03 +01:00
Donald Sharp 2e37407f9d ospf6d, tests: Prevent use after free
The code pattern:

for (ALL_LSDB(lsdb, lsa)) {
	remove_lsa(lsa)
}

has a use after free in ALL_LSDB, since we ask for the next pointer,
after it has been freed.

Modify the code such that we grab the next pointer before we can
possibly free it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-11 11:16:44 -04:00
whitespace 701a01920e *: reformat python files
We are now using black.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07 17:22:26 -04:00
David Lamparter a1286a3245 build: non-recursive tests
May SUBDIRS rest in pieces... er, peace.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:26:54 +02:00
Quentin Young 0e9f8d2d86 ospf6d: handle realloc() failure in lsa test
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-17 13:58:24 -04:00
David Lamparter 279f5e0934 tests: fix clippy include paths / double-build
A mismatch between the make rule and the include path causes dependency
tracking to try to build the clippy.c file twice (at the same time),
which results in spurious build failures.

Fixes: #971
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 11:21:07 +02:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter 53a37141f9 tests/ospf6d/test_lsdb: remove vty_outln
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 17:32:22 +02:00
David Lamparter f1c73d1495 tests: ospf6d: basic LSDB tests
Needed these while rewriting LSDB iteration.

NB: this commit fails because of a bug in ospf_lsdb_get_next, which will
SEGV when the LSDB is actually empty.  Whooo...  (this is fixed in the
following commits.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-11 15:04:12 +02:00