1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
|
/*
* IS-IS Rout(e)ing protocol - isis_circuit.h
*
* Copyright (C) 2001,2002 Sampo Saaristo
* Tampere University of Technology
* Institute of Communications Engineering
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public Licenseas published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
#ifdef GNU_LINUX
#include <net/ethernet.h>
#else
#include <netinet/if_ether.h>
#endif
#include "log.h"
#include "memory.h"
#include "vrf.h"
#include "if.h"
#include "linklist.h"
#include "command.h"
#include "thread.h"
#include "vty.h"
#include "hash.h"
#include "prefix.h"
#include "stream.h"
#include "qobj.h"
#include "isisd/dict.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"
#include "isisd/isis_flags.h"
#include "isisd/isis_circuit.h"
#include "isisd/isis_lsp.h"
#include "isisd/isis_pdu.h"
#include "isisd/isis_network.h"
#include "isisd/isis_misc.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_adjacency.h"
#include "isisd/isis_dr.h"
#include "isisd/isisd.h"
#include "isisd/isis_csm.h"
#include "isisd/isis_events.h"
#include "isisd/isis_te.h"
#include "isisd/isis_mt.h"
#include "isisd/isis_errors.h"
#include "isisd/isis_tx_queue.h"
DEFINE_QOBJ_TYPE(isis_circuit)
/*
* Prototypes.
*/
int isis_interface_config_write(struct vty *);
int isis_if_new_hook(struct interface *);
int isis_if_delete_hook(struct interface *);
struct isis_circuit *isis_circuit_new()
{
struct isis_circuit *circuit;
int i;
circuit = XCALLOC(MTYPE_ISIS_CIRCUIT, sizeof(struct isis_circuit));
/*
* Default values
*/
circuit->is_type = IS_LEVEL_1_AND_2;
circuit->flags = 0;
circuit->pad_hellos = 1;
for (i = 0; i < 2; i++) {
circuit->hello_interval[i] = DEFAULT_HELLO_INTERVAL;
circuit->hello_multiplier[i] = DEFAULT_HELLO_MULTIPLIER;
circuit->csnp_interval[i] = DEFAULT_CSNP_INTERVAL;
circuit->psnp_interval[i] = DEFAULT_PSNP_INTERVAL;
circuit->priority[i] = DEFAULT_PRIORITY;
circuit->metric[i] = DEFAULT_CIRCUIT_METRIC;
circuit->te_metric[i] = DEFAULT_CIRCUIT_METRIC;
}
circuit->mtc = mpls_te_circuit_new();
circuit_mt_init(circuit);
QOBJ_REG(circuit, isis_circuit);
return circuit;
}
void isis_circuit_del(struct isis_circuit *circuit)
{
if (!circuit)
return;
QOBJ_UNREG(circuit);
isis_circuit_if_unbind(circuit, circuit->interface);
circuit_mt_finish(circuit);
/* and lastly the circuit itself */
XFREE(MTYPE_ISIS_CIRCUIT, circuit);
return;
}
void isis_circuit_configure(struct isis_circuit *circuit,
struct isis_area *area)
{
assert(area);
circuit->area = area;
/*
* Whenever the is-type of an area is changed, the is-type of each
* circuit
* in that area is updated to a non-empty subset of the area is-type.
* Inversely, when configuring a new circuit, this property should be
* ensured as well.
*/
if (area->is_type != IS_LEVEL_1_AND_2)
circuit->is_type = area->is_type;
/*
* Add the circuit into area
*/
listnode_add(area->circuit_list, circuit);
circuit->idx = flags_get_index(&area->flags);
return;
}
void isis_circuit_deconfigure(struct isis_circuit *circuit,
struct isis_area *area)
{
/* Free the index of SRM and SSN flags */
flags_free_index(&area->flags, circuit->idx);
circuit->idx = 0;
/* Remove circuit from area */
assert(circuit->area == area);
listnode_delete(area->circuit_list, circuit);
circuit->area = NULL;
return;
}
struct isis_circuit *circuit_lookup_by_ifp(struct interface *ifp,
struct list *list)
{
struct isis_circuit *circuit = NULL;
struct listnode *node;
if (!list)
return NULL;
for (ALL_LIST_ELEMENTS_RO(list, node, circuit))
if (circuit->interface == ifp) {
assert(ifp->info == circuit);
return circuit;
}
return NULL;
}
struct isis_circuit *circuit_scan_by_ifp(struct interface *ifp)
{
struct isis_area *area;
struct listnode *node;
struct isis_circuit *circuit;
if (ifp->info)
return (struct isis_circuit *)ifp->info;
if (isis->area_list) {
for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {
circuit =
circuit_lookup_by_ifp(ifp, area->circuit_list);
if (circuit)
return circuit;
}
}
return circuit_lookup_by_ifp(ifp, isis->init_circ_list);
}
void isis_circuit_add_addr(struct isis_circuit *circuit,
struct connected *connected)
{
struct listnode *node;
struct prefix_ipv4 *ipv4;
#if defined(EXTREME_DEBUG)
char buf[PREFIX2STR_BUFFER];
#endif
struct prefix_ipv6 *ipv6;
if (connected->address->family == AF_INET) {
uint32_t addr = connected->address->u.prefix4.s_addr;
addr = ntohl(addr);
if (IPV4_NET0(addr) || IPV4_NET127(addr) || IN_CLASSD(addr)
|| IPV4_LINKLOCAL(addr))
return;
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node, ipv4))
if (prefix_same((struct prefix *)ipv4,
connected->address))
return;
ipv4 = prefix_ipv4_new();
ipv4->prefixlen = connected->address->prefixlen;
ipv4->prefix = connected->address->u.prefix4;
listnode_add(circuit->ip_addrs, ipv4);
/* Update MPLS TE Local IP address parameter */
set_circuitparams_local_ipaddr(circuit->mtc, ipv4->prefix);
if (circuit->area)
lsp_regenerate_schedule(circuit->area, circuit->is_type,
0);
#ifdef EXTREME_DEBUG
prefix2str(connected->address, buf, sizeof(buf));
zlog_debug("Added IP address %s to circuit %s", buf,
circuit->interface->name);
#endif /* EXTREME_DEBUG */
}
if (connected->address->family == AF_INET6) {
if (IN6_IS_ADDR_LOOPBACK(&connected->address->u.prefix6))
return;
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node, ipv6))
if (prefix_same((struct prefix *)ipv6,
connected->address))
return;
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node, ipv6))
if (prefix_same((struct prefix *)ipv6,
connected->address))
return;
ipv6 = prefix_ipv6_new();
ipv6->prefixlen = connected->address->prefixlen;
ipv6->prefix = connected->address->u.prefix6;
if (IN6_IS_ADDR_LINKLOCAL(&ipv6->prefix))
listnode_add(circuit->ipv6_link, ipv6);
else
listnode_add(circuit->ipv6_non_link, ipv6);
if (circuit->area)
lsp_regenerate_schedule(circuit->area, circuit->is_type,
0);
#ifdef EXTREME_DEBUG
prefix2str(connected->address, buf, sizeof(buf));
zlog_debug("Added IPv6 address %s to circuit %s", buf,
circuit->interface->name);
#endif /* EXTREME_DEBUG */
}
return;
}
void isis_circuit_del_addr(struct isis_circuit *circuit,
struct connected *connected)
{
struct prefix_ipv4 *ipv4, *ip = NULL;
struct listnode *node;
char buf[PREFIX2STR_BUFFER];
struct prefix_ipv6 *ipv6, *ip6 = NULL;
int found = 0;
if (connected->address->family == AF_INET) {
ipv4 = prefix_ipv4_new();
ipv4->prefixlen = connected->address->prefixlen;
ipv4->prefix = connected->address->u.prefix4;
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node, ip))
if (prefix_same((struct prefix *)ip,
(struct prefix *)ipv4))
break;
if (ip) {
listnode_delete(circuit->ip_addrs, ip);
prefix_ipv4_free(ip);
if (circuit->area)
lsp_regenerate_schedule(circuit->area,
circuit->is_type, 0);
} else {
prefix2str(connected->address, buf, sizeof(buf));
zlog_warn(
"Nonexistent ip address %s removal attempt from \
circuit %s",
buf, circuit->interface->name);
zlog_warn("Current ip addresses on %s:",
circuit->interface->name);
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node,
ip)) {
prefix2str(ip, buf, sizeof(buf));
zlog_warn(" %s", buf);
}
zlog_warn("End of addresses");
}
prefix_ipv4_free(ipv4);
}
if (connected->address->family == AF_INET6) {
ipv6 = prefix_ipv6_new();
ipv6->prefixlen = connected->address->prefixlen;
ipv6->prefix = connected->address->u.prefix6;
if (IN6_IS_ADDR_LINKLOCAL(&ipv6->prefix)) {
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node,
ip6)) {
if (prefix_same((struct prefix *)ip6,
(struct prefix *)ipv6))
break;
}
if (ip6) {
listnode_delete(circuit->ipv6_link, ip6);
prefix_ipv6_free(ip6);
found = 1;
}
} else {
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node,
ip6)) {
if (prefix_same((struct prefix *)ip6,
(struct prefix *)ipv6))
break;
}
if (ip6) {
listnode_delete(circuit->ipv6_non_link, ip6);
prefix_ipv6_free(ip6);
found = 1;
}
}
if (!found) {
prefix2str(connected->address, buf, sizeof(buf));
zlog_warn(
"Nonexistent ip address %s removal attempt from \
circuit %s",
buf, circuit->interface->name);
zlog_warn("Current ip addresses on %s:",
circuit->interface->name);
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node,
ip6)) {
prefix2str((struct prefix *)ip6, (char *)buf,
sizeof(buf));
zlog_warn(" %s", buf);
}
zlog_warn(" -----");
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node,
ip6)) {
prefix2str((struct prefix *)ip6, (char *)buf,
sizeof(buf));
zlog_warn(" %s", buf);
}
zlog_warn("End of addresses");
} else if (circuit->area)
lsp_regenerate_schedule(circuit->area, circuit->is_type,
0);
prefix_ipv6_free(ipv6);
}
return;
}
static uint8_t isis_circuit_id_gen(struct isis *isis, struct interface *ifp)
{
/* Circuit ids MUST be unique for any broadcast circuits. Otherwise,
* Pseudo-Node LSPs cannot be generated correctly.
*
* Currently, allocate one circuit ID for any circuit, limiting the total
* numer of circuits IS-IS can run on to 255.
*
* We should revisit this when implementing 3-way adjacencies for p2p, since
* we then have extended interface IDs available.
*/
uint8_t id = ifp->ifindex;
unsigned int i;
for (i = 0; i < 256; i++) {
if (id && !_ISIS_CHECK_FLAG(isis->circuit_ids_used, id))
break;
id++;
}
if (i == 256) {
zlog_warn("Could not allocate a circuit id for '%s'",
ifp->name);
return 0;
}
_ISIS_SET_FLAG(isis->circuit_ids_used, id);
return id;
}
void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
{
struct listnode *node, *nnode;
struct connected *conn;
isis_circuit_if_bind(circuit, ifp);
if (if_is_broadcast(ifp)) {
if (fabricd || circuit->circ_type_config == CIRCUIT_T_P2P)
circuit->circ_type = CIRCUIT_T_P2P;
else
circuit->circ_type = CIRCUIT_T_BROADCAST;
} else if (if_is_pointopoint(ifp)) {
circuit->circ_type = CIRCUIT_T_P2P;
} else if (if_is_loopback(ifp)) {
circuit->circ_type = CIRCUIT_T_LOOPBACK;
circuit->is_passive = 1;
} else {
/* It's normal in case of loopback etc. */
if (isis->debugs & DEBUG_EVENTS)
zlog_debug("isis_circuit_if_add: unsupported media");
circuit->circ_type = CIRCUIT_T_UNKNOWN;
}
circuit->ip_addrs = list_new();
circuit->ipv6_link = list_new();
circuit->ipv6_non_link = list_new();
for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, conn))
isis_circuit_add_addr(circuit, conn);
}
void isis_circuit_if_del(struct isis_circuit *circuit, struct interface *ifp)
{
struct listnode *node, *nnode;
struct connected *conn;
assert(circuit->interface == ifp);
/* destroy addresses */
for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, conn))
isis_circuit_del_addr(circuit, conn);
if (circuit->ip_addrs) {
assert(listcount(circuit->ip_addrs) == 0);
list_delete(&circuit->ip_addrs);
}
if (circuit->ipv6_link) {
assert(listcount(circuit->ipv6_link) == 0);
list_delete(&circuit->ipv6_link);
}
if (circuit->ipv6_non_link) {
assert(listcount(circuit->ipv6_non_link) == 0);
list_delete(&circuit->ipv6_non_link);
}
circuit->circ_type = CIRCUIT_T_UNKNOWN;
}
void isis_circuit_if_bind(struct isis_circuit *circuit, struct interface *ifp)
{
assert(circuit != NULL);
assert(ifp != NULL);
if (circuit->interface)
assert(circuit->interface == ifp);
else
circuit->interface = ifp;
if (ifp->info)
assert(ifp->info == circuit);
else
ifp->info = circuit;
isis_link_params_update(circuit, ifp);
}
void isis_circuit_if_unbind(struct isis_circuit *circuit, struct interface *ifp)
{
assert(circuit != NULL);
assert(ifp != NULL);
assert(circuit->interface == ifp);
assert(ifp->info == circuit);
circuit->interface = NULL;
ifp->info = NULL;
}
static void isis_circuit_update_all_srmflags(struct isis_circuit *circuit,
int is_set)
{
struct isis_area *area;
struct isis_lsp *lsp;
dnode_t *dnode;
int level;
assert(circuit);
area = circuit->area;
assert(area);
for (level = ISIS_LEVEL1; level <= ISIS_LEVEL2; level++) {
if (!(level & circuit->is_type))
continue;
if (!area->lspdb[level - 1]
|| !dict_count(area->lspdb[level - 1]))
continue;
for (dnode = dict_first(area->lspdb[level - 1]);
dnode != NULL;
dnode = dict_next(area->lspdb[level - 1], dnode)) {
lsp = dnode_get(dnode);
if (is_set) {
isis_tx_queue_add(circuit->tx_queue, lsp,
TX_LSP_NORMAL);
} else {
isis_tx_queue_del(circuit->tx_queue, lsp);
}
}
}
}
size_t isis_circuit_pdu_size(struct isis_circuit *circuit)
{
return ISO_MTU(circuit);
}
void isis_circuit_stream(struct isis_circuit *circuit, struct stream **stream)
{
size_t stream_size = isis_circuit_pdu_size(circuit);
if (!*stream) {
*stream = stream_new(stream_size);
} else {
if (STREAM_SIZE(*stream) != stream_size)
stream_resize_inplace(stream, stream_size);
stream_reset(*stream);
}
}
void isis_circuit_prepare(struct isis_circuit *circuit)
{
#if ISIS_METHOD != ISIS_METHOD_DLPI
thread_add_read(master, isis_receive, circuit, circuit->fd,
&circuit->t_read);
#else
thread_add_timer_msec(master, isis_receive, circuit,
listcount(circuit->area->circuit_list) * 100,
&circuit->t_read);
#endif
}
int isis_circuit_up(struct isis_circuit *circuit)
{
int retv;
/* Set the flags for all the lsps of the circuit. */
isis_circuit_update_all_srmflags(circuit, 1);
if (circuit->state == C_STATE_UP)
return ISIS_OK;
if (circuit->is_passive)
return ISIS_OK;
if (circuit->area->lsp_mtu > isis_circuit_pdu_size(circuit)) {
flog_err(
EC_ISIS_CONFIG,
"Interface MTU %zu on %s is too low to support area lsp mtu %u!",
isis_circuit_pdu_size(circuit),
circuit->interface->name, circuit->area->lsp_mtu);
isis_circuit_update_all_srmflags(circuit, 0);
return ISIS_ERROR;
}
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
circuit->circuit_id = isis_circuit_id_gen(isis, circuit->interface);
if (!circuit->circuit_id) {
flog_err(
EC_ISIS_CONFIG,
"There are already 255 broadcast circuits active!");
return ISIS_ERROR;
}
/*
* Get the Hardware Address
*/
if (circuit->interface->hw_addr_len != ETH_ALEN) {
zlog_warn("unsupported link layer");
} else {
memcpy(circuit->u.bc.snpa, circuit->interface->hw_addr,
ETH_ALEN);
}
#ifdef EXTREME_DEGUG
zlog_debug("isis_circuit_if_add: if_id %d, isomtu %d snpa %s",
circuit->interface->ifindex, ISO_MTU(circuit),
snpa_print(circuit->u.bc.snpa));
#endif /* EXTREME_DEBUG */
circuit->u.bc.adjdb[0] = list_new();
circuit->u.bc.adjdb[1] = list_new();
/*
* ISO 10589 - 8.4.1 Enabling of broadcast circuits
*/
/* initilizing the hello sending threads
* for a broadcast IF
*/
/* 8.4.1 a) commence sending of IIH PDUs */
if (circuit->is_type & IS_LEVEL_1) {
thread_add_event(master, send_lan_l1_hello, circuit, 0,
NULL);
circuit->u.bc.lan_neighs[0] = list_new();
}
if (circuit->is_type & IS_LEVEL_2) {
thread_add_event(master, send_lan_l2_hello, circuit, 0,
NULL);
circuit->u.bc.lan_neighs[1] = list_new();
}
/* 8.4.1 b) FIXME: solicit ES - 8.4.6 */
/* 8.4.1 c) FIXME: listen for ESH PDUs */
/* 8.4.1 d) */
/* dr election will commence in... */
if (circuit->is_type & IS_LEVEL_1)
thread_add_timer(master, isis_run_dr_l1, circuit,
2 * circuit->hello_interval[0],
&circuit->u.bc.t_run_dr[0]);
if (circuit->is_type & IS_LEVEL_2)
thread_add_timer(master, isis_run_dr_l2, circuit,
2 * circuit->hello_interval[1],
&circuit->u.bc.t_run_dr[1]);
} else if (circuit->circ_type == CIRCUIT_T_P2P) {
/* initializing the hello send threads
* for a ptp IF
*/
circuit->u.p2p.neighbor = NULL;
thread_add_event(master, send_p2p_hello, circuit, 0, NULL);
}
/* initializing PSNP timers */
if (circuit->is_type & IS_LEVEL_1)
thread_add_timer(
master, send_l1_psnp, circuit,
isis_jitter(circuit->psnp_interval[0], PSNP_JITTER),
&circuit->t_send_psnp[0]);
if (circuit->is_type & IS_LEVEL_2)
thread_add_timer(
master, send_l2_psnp, circuit,
isis_jitter(circuit->psnp_interval[1], PSNP_JITTER),
&circuit->t_send_psnp[1]);
/* unified init for circuits; ignore warnings below this level */
retv = isis_sock_init(circuit);
if (retv != ISIS_OK) {
isis_circuit_down(circuit);
return retv;
}
/* initialize the circuit streams after opening connection */
isis_circuit_stream(circuit, &circuit->rcv_stream);
isis_circuit_stream(circuit, &circuit->snd_stream);
isis_circuit_prepare(circuit);
circuit->tx_queue = isis_tx_queue_new(circuit, send_lsp);
return ISIS_OK;
}
void isis_circuit_down(struct isis_circuit *circuit)
{
/* Clear the flags for all the lsps of the circuit. */
isis_circuit_update_all_srmflags(circuit, 0);
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
/* destroy neighbour lists */
if (circuit->u.bc.lan_neighs[0]) {
list_delete(&circuit->u.bc.lan_neighs[0]);
circuit->u.bc.lan_neighs[0] = NULL;
}
if (circuit->u.bc.lan_neighs[1]) {
list_delete(&circuit->u.bc.lan_neighs[1]);
circuit->u.bc.lan_neighs[1] = NULL;
}
/* destroy adjacency databases */
if (circuit->u.bc.adjdb[0]) {
circuit->u.bc.adjdb[0]->del = isis_delete_adj;
list_delete(&circuit->u.bc.adjdb[0]);
circuit->u.bc.adjdb[0] = NULL;
}
if (circuit->u.bc.adjdb[1]) {
circuit->u.bc.adjdb[1]->del = isis_delete_adj;
list_delete(&circuit->u.bc.adjdb[1]);
circuit->u.bc.adjdb[1] = NULL;
}
if (circuit->u.bc.is_dr[0]) {
isis_dr_resign(circuit, 1);
circuit->u.bc.is_dr[0] = 0;
}
memset(circuit->u.bc.l1_desig_is, 0, ISIS_SYS_ID_LEN + 1);
if (circuit->u.bc.is_dr[1]) {
isis_dr_resign(circuit, 2);
circuit->u.bc.is_dr[1] = 0;
}
memset(circuit->u.bc.l2_desig_is, 0, ISIS_SYS_ID_LEN + 1);
memset(circuit->u.bc.snpa, 0, ETH_ALEN);
THREAD_TIMER_OFF(circuit->u.bc.t_send_lan_hello[0]);
THREAD_TIMER_OFF(circuit->u.bc.t_send_lan_hello[1]);
THREAD_TIMER_OFF(circuit->u.bc.t_run_dr[0]);
THREAD_TIMER_OFF(circuit->u.bc.t_run_dr[1]);
THREAD_TIMER_OFF(circuit->u.bc.t_refresh_pseudo_lsp[0]);
THREAD_TIMER_OFF(circuit->u.bc.t_refresh_pseudo_lsp[1]);
circuit->lsp_regenerate_pending[0] = 0;
circuit->lsp_regenerate_pending[1] = 0;
_ISIS_CLEAR_FLAG(isis->circuit_ids_used, circuit->circuit_id);
circuit->circuit_id = 0;
} else if (circuit->circ_type == CIRCUIT_T_P2P) {
isis_delete_adj(circuit->u.p2p.neighbor);
circuit->u.p2p.neighbor = NULL;
THREAD_TIMER_OFF(circuit->u.p2p.t_send_p2p_hello);
}
/* Cancel all active threads */
THREAD_TIMER_OFF(circuit->t_send_csnp[0]);
THREAD_TIMER_OFF(circuit->t_send_csnp[1]);
THREAD_TIMER_OFF(circuit->t_send_psnp[0]);
THREAD_TIMER_OFF(circuit->t_send_psnp[1]);
THREAD_OFF(circuit->t_send_lsp);
THREAD_OFF(circuit->t_read);
if (circuit->tx_queue) {
isis_tx_queue_free(circuit->tx_queue);
circuit->tx_queue = NULL;
}
/* send one gratuitous hello to spead up convergence */
if (circuit->state == C_STATE_UP) {
if (circuit->is_type & IS_LEVEL_1)
send_hello(circuit, IS_LEVEL_1);
if (circuit->is_type & IS_LEVEL_2)
send_hello(circuit, IS_LEVEL_2);
}
circuit->upadjcount[0] = 0;
circuit->upadjcount[1] = 0;
/* close the socket */
if (circuit->fd) {
close(circuit->fd);
circuit->fd = 0;
}
if (circuit->rcv_stream != NULL) {
stream_free(circuit->rcv_stream);
circuit->rcv_stream = NULL;
}
if (circuit->snd_stream != NULL) {
stream_free(circuit->snd_stream);
circuit->snd_stream = NULL;
}
thread_cancel_event(master, circuit);
return;
}
void circuit_update_nlpids(struct isis_circuit *circuit)
{
circuit->nlpids.count = 0;
if (circuit->ip_router) {
circuit->nlpids.nlpids[0] = NLPID_IP;
circuit->nlpids.count++;
}
if (circuit->ipv6_router) {
circuit->nlpids.nlpids[circuit->nlpids.count] = NLPID_IPV6;
circuit->nlpids.count++;
}
return;
}
void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
char detail)
{
if (detail == ISIS_UI_LEVEL_BRIEF) {
vty_out(vty, " %-12s", circuit->interface->name);
vty_out(vty, "0x%-7x", circuit->circuit_id);
vty_out(vty, "%-9s", circuit_state2string(circuit->state));
vty_out(vty, "%-9s", circuit_type2string(circuit->circ_type));
vty_out(vty, "%-9s", circuit_t2string(circuit->is_type));
vty_out(vty, "\n");
}
if (detail == ISIS_UI_LEVEL_DETAIL) {
struct listnode *node;
struct prefix *ip_addr;
char buf[BUFSIZ];
vty_out(vty, " Interface: %s", circuit->interface->name);
vty_out(vty, ", State: %s",
circuit_state2string(circuit->state));
if (circuit->is_passive)
vty_out(vty, ", Passive");
else
vty_out(vty, ", Active");
vty_out(vty, ", Circuit Id: 0x%x", circuit->circuit_id);
vty_out(vty, "\n");
vty_out(vty, " Type: %s",
circuit_type2string(circuit->circ_type));
vty_out(vty, ", Level: %s", circuit_t2string(circuit->is_type));
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
vty_out(vty, ", SNPA: %-10s",
snpa_print(circuit->u.bc.snpa));
vty_out(vty, "\n");
if (circuit->is_type & IS_LEVEL_1) {
vty_out(vty, " Level-1 Information:\n");
if (circuit->area->newmetric)
vty_out(vty, " Metric: %d",
circuit->te_metric[0]);
else
vty_out(vty, " Metric: %d",
circuit->metric[0]);
if (!circuit->is_passive) {
vty_out(vty, ", Active neighbors: %u\n",
circuit->upadjcount[0]);
vty_out(vty,
" Hello interval: %u, "
"Holddown count: %u %s\n",
circuit->hello_interval[0],
circuit->hello_multiplier[0],
(circuit->pad_hellos ? "(pad)"
: "(no-pad)"));
vty_out(vty,
" CNSP interval: %u, "
"PSNP interval: %u\n",
circuit->csnp_interval[0],
circuit->psnp_interval[0]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
vty_out(vty,
" LAN Priority: %u, %s\n",
circuit->priority[0],
(circuit->u.bc.is_dr[0]
? "is DIS"
: "is not DIS"));
} else {
vty_out(vty, "\n");
}
}
if (circuit->is_type & IS_LEVEL_2) {
vty_out(vty, " Level-2 Information:\n");
if (circuit->area->newmetric)
vty_out(vty, " Metric: %d",
circuit->te_metric[1]);
else
vty_out(vty, " Metric: %d",
circuit->metric[1]);
if (!circuit->is_passive) {
vty_out(vty, ", Active neighbors: %u\n",
circuit->upadjcount[1]);
vty_out(vty,
" Hello interval: %u, "
"Holddown count: %u %s\n",
circuit->hello_interval[1],
circuit->hello_multiplier[1],
(circuit->pad_hellos ? "(pad)"
: "(no-pad)"));
vty_out(vty,
" CNSP interval: %u, "
"PSNP interval: %u\n",
circuit->csnp_interval[1],
circuit->psnp_interval[1]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST)
vty_out(vty,
" LAN Priority: %u, %s\n",
circuit->priority[1],
(circuit->u.bc.is_dr[1]
? "is DIS"
: "is not DIS"));
} else {
vty_out(vty, "\n");
}
}
if (circuit->ip_addrs && listcount(circuit->ip_addrs) > 0) {
vty_out(vty, " IP Prefix(es):\n");
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node,
ip_addr)) {
prefix2str(ip_addr, buf, sizeof(buf));
vty_out(vty, " %s\n", buf);
}
}
if (circuit->ipv6_link && listcount(circuit->ipv6_link) > 0) {
vty_out(vty, " IPv6 Link-Locals:\n");
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node,
ip_addr)) {
prefix2str(ip_addr, (char *)buf, BUFSIZ);
vty_out(vty, " %s\n", buf);
}
}
if (circuit->ipv6_non_link
&& listcount(circuit->ipv6_non_link) > 0) {
vty_out(vty, " IPv6 Prefixes:\n");
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node,
ip_addr)) {
prefix2str(ip_addr, (char *)buf, BUFSIZ);
vty_out(vty, " %s\n", buf);
}
}
vty_out(vty, "\n");
}
return;
}
int isis_interface_config_write(struct vty *vty)
{
struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
int write = 0;
struct listnode *node;
struct interface *ifp;
struct isis_area *area;
struct isis_circuit *circuit;
int i;
FOR_ALL_INTERFACES (vrf, ifp) {
/* IF name */
vty_frame(vty, "interface %s\n", ifp->name);
write++;
/* IF desc */
if (ifp->desc) {
vty_out(vty, " description %s\n", ifp->desc);
write++;
}
/* ISIS Circuit */
for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {
circuit =
circuit_lookup_by_ifp(ifp, area->circuit_list);
if (circuit == NULL)
continue;
if (circuit->ip_router) {
vty_out(vty, " ip router " PROTO_NAME " %s\n",
area->area_tag);
write++;
}
if (circuit->is_passive) {
vty_out(vty, " " PROTO_NAME " passive\n");
write++;
}
if (circuit->circ_type_config == CIRCUIT_T_P2P) {
vty_out(vty, " " PROTO_NAME " network point-to-point\n");
write++;
}
if (circuit->ipv6_router) {
vty_out(vty, " ipv6 router " PROTO_NAME " %s\n",
area->area_tag);
write++;
}
/* ISIS - circuit type */
if (!fabricd) {
if (circuit->is_type == IS_LEVEL_1) {
vty_out(vty, " " PROTO_NAME " circuit-type level-1\n");
write++;
} else {
if (circuit->is_type == IS_LEVEL_2) {
vty_out(vty,
" " PROTO_NAME " circuit-type level-2-only\n");
write++;
}
}
}
/* ISIS - CSNP interval */
if (circuit->csnp_interval[0]
== circuit->csnp_interval[1]) {
if (circuit->csnp_interval[0]
!= DEFAULT_CSNP_INTERVAL) {
vty_out(vty, " " PROTO_NAME " csnp-interval %d\n",
circuit->csnp_interval[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->csnp_interval[i]
!= DEFAULT_CSNP_INTERVAL) {
vty_out(vty,
" " PROTO_NAME " csnp-interval %d level-%d\n",
circuit->csnp_interval
[i],
i + 1);
write++;
}
}
}
/* ISIS - PSNP interval */
if (circuit->psnp_interval[0]
== circuit->psnp_interval[1]) {
if (circuit->psnp_interval[0]
!= DEFAULT_PSNP_INTERVAL) {
vty_out(vty, " " PROTO_NAME " psnp-interval %d\n",
circuit->psnp_interval[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->psnp_interval[i]
!= DEFAULT_PSNP_INTERVAL) {
vty_out(vty,
" " PROTO_NAME " psnp-interval %d level-%d\n",
circuit->psnp_interval
[i],
i + 1);
write++;
}
}
}
/* ISIS - Hello padding - Defaults to true so only
* display if false */
if (circuit->pad_hellos == 0) {
vty_out(vty, " no " PROTO_NAME " hello padding\n");
write++;
}
if (circuit->disable_threeway_adj) {
vty_out(vty, " no isis three-way-handshake\n");
write++;
}
/* ISIS - Hello interval */
if (circuit->hello_interval[0]
== circuit->hello_interval[1]) {
if (circuit->hello_interval[0]
!= DEFAULT_HELLO_INTERVAL) {
vty_out(vty,
" " PROTO_NAME " hello-interval %d\n",
circuit->hello_interval[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->hello_interval[i]
!= DEFAULT_HELLO_INTERVAL) {
vty_out(vty,
" " PROTO_NAME " hello-interval %d level-%d\n",
circuit->hello_interval
[i],
i + 1);
write++;
}
}
}
/* ISIS - Hello Multiplier */
if (circuit->hello_multiplier[0]
== circuit->hello_multiplier[1]) {
if (circuit->hello_multiplier[0]
!= DEFAULT_HELLO_MULTIPLIER) {
vty_out(vty,
" " PROTO_NAME " hello-multiplier %d\n",
circuit->hello_multiplier[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->hello_multiplier[i]
!= DEFAULT_HELLO_MULTIPLIER) {
vty_out(vty,
" " PROTO_NAME " hello-multiplier %d level-%d\n",
circuit->hello_multiplier
[i],
i + 1);
write++;
}
}
}
/* ISIS - Priority */
if (circuit->priority[0] == circuit->priority[1]) {
if (circuit->priority[0] != DEFAULT_PRIORITY) {
vty_out(vty, " " PROTO_NAME " priority %d\n",
circuit->priority[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->priority[i]
!= DEFAULT_PRIORITY) {
vty_out(vty,
" " PROTO_NAME " priority %d level-%d\n",
circuit->priority[i],
i + 1);
write++;
}
}
}
/* ISIS - Metric */
if (circuit->te_metric[0] == circuit->te_metric[1]) {
if (circuit->te_metric[0]
!= DEFAULT_CIRCUIT_METRIC) {
vty_out(vty, " " PROTO_NAME " metric %d\n",
circuit->te_metric[0]);
write++;
}
} else {
for (i = 0; i < 2; i++) {
if (circuit->te_metric[i]
!= DEFAULT_CIRCUIT_METRIC) {
vty_out(vty,
" " PROTO_NAME " metric %d level-%d\n",
circuit->te_metric[i],
i + 1);
write++;
}
}
}
if (circuit->passwd.type == ISIS_PASSWD_TYPE_HMAC_MD5) {
vty_out(vty, " " PROTO_NAME " password md5 %s\n",
circuit->passwd.passwd);
write++;
} else if (circuit->passwd.type
== ISIS_PASSWD_TYPE_CLEARTXT) {
vty_out(vty, " " PROTO_NAME " password clear %s\n",
circuit->passwd.passwd);
write++;
}
write += circuit_write_mt_settings(circuit, vty);
}
vty_endframe(vty, "!\n");
}
return write;
}
struct isis_circuit *isis_circuit_create(struct isis_area *area,
struct interface *ifp)
{
struct isis_circuit *circuit = circuit_scan_by_ifp(ifp);
if (circuit && circuit->area)
return NULL;
circuit = isis_csm_state_change(ISIS_ENABLE, circuit, area);
if (circuit->state != C_STATE_CONF && circuit->state != C_STATE_UP)
return circuit;
isis_circuit_if_bind(circuit, ifp);
return circuit;
}
void isis_circuit_af_set(struct isis_circuit *circuit, bool ip_router,
bool ipv6_router)
{
struct isis_area *area = circuit->area;
bool change = circuit->ip_router != ip_router
|| circuit->ipv6_router != ipv6_router;
area->ip_circuits += ip_router - circuit->ip_router;
area->ipv6_circuits += ipv6_router - circuit->ipv6_router;
circuit->ip_router = ip_router;
circuit->ipv6_router = ipv6_router;
if (!change)
return;
circuit_update_nlpids(circuit);
if (!ip_router && !ipv6_router)
isis_csm_state_change(ISIS_DISABLE, circuit, area);
else
lsp_regenerate_schedule(circuit->area, circuit->is_type, 0);
}
ferr_r isis_circuit_passive_set(struct isis_circuit *circuit, bool passive)
{
if (circuit->is_passive == passive)
return ferr_ok();
if (if_is_loopback(circuit->interface) && !passive)
return ferr_cfg_invalid("loopback is always passive");
if (circuit->state != C_STATE_UP) {
circuit->is_passive = passive;
} else {
struct isis_area *area = circuit->area;
isis_csm_state_change(ISIS_DISABLE, circuit, area);
circuit->is_passive = passive;
isis_csm_state_change(ISIS_ENABLE, circuit, area);
}
return ferr_ok();
}
ferr_r isis_circuit_metric_set(struct isis_circuit *circuit, int level,
int metric)
{
assert(level == IS_LEVEL_1 || level == IS_LEVEL_2);
if (metric > MAX_WIDE_LINK_METRIC)
return ferr_cfg_invalid("metric %d too large for wide metric",
metric);
if (circuit->area && circuit->area->oldmetric
&& metric > MAX_NARROW_LINK_METRIC)
return ferr_cfg_invalid("metric %d too large for narrow metric",
metric);
circuit->te_metric[level - 1] = metric;
circuit->metric[level - 1] = metric;
if (circuit->area)
lsp_regenerate_schedule(circuit->area, level, 0);
return ferr_ok();
}
ferr_r isis_circuit_passwd_unset(struct isis_circuit *circuit)
{
memset(&circuit->passwd, 0, sizeof(circuit->passwd));
return ferr_ok();
}
static int isis_circuit_passwd_set(struct isis_circuit *circuit,
uint8_t passwd_type, const char *passwd)
{
int len;
if (!passwd)
return ferr_code_bug("no circuit password given");
len = strlen(passwd);
if (len > 254)
return ferr_code_bug(
"circuit password too long (max 254 chars)");
circuit->passwd.len = len;
strncpy((char *)circuit->passwd.passwd, passwd, 255);
circuit->passwd.type = passwd_type;
return ferr_ok();
}
ferr_r isis_circuit_passwd_cleartext_set(struct isis_circuit *circuit,
const char *passwd)
{
return isis_circuit_passwd_set(circuit, ISIS_PASSWD_TYPE_CLEARTXT,
passwd);
}
ferr_r isis_circuit_passwd_hmac_md5_set(struct isis_circuit *circuit,
const char *passwd)
{
return isis_circuit_passwd_set(circuit, ISIS_PASSWD_TYPE_HMAC_MD5,
passwd);
}
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)
{
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");
}
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,
bool enabled)
{
struct isis_circuit_mt_setting *setting;
setting = circuit_get_mt_setting(circuit, mtid);
if (setting->enabled != enabled) {
setting->enabled = enabled;
lsp_regenerate_schedule(circuit->area, IS_LEVEL_1 | IS_LEVEL_2,
0);
}
return CMD_SUCCESS;
}
int isis_if_new_hook(struct interface *ifp)
{
return 0;
}
int isis_if_delete_hook(struct interface *ifp)
{
struct isis_circuit *circuit;
/* Clean up the circuit data */
if (ifp && ifp->info) {
circuit = ifp->info;
isis_csm_state_change(IF_DOWN_FROM_Z, circuit, circuit->area);
isis_csm_state_change(ISIS_DISABLE, circuit, circuit->area);
}
return 0;
}
void isis_circuit_init()
{
/* Initialize Zebra interface data structure */
hook_register_prio(if_add, 0, isis_if_new_hook);
hook_register_prio(if_del, 0, isis_if_delete_hook);
/* Install interface node */
install_node(&interface_node, isis_interface_config_write);
if_cmd_init();
}
|