Commit Graph

11 Commits

Author SHA1 Message Date
Donald Sharp
2beaba8de9 isisd: Convert signed to time_t for addition
Convert a signed value to a time_t before addition
so that we can compare unsigned (time_t) to unsigned.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-13 14:32:52 -04:00
Donald Sharp
75fef2a4da isisd: Remove weird wrapper function that downgrades time_t to 32 bit
Just use time_t, instead of downgrading time_t to a 32 bit value.
We should be using time_t instead of 32 bit unsigned values.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-09 09:09:31 -04:00
Igor Ryzhov
240f48b36b isisd: per-instance dynamic hostname cache
Currently, the dynamic hostname cache is global. It is incorrect because
neighbors in different VRFs may have the same system ID and different
hostnames.

This also fixes a memory leak - when the instance is deleted, the cache
must be cleaned up and the cleanup thread must be cancelled.

Fixes #8832.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-11 18:30:47 +03:00
Igor Ryzhov
5ff4ad8ee3 isisd: fix build warning and simplify code
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-17 13:07:24 +03:00
Pat Ruddy
4397d967d5 isisd: fix clang-11 warnings in snmp code
fix a number of SA errors thrown up by the newer clang

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-05-05 17:35:40 +01:00
Igor Ryzhov
e2b5b7d6d7 isisd: fix incorrect snmp-id gen/free
Necessary structures for snmp-id generation are currently stored in
`struct isis`. When we generate the new circuit ID, we always use the
instance from the default VRF. When we free the circuit ID, we use the
instance from the circuit VRF. This causes the following problems:

1. If there is no instance in the default VRF, this code doesn't work.
2. When circuit in non-default VRF is deleted, the ID is not actually
   freed.

This is fixed by using global structures instead. The code itself is
moved to isis_snmp.c and linked to the main code using hooks. We should
not call SNMP-related code when the SNMP module is not loaded at all.

More than that, we don't allow to activate the circuit if we failed to
generate the SNMP ID. Even if SNMP support is completely disabled! This
check is removed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
David Lamparter
09781197b6 build: make builddir include path consistent
... by referencing all autogenerated headers relative to the root
directory.  (90% of the changes here is `version.h`.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:33 +02:00
Mark Stapp
c33cb9fba6 isisd: fix coverity SA warning
Add assert to clear SA warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-26 16:00:25 -04:00
David Lamparter
80413c2073 *: require semicolon after FRR_DAEMON_INFO & co.
... again ...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
lynne
e91a589b93 isisd: Fix coverity warnings
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-16 12:55:28 -04:00
lynne
1ee746d990 isisd: support for snmp
Add support for read only mib objects from RFC4444.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-02 10:06:31 -05:00