summaryrefslogtreecommitdiffstats
path: root/isisd/isis_zebra.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-10-08 19:05:08 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2020-10-08 22:14:54 +0200
commit115f8f56927d3adce70d6e53ff314521d7e0dfff (patch)
tree4da177abe9bd16d18a724b784805c590285db105 /isisd/isis_zebra.c
parentisisd: fix incorrect vrf lookups (diff)
downloadfrr-115f8f56927d3adce70d6e53ff314521d7e0dfff.tar.xz
frr-115f8f56927d3adce70d6e53ff314521d7e0dfff.zip
isisd: check for circuit existence on interface addr change
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to '')
-rw-r--r--isisd/isis_zebra.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 15b51589a..57cdfb1cd 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -85,6 +85,7 @@ static int isis_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
static int isis_zebra_if_address_add(ZAPI_CALLBACK_ARGS)
{
+ struct isis_circuit *circuit;
struct connected *c;
struct prefix *p;
char buf[PREFIX2STR_BUFFER];
@@ -104,16 +105,20 @@ static int isis_zebra_if_address_add(ZAPI_CALLBACK_ARGS)
if (p->family == AF_INET6)
zlog_debug("connected IPv6 address %s", buf);
#endif /* EXTREME_DEBUG */
- if (if_is_operative(c->ifp))
- isis_circuit_add_addr(circuit_scan_by_ifp(c->ifp), c);
+
+ if (if_is_operative(c->ifp)) {
+ circuit = circuit_scan_by_ifp(c->ifp);
+ if (circuit)
+ isis_circuit_add_addr(circuit, c);
+ }
return 0;
}
static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
{
+ struct isis_circuit *circuit;
struct connected *c;
- struct interface *ifp;
#ifdef EXTREME_DEBUG
struct prefix *p;
char buf[PREFIX2STR_BUFFER];
@@ -125,8 +130,6 @@ static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
if (c == NULL)
return 0;
- ifp = c->ifp;
-
#ifdef EXTREME_DEBUG
p = c->address;
prefix2str(p, buf, sizeof(buf));
@@ -137,8 +140,12 @@ static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
zlog_debug("disconnected IPv6 address %s", buf);
#endif /* EXTREME_DEBUG */
- if (if_is_operative(ifp))
- isis_circuit_del_addr(circuit_scan_by_ifp(ifp), c);
+ if (if_is_operative(c->ifp)) {
+ circuit = circuit_scan_by_ifp(c->ifp);
+ if (circuit)
+ isis_circuit_del_addr(circuit, c);
+ }
+
connected_free(&c);
return 0;