diff options
| author | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-11-14 14:35:43 +0100 |
|---|---|---|
| committer | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-12-18 15:24:46 +0100 |
| commit | d082076585baa46e58d7becaabb311ea7f40ec0c (patch) | |
| tree | 3604fb86d6013dc650e1cea6c5c00c3c6e49fb82 /isisd/isis_circuit.c | |
| parent | 9302fbb69303b47fbb6f8d3f8ad624494ab2cfed (diff) | |
isisd: retrofit the 'isis network' command
remove the return value and redundant validations from
isis_circuit_circ_type_set(), since they are no longer needed.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'isisd/isis_circuit.c')
| -rw-r--r-- | isisd/isis_circuit.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index e76e27a7dc..356cbde812 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -1261,35 +1261,22 @@ struct cmd_node interface_node = { INTERFACE_NODE, "%s(config-if)# ", 1, }; -ferr_r isis_circuit_circ_type_set(struct isis_circuit *circuit, int circ_type) +void isis_circuit_circ_type_set(struct isis_circuit *circuit, int circ_type) { if (circuit->circ_type == circ_type) - return ferr_ok(); - - /* Changing the network type to/of loopback or unknown interfaces - * is not supported. */ - if (circ_type == CIRCUIT_T_UNKNOWN || circ_type == CIRCUIT_T_LOOPBACK - || circuit->circ_type == CIRCUIT_T_LOOPBACK) { - return ferr_cfg_invalid( - "cannot change network type on unknown interface"); - } + return; if (circuit->state != C_STATE_UP) { circuit->circ_type = circ_type; circuit->circ_type_config = circ_type; } else { struct isis_area *area = circuit->area; - if (circ_type == CIRCUIT_T_BROADCAST - && !if_is_broadcast(circuit->interface)) - return ferr_cfg_reality( - "cannot configure non-broadcast interface for broadcast operation"); isis_csm_state_change(ISIS_DISABLE, circuit, area); circuit->circ_type = circ_type; circuit->circ_type_config = circ_type; isis_csm_state_change(ISIS_ENABLE, circuit, area); } - return ferr_ok(); } int isis_circuit_mt_enabled_set(struct isis_circuit *circuit, uint16_t mtid, |
