isisd: fix network-type configuration
Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 4acd8f3..bbe06b5 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -1357,7 +1357,6 @@
* is not supported. */
if (circ_type == CIRCUIT_T_UNKNOWN
|| circ_type == CIRCUIT_T_LOOPBACK
- || circuit->circ_type == CIRCUIT_T_UNKNOWN
|| circuit->circ_type == CIRCUIT_T_LOOPBACK)
{
if (circuit->circ_type != circ_type)
diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c
index 3ce06b8..f9b96a4 100644
--- a/isisd/isis_vty.c
+++ b/isisd/isis_vty.c
@@ -255,7 +255,7 @@
if (!circuit)
return CMD_ERR_NO_MATCH;
- if (!isis_circuit_circ_type_set(circuit, CIRCUIT_T_P2P))
+ if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_P2P))
{
vty_out (vty, "isis network point-to-point "
"is valid only on broadcast interfaces%s",
@@ -278,7 +278,7 @@
if (!circuit)
return CMD_ERR_NO_MATCH;
- if (!isis_circuit_circ_type_set(circuit, CIRCUIT_T_BROADCAST))
+ if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_BROADCAST))
{
vty_out (vty, "isis network point-to-point "
"is valid only on broadcast interfaces%s",