]> git.proxmox.com Git - mirror_frr.git/blob - zebra/irdp_interface.c
Merge pull request #12438 from proelbtn/fix-#12349
[mirror_frr.git] / zebra / irdp_interface.c
1 /*
2 *
3 * Copyright (C) 1997, 2000
4 * Portions:
5 * Swedish University of Agricultural Sciences
6 * Robert Olsson
7 * Kunihiro Ishiguro
8 *
9 * Thanks to Jens Laas at Swedish University of Agricultural Sciences
10 * for reviewing and tests.
11 *
12 * This file is part of GNU Zebra.
13 *
14 * GNU Zebra is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2, or (at your option) any
17 * later version.
18 *
19 * GNU Zebra is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; see the file COPYING; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29 #include <zebra.h>
30
31 #include "if.h"
32 #include "vty.h"
33 #include "sockunion.h"
34 #include "prefix.h"
35 #include "command.h"
36 #include "memory.h"
37 #include "stream.h"
38 #include "ioctl.h"
39 #include "connected.h"
40 #include "log.h"
41 #include "zclient.h"
42 #include "thread.h"
43 #include "lib_errors.h"
44 #include "zebra/interface.h"
45 #include "zebra/rtadv.h"
46 #include "zebra/rib.h"
47 #include "zebra/zebra_router.h"
48 #include "zebra/redistribute.h"
49 #include "zebra/irdp.h"
50 #include "zebra/zebra_errors.h"
51 #include <netinet/ip_icmp.h>
52 #include "if.h"
53 #include "sockunion.h"
54 #include "log.h"
55 #include "network.h"
56
57 extern int irdp_sock;
58
59 DEFINE_MTYPE_STATIC(ZEBRA, IRDP_IF, "IRDP interface data");
60
61 #define IRDP_CONFIGED \
62 do { \
63 if (!irdp) { \
64 vty_out(vty, \
65 "Please Configure IRDP before using this command\n"); \
66 return CMD_WARNING_CONFIG_FAILED; \
67 } \
68 } while (0)
69
70 static struct irdp_interface *irdp_if_get(struct interface *ifp)
71 {
72 struct zebra_if *zi = ifp->info;
73
74 if (!zi)
75 return NULL;
76
77 if (!zi->irdp)
78 zi->irdp = XCALLOC(MTYPE_IRDP_IF, sizeof(*zi->irdp));
79
80 if (!zi->irdp->started)
81 return NULL;
82
83 return zi->irdp;
84 }
85
86 static int irdp_if_delete(struct interface *ifp)
87 {
88 struct zebra_if *zi = ifp->info;
89 if (!zi)
90 return 0;
91 XFREE(MTYPE_IRDP_IF, zi->irdp);
92 return 0;
93 }
94
95 static const char *inet_2a(uint32_t a, char *b, size_t b_len)
96 {
97 snprintf(b, b_len, "%u.%u.%u.%u", (a)&0xFF, (a >> 8) & 0xFF,
98 (a >> 16) & 0xFF, (a >> 24) & 0xFF);
99 return b;
100 }
101
102
103 static struct prefix *irdp_get_prefix(struct interface *ifp)
104 {
105 struct listnode *node;
106 struct connected *ifc;
107
108 if (ifp->connected)
109 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc))
110 return ifc->address;
111
112 return NULL;
113 }
114
115 /* Join to the add/leave multicast group. */
116 static int if_group(struct interface *ifp, int sock, uint32_t group,
117 int add_leave)
118 {
119 struct ip_mreq m;
120 struct prefix *p;
121 int ret;
122 char b1[INET_ADDRSTRLEN];
123
124 memset(&m, 0, sizeof(m));
125 m.imr_multiaddr.s_addr = htonl(group);
126 p = irdp_get_prefix(ifp);
127
128 if (!p) {
129 flog_warn(EC_ZEBRA_NO_IFACE_ADDR,
130 "IRDP: can't get address for %s", ifp->name);
131 return 1;
132 }
133
134 m.imr_interface = p->u.prefix4;
135
136 ret = setsockopt(sock, IPPROTO_IP, add_leave, (char *)&m,
137 sizeof(struct ip_mreq));
138 if (ret < 0)
139 flog_err_sys(EC_LIB_SOCKET, "IRDP: %s can't setsockopt %s: %s",
140 add_leave == IP_ADD_MEMBERSHIP ? "join group"
141 : "leave group",
142 inet_2a(group, b1, sizeof(b1)),
143 safe_strerror(errno));
144
145 return ret;
146 }
147
148 static int if_add_group(struct interface *ifp)
149 {
150 struct zebra_if *zi = ifp->info;
151 struct irdp_interface *irdp = zi->irdp;
152 int ret;
153 char b1[INET_ADDRSTRLEN];
154
155 if (!irdp)
156 return -1;
157
158 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP, IP_ADD_MEMBERSHIP);
159 if (ret < 0) {
160 return ret;
161 }
162
163 if (irdp->flags & IF_DEBUG_MISC)
164 zlog_debug("IRDP: Adding group %s for %s",
165 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1, sizeof(b1)),
166 ifp->name);
167 return 0;
168 }
169
170 static int if_drop_group(struct interface *ifp)
171 {
172 struct zebra_if *zi = ifp->info;
173 struct irdp_interface *irdp = zi->irdp;
174 int ret;
175 char b1[INET_ADDRSTRLEN];
176
177 if (!irdp)
178 return -1;
179
180 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP,
181 IP_DROP_MEMBERSHIP);
182 if (ret < 0)
183 return ret;
184
185 if (irdp->flags & IF_DEBUG_MISC)
186 zlog_debug("IRDP: Leaving group %s for %s",
187 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1, sizeof(b1)),
188 ifp->name);
189 return 0;
190 }
191
192 static void if_set_defaults(struct irdp_interface *irdp)
193 {
194 irdp->MaxAdvertInterval = IRDP_MAXADVERTINTERVAL;
195 irdp->MinAdvertInterval = IRDP_MINADVERTINTERVAL;
196 irdp->Preference = IRDP_PREFERENCE;
197 irdp->Lifetime = IRDP_LIFETIME;
198 }
199
200
201 static struct Adv *Adv_new(void)
202 {
203 return XCALLOC(MTYPE_IRDP_IF, sizeof(struct Adv));
204 }
205
206 static void Adv_free(struct Adv *adv)
207 {
208 XFREE(MTYPE_IRDP_IF, adv);
209 }
210
211 static void irdp_if_start(struct interface *ifp, int multicast,
212 int set_defaults)
213 {
214 struct zebra_if *zi = ifp->info;
215 struct irdp_interface *irdp = zi->irdp;
216 struct listnode *node;
217 struct connected *ifc;
218 uint32_t timer, seed;
219
220 assert(irdp);
221
222 irdp->started = true;
223 if (irdp->flags & IF_ACTIVE) {
224 zlog_debug("IRDP: Interface is already active %s", ifp->name);
225 return;
226 }
227 if ((irdp_sock < 0) && ((irdp_sock = irdp_sock_init()) < 0)) {
228 flog_warn(EC_ZEBRA_IRDP_CANNOT_ACTIVATE_IFACE,
229 "IRDP: Cannot activate interface %s (cannot create IRDP socket)",
230 ifp->name);
231 return;
232 }
233 irdp->flags |= IF_ACTIVE;
234
235 if (!multicast)
236 irdp->flags |= IF_BROADCAST;
237
238 if_add_update(ifp);
239
240 if (!(ifp->flags & IFF_UP)) {
241 flog_warn(EC_ZEBRA_IRDP_IFACE_DOWN,
242 "IRDP: Interface is down %s", ifp->name);
243 }
244
245 /* Shall we cancel if_start if if_add_group fails? */
246
247 if (multicast) {
248 if_add_group(ifp);
249
250 if (!(ifp->flags & (IFF_MULTICAST | IFF_ALLMULTI))) {
251 flog_warn(EC_ZEBRA_IRDP_IFACE_MCAST_DISABLED,
252 "IRDP: Interface not multicast enabled %s",
253 ifp->name);
254 }
255 }
256
257 if (set_defaults)
258 if_set_defaults(irdp);
259
260 irdp->irdp_sent = 0;
261
262 /* The spec suggests this for randomness */
263
264 seed = 0;
265 if (ifp->connected)
266 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
267 seed = ifc->address->u.prefix4.s_addr;
268 break;
269 }
270
271 srandom(seed);
272 timer = (frr_weak_random() % IRDP_DEFAULT_INTERVAL) + 1;
273
274 irdp->AdvPrefList = list_new();
275 irdp->AdvPrefList->del = (void (*)(void *))Adv_free; /* Destructor */
276
277
278 /* And this for startup. Speed limit from 1991 :-). But it's OK*/
279
280 if (irdp->irdp_sent < MAX_INITIAL_ADVERTISEMENTS
281 && timer > MAX_INITIAL_ADVERT_INTERVAL)
282 timer = MAX_INITIAL_ADVERT_INTERVAL;
283
284
285 if (irdp->flags & IF_DEBUG_MISC)
286 zlog_debug("IRDP: Init timer for %s set to %u", ifp->name,
287 timer);
288
289 irdp->t_advertise = NULL;
290 thread_add_timer(zrouter.master, irdp_send_thread, ifp, timer,
291 &irdp->t_advertise);
292 }
293
294 static void irdp_if_stop(struct interface *ifp)
295 {
296 struct zebra_if *zi = ifp->info;
297 struct irdp_interface *irdp = zi->irdp;
298
299 if (irdp == NULL) {
300 zlog_debug("Interface %s structure is NULL", ifp->name);
301 return;
302 }
303
304 if (!(irdp->flags & IF_ACTIVE)) {
305 zlog_debug("Interface is not active %s", ifp->name);
306 return;
307 }
308
309 if (!(irdp->flags & IF_BROADCAST))
310 if_drop_group(ifp);
311
312 irdp_advert_off(ifp);
313
314 list_delete(&irdp->AdvPrefList);
315
316 irdp->flags = 0;
317 }
318
319
320 static void irdp_if_shutdown(struct interface *ifp)
321 {
322 struct zebra_if *zi = ifp->info;
323 struct irdp_interface *irdp = zi->irdp;
324
325 if (!irdp)
326 return;
327
328 if (irdp->flags & IF_SHUTDOWN) {
329 zlog_debug("IRDP: Interface is already shutdown %s", ifp->name);
330 return;
331 }
332
333 irdp->flags |= IF_SHUTDOWN;
334 irdp->flags &= ~IF_ACTIVE;
335
336 if (!(irdp->flags & IF_BROADCAST))
337 if_drop_group(ifp);
338
339 /* Tell the hosts we are out of service */
340 irdp_advert_off(ifp);
341 }
342
343 static void irdp_if_no_shutdown(struct interface *ifp)
344 {
345 struct irdp_interface *irdp = irdp_if_get(ifp);
346
347 if (!irdp)
348 return;
349
350 if (!(irdp->flags & IF_SHUTDOWN)) {
351 zlog_debug("IRDP: Interface is not shutdown %s", ifp->name);
352 return;
353 }
354
355 irdp->flags &= ~IF_SHUTDOWN;
356
357 irdp_if_start(ifp, irdp->flags & IF_BROADCAST ? false : true, false);
358 }
359
360
361 /* Write configuration to user */
362
363 int irdp_config_write(struct vty *vty, struct interface *ifp)
364 {
365 struct zebra_if *zi = ifp->info;
366 struct irdp_interface *irdp = zi->irdp;
367 struct Adv *adv;
368 struct listnode *node;
369 char b1[INET_ADDRSTRLEN];
370
371 if (!irdp)
372 return 0;
373
374 if (irdp->flags & IF_ACTIVE || irdp->flags & IF_SHUTDOWN) {
375
376 if (irdp->flags & IF_SHUTDOWN)
377 vty_out(vty, " ip irdp shutdown \n");
378
379 if (irdp->flags & IF_BROADCAST)
380 vty_out(vty, " ip irdp broadcast\n");
381 else
382 vty_out(vty, " ip irdp multicast\n");
383
384 vty_out(vty, " ip irdp preference %ld\n", irdp->Preference);
385
386 for (ALL_LIST_ELEMENTS_RO(irdp->AdvPrefList, node, adv))
387 vty_out(vty, " ip irdp address %s preference %d\n",
388 inet_2a(adv->ip.s_addr, b1, sizeof(b1)),
389 adv->pref);
390
391 vty_out(vty, " ip irdp holdtime %d\n", irdp->Lifetime);
392
393 vty_out(vty, " ip irdp minadvertinterval %ld\n",
394 irdp->MinAdvertInterval);
395
396 vty_out(vty, " ip irdp maxadvertinterval %ld\n",
397 irdp->MaxAdvertInterval);
398 }
399 return 0;
400 }
401
402
403 DEFUN (ip_irdp_multicast,
404 ip_irdp_multicast_cmd,
405 "ip irdp multicast",
406 IP_STR
407 "ICMP Router discovery on this interface\n"
408 "Use multicast mode\n")
409 {
410 VTY_DECLVAR_CONTEXT(interface, ifp);
411 irdp_if_get(ifp);
412
413 irdp_if_start(ifp, true, true);
414 return CMD_SUCCESS;
415 }
416
417 DEFUN (ip_irdp_broadcast,
418 ip_irdp_broadcast_cmd,
419 "ip irdp broadcast",
420 IP_STR
421 "ICMP Router discovery on this interface\n"
422 "Use broadcast mode\n")
423 {
424 VTY_DECLVAR_CONTEXT(interface, ifp);
425 irdp_if_get(ifp);
426
427 irdp_if_start(ifp, false, true);
428 return CMD_SUCCESS;
429 }
430
431 DEFUN (no_ip_irdp,
432 no_ip_irdp_cmd,
433 "no ip irdp",
434 NO_STR
435 IP_STR
436 "Disable ICMP Router discovery on this interface\n")
437 {
438 VTY_DECLVAR_CONTEXT(interface, ifp);
439
440 irdp_if_stop(ifp);
441 return CMD_SUCCESS;
442 }
443
444 DEFUN (ip_irdp_shutdown,
445 ip_irdp_shutdown_cmd,
446 "ip irdp shutdown",
447 IP_STR
448 "ICMP Router discovery on this interface\n"
449 "ICMP Router discovery shutdown on this interface\n")
450 {
451 VTY_DECLVAR_CONTEXT(interface, ifp);
452
453 irdp_if_shutdown(ifp);
454 return CMD_SUCCESS;
455 }
456
457 DEFUN (no_ip_irdp_shutdown,
458 no_ip_irdp_shutdown_cmd,
459 "no ip irdp shutdown",
460 NO_STR
461 IP_STR
462 "ICMP Router discovery on this interface\n"
463 "ICMP Router discovery no shutdown on this interface\n")
464 {
465 VTY_DECLVAR_CONTEXT(interface, ifp);
466
467 irdp_if_no_shutdown(ifp);
468 return CMD_SUCCESS;
469 }
470
471 DEFUN (ip_irdp_holdtime,
472 ip_irdp_holdtime_cmd,
473 "ip irdp holdtime (0-9000)",
474 IP_STR
475 "ICMP Router discovery on this interface\n"
476 "Set holdtime value\n"
477 "Holdtime value in seconds. Default is 1800 seconds\n")
478 {
479 int idx_number = 3;
480 VTY_DECLVAR_CONTEXT(interface, ifp);
481 struct irdp_interface *irdp = irdp_if_get(ifp);
482
483 IRDP_CONFIGED;
484
485 irdp->Lifetime = atoi(argv[idx_number]->arg);
486 return CMD_SUCCESS;
487 }
488
489 DEFUN (ip_irdp_minadvertinterval,
490 ip_irdp_minadvertinterval_cmd,
491 "ip irdp minadvertinterval (3-1800)",
492 IP_STR
493 "ICMP Router discovery on this interface\n"
494 "Set minimum time between advertisement\n"
495 "Minimum advertisement interval in seconds\n")
496 {
497 int idx_number = 3;
498 VTY_DECLVAR_CONTEXT(interface, ifp);
499 struct irdp_interface *irdp = irdp_if_get(ifp);
500
501 IRDP_CONFIGED;
502
503 if ((unsigned)atoi(argv[idx_number]->arg) <= irdp->MaxAdvertInterval) {
504 irdp->MinAdvertInterval = atoi(argv[idx_number]->arg);
505 return CMD_SUCCESS;
506 } else {
507 vty_out(vty,
508 "%% MinAdvertInterval must be less than or equal to MaxAdvertInterval\n");
509 return CMD_WARNING_CONFIG_FAILED;
510 }
511 }
512
513 DEFUN (ip_irdp_maxadvertinterval,
514 ip_irdp_maxadvertinterval_cmd,
515 "ip irdp maxadvertinterval (4-1800)",
516 IP_STR
517 "ICMP Router discovery on this interface\n"
518 "Set maximum time between advertisement\n"
519 "Maximum advertisement interval in seconds\n")
520 {
521 int idx_number = 3;
522 VTY_DECLVAR_CONTEXT(interface, ifp);
523 struct irdp_interface *irdp = irdp_if_get(ifp);
524
525 IRDP_CONFIGED;
526
527 if (irdp->MinAdvertInterval <= (unsigned)atoi(argv[idx_number]->arg)) {
528 irdp->MaxAdvertInterval = atoi(argv[idx_number]->arg);
529 return CMD_SUCCESS;
530 } else {
531 vty_out(vty,
532 "%% MaxAdvertInterval must be greater than or equal to MinAdvertInterval\n");
533 return CMD_WARNING_CONFIG_FAILED;
534 }
535 }
536
537 /* DEFUN needs to be fixed for negative ranages...
538 * "ip irdp preference <-2147483648-2147483647>",
539 * Be positive for now. :-)
540 */
541
542 DEFUN (ip_irdp_preference,
543 ip_irdp_preference_cmd,
544 "ip irdp preference (0-2147483647)",
545 IP_STR
546 "ICMP Router discovery on this interface\n"
547 "Set default preference level for this interface\n"
548 "Preference level\n")
549 {
550 int idx_number = 3;
551 VTY_DECLVAR_CONTEXT(interface, ifp);
552 struct irdp_interface *irdp = irdp_if_get(ifp);
553
554 IRDP_CONFIGED;
555
556 irdp->Preference = atoi(argv[idx_number]->arg);
557 return CMD_SUCCESS;
558 }
559
560 DEFUN (ip_irdp_address_preference,
561 ip_irdp_address_preference_cmd,
562 "ip irdp address A.B.C.D preference (0-2147483647)",
563 IP_STR
564 "Alter ICMP Router discovery preference on this interface\n"
565 "Set IRDP address for advertise\n"
566 "IPv4 address\n"
567 "Specify IRDP non-default preference to advertise\n"
568 "Preference level\n")
569 {
570 int idx_ipv4 = 3;
571 int idx_number = 5;
572 VTY_DECLVAR_CONTEXT(interface, ifp);
573 struct irdp_interface *irdp = irdp_if_get(ifp);
574 struct listnode *node;
575 struct in_addr ip;
576 int pref;
577 int ret;
578 struct Adv *adv;
579
580 IRDP_CONFIGED;
581
582 ret = inet_aton(argv[idx_ipv4]->arg, &ip);
583 if (!ret)
584 return CMD_WARNING_CONFIG_FAILED;
585
586 pref = atoi(argv[idx_number]->arg);
587
588 for (ALL_LIST_ELEMENTS_RO(irdp->AdvPrefList, node, adv))
589 if (adv->ip.s_addr == ip.s_addr)
590 return CMD_SUCCESS;
591
592 adv = Adv_new();
593 adv->ip = ip;
594 adv->pref = pref;
595 listnode_add(irdp->AdvPrefList, adv);
596
597 return CMD_SUCCESS;
598 }
599
600 DEFUN (no_ip_irdp_address_preference,
601 no_ip_irdp_address_preference_cmd,
602 "no ip irdp address A.B.C.D preference (0-2147483647)",
603 NO_STR
604 IP_STR
605 "Alter ICMP Router discovery preference on this interface\n"
606 "Select IRDP address\n"
607 "IPv4 address\n"
608 "Reset ICMP Router discovery preference on this interface\n"
609 "Old preference level\n")
610 {
611 int idx_ipv4 = 4;
612 VTY_DECLVAR_CONTEXT(interface, ifp);
613 struct irdp_interface *irdp = irdp_if_get(ifp);
614 struct listnode *node, *nnode;
615 struct in_addr ip;
616 int ret;
617 struct Adv *adv;
618
619 IRDP_CONFIGED;
620
621 ret = inet_aton(argv[idx_ipv4]->arg, &ip);
622 if (!ret)
623 return CMD_WARNING_CONFIG_FAILED;
624
625 for (ALL_LIST_ELEMENTS(irdp->AdvPrefList, node, nnode, adv)) {
626 if (adv->ip.s_addr == ip.s_addr) {
627 listnode_delete(irdp->AdvPrefList, adv);
628 break;
629 }
630 }
631
632 return CMD_SUCCESS;
633 }
634
635 DEFUN (ip_irdp_debug_messages,
636 ip_irdp_debug_messages_cmd,
637 "ip irdp debug messages",
638 IP_STR
639 "ICMP Router discovery debug Averts. and Solicits (short)\n"
640 "IRDP debugging options\n"
641 "Enable debugging for IRDP messages\n")
642 {
643 VTY_DECLVAR_CONTEXT(interface, ifp);
644 struct irdp_interface *irdp = irdp_if_get(ifp);
645
646 IRDP_CONFIGED;
647
648 irdp->flags |= IF_DEBUG_MESSAGES;
649
650 return CMD_SUCCESS;
651 }
652
653 DEFUN (ip_irdp_debug_misc,
654 ip_irdp_debug_misc_cmd,
655 "ip irdp debug misc",
656 IP_STR
657 "ICMP Router discovery debug Averts. and Solicits (short)\n"
658 "IRDP debugging options\n"
659 "Enable debugging for miscellaneous IRDP events\n")
660 {
661 VTY_DECLVAR_CONTEXT(interface, ifp);
662 struct irdp_interface *irdp = irdp_if_get(ifp);
663
664 IRDP_CONFIGED;
665
666 irdp->flags |= IF_DEBUG_MISC;
667
668 return CMD_SUCCESS;
669 }
670
671 DEFUN (ip_irdp_debug_packet,
672 ip_irdp_debug_packet_cmd,
673 "ip irdp debug packet",
674 IP_STR
675 "ICMP Router discovery debug Averts. and Solicits (short)\n"
676 "IRDP debugging options\n"
677 "Enable debugging for IRDP packets\n")
678 {
679 VTY_DECLVAR_CONTEXT(interface, ifp);
680 struct irdp_interface *irdp = irdp_if_get(ifp);
681
682 IRDP_CONFIGED;
683
684 irdp->flags |= IF_DEBUG_PACKET;
685
686 return CMD_SUCCESS;
687 }
688
689
690 DEFUN (ip_irdp_debug_disable,
691 ip_irdp_debug_disable_cmd,
692 "ip irdp debug disable",
693 IP_STR
694 "ICMP Router discovery debug Averts. and Solicits (short)\n"
695 "IRDP debugging options\n"
696 "Disable debugging for all IRDP events\n")
697 {
698 VTY_DECLVAR_CONTEXT(interface, ifp);
699 struct irdp_interface *irdp = irdp_if_get(ifp);
700
701 IRDP_CONFIGED;
702
703 irdp->flags &= ~IF_DEBUG_PACKET;
704 irdp->flags &= ~IF_DEBUG_MESSAGES;
705 irdp->flags &= ~IF_DEBUG_MISC;
706
707 return CMD_SUCCESS;
708 }
709
710 void irdp_if_init(void)
711 {
712 hook_register(zebra_if_config_wr, irdp_config_write);
713 hook_register(if_del, irdp_if_delete);
714
715 install_element(INTERFACE_NODE, &ip_irdp_broadcast_cmd);
716 install_element(INTERFACE_NODE, &ip_irdp_multicast_cmd);
717 install_element(INTERFACE_NODE, &no_ip_irdp_cmd);
718 install_element(INTERFACE_NODE, &ip_irdp_shutdown_cmd);
719 install_element(INTERFACE_NODE, &no_ip_irdp_shutdown_cmd);
720 install_element(INTERFACE_NODE, &ip_irdp_holdtime_cmd);
721 install_element(INTERFACE_NODE, &ip_irdp_maxadvertinterval_cmd);
722 install_element(INTERFACE_NODE, &ip_irdp_minadvertinterval_cmd);
723 install_element(INTERFACE_NODE, &ip_irdp_preference_cmd);
724 install_element(INTERFACE_NODE, &ip_irdp_address_preference_cmd);
725 install_element(INTERFACE_NODE, &no_ip_irdp_address_preference_cmd);
726
727 install_element(INTERFACE_NODE, &ip_irdp_debug_messages_cmd);
728 install_element(INTERFACE_NODE, &ip_irdp_debug_misc_cmd);
729 install_element(INTERFACE_NODE, &ip_irdp_debug_packet_cmd);
730 install_element(INTERFACE_NODE, &ip_irdp_debug_disable_cmd);
731 }