summaryrefslogtreecommitdiffstats
path: root/isisd/isis_circuit.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-08-11 17:02:50 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2016-08-16 16:05:59 +0200
commit19dd696bda25a595f4e324a9729f27c4d8405e48 (patch)
treefdfc613996af07b21560a60be8ab6f090e028405 /isisd/isis_circuit.c
parentisisd: fix isis_circuit_create() (diff)
downloadfrr-19dd696bda25a595f4e324a9729f27c4d8405e48.tar.xz
frr-19dd696bda25a595f4e324a9729f27c4d8405e48.zip
isisd: fix isis_circuit_af_set() on fresh circuit
A newly-created circuit will be in enabled state but have neither IPv4 nor IPv6 configured. The logic in isis_circuit_af_set assumed that "enabled" is equivalent to "ip || ipv6". This is the only place where this distinction is currently relevant, as the CLI won't allow enabling an interface without enabling either IPv4 or IPv6; and it will also disable a circuit when both are deconfigured. Reported-by: Martin Winter <mwinter@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--isisd/isis_circuit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index b9ebf5250..ad1eca89e 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -1240,7 +1240,7 @@ isis_circuit_af_set (struct isis_circuit *circuit, bool ip_router, bool ipv6_rou
{
struct isis_area *area = circuit->area;
bool change = circuit->ip_router != ip_router || circuit->ipv6_router != ipv6_router;
- bool was_enabled = circuit->ip_router || circuit->ipv6_router;
+ bool was_enabled = !!circuit->area;
area->ip_circuits += ip_router - circuit->ip_router;
area->ipv6_circuits += ipv6_router - circuit->ipv6_router;