From 7e5e32b62f83c893eaf3d9bd0b77e3b5f029dc16 Mon Sep 17 00:00:00 2001 From: Sam Tannous Date: Thu, 4 May 2017 06:54:17 -0700 Subject: [PATCH 001/193] Remove uncalled function causing compiler error Ticket: CM-16086 Reviewed By: sharpd Testing Done: Built debs and tested on hardnode With snmp enabled, this function was causing compiler errors since it was not being called. Removed it. Signed-off-by: Sam Tannous --- lib/thread.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index e10d0c48bf..e3db7a93e5 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1153,28 +1153,6 @@ thread_process_fds_helper (struct thread_master *m, struct thread *thread, threa #if defined(HAVE_POLL) -#if defined(HAVE_SNMP) -/* add snmp fds to poll set */ -static void -add_snmp_pollfds(struct thread_master *m, fd_set *snmpfds, int fdsetsize) -{ - int i; - m->handler.pfdcountsnmp = m->handler.pfdcount; - /* cycle trough fds and add neccessary fds to poll set */ - for (i=0;ihandler.pfdcountsnmp <= m->handler.pfdsize); - - m->handler.pfds[m->handler.pfdcountsnmp].fd = i; - m->handler.pfds[m->handler.pfdcountsnmp].events = POLLIN; - m->handler.pfdcountsnmp++; - } - } -} -#endif - /* check poll events */ static void check_pollfds(struct thread_master *m, fd_set *readfd, int num) From a03d3c8040ff1f1b9ec907ed83918429d939ebb7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 4 May 2017 10:24:25 -0400 Subject: [PATCH 002/193] lib: Rename HAVE_POLL to prevent conflicting #defines Rename HAVE_POLL to HAVE_POLL_CALL, when compiling with snmp and poll enabled this was causing issues. Signed-off-by: Donald Sharp --- configure.ac | 2 +- lib/thread.c | 30 +++++++++++++++--------------- lib/thread.h | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 63fbc304fc..9b4af1f2bf 100755 --- a/configure.ac +++ b/configure.ac @@ -321,7 +321,7 @@ if test "${enable_rr_semantics}" != "no" ; then fi if test "${enable_poll}" = "yes" ; then - AC_DEFINE(HAVE_POLL,,Compile systemd support in) + AC_DEFINE(HAVE_POLL_CALL,,Compile systemd support in) fi dnl ---------- diff --git a/lib/thread.c b/lib/thread.c index e3db7a93e5..e71b1cb139 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -486,7 +486,7 @@ thread_master_create (void) rv->timer->cmp = rv->background->cmp = thread_timer_cmp; rv->timer->update = rv->background->update = thread_timer_update; -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) rv->handler.pfdsize = rv->fd_limit; rv->handler.pfdcount = 0; rv->handler.pfds = XCALLOC (MTYPE_THREAD_MASTER, @@ -642,7 +642,7 @@ thread_master_free (struct thread_master *m) thread_list_free (m, &m->unuse); thread_queue_free (m, m->background); -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) XFREE (MTYPE_THREAD_MASTER, m->handler.pfds); #endif XFREE (MTYPE_THREAD_MASTER, m); @@ -705,7 +705,7 @@ thread_get (struct thread_master *m, u_char type, return thread; } -#if defined (HAVE_POLL) +#if defined (HAVE_POLL_CALL) #define fd_copy_fd_set(X) (X) @@ -759,7 +759,7 @@ static int fd_select (struct thread_master *m, int size, thread_fd_set *read, thread_fd_set *write, thread_fd_set *except, struct timeval *timer_wait) { int num; -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) /* recalc timeout for poll. Attention NULL pointer is no timeout with select, where with poll no timeount is -1 */ int timeout = -1; @@ -777,7 +777,7 @@ fd_select (struct thread_master *m, int size, thread_fd_set *read, thread_fd_set static int fd_is_set (struct thread *thread, thread_fd_set *fdset, int pos) { -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) return 1; #else return FD_ISSET (THREAD_FD (thread), fdset); @@ -787,7 +787,7 @@ fd_is_set (struct thread *thread, thread_fd_set *fdset, int pos) static int fd_clear_read_write (struct thread *thread) { -#if !defined(HAVE_POLL) +#if !defined(HAVE_POLL_CALL) thread_fd_set *fdset = NULL; int fd = THREAD_FD (thread); @@ -812,7 +812,7 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, { struct thread *thread = NULL; -#if !defined(HAVE_POLL) +#if !defined(HAVE_POLL_CALL) thread_fd_set *fdset = NULL; if (dir == THREAD_READ) fdset = &m->handler.readfd; @@ -820,7 +820,7 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, fdset = &m->handler.writefd; #endif -#if defined (HAVE_POLL) +#if defined (HAVE_POLL_CALL) thread = generic_thread_add(m, func, arg, fd, dir, debugargpass); if (thread == NULL) @@ -969,7 +969,7 @@ funcname_thread_add_event (struct thread_master *m, static void thread_cancel_read_or_write (struct thread *thread, short int state) { -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) nfds_t i; for (i=0;imaster->handler.pfdcount;++i) @@ -1003,7 +1003,7 @@ thread_cancel (struct thread *thread) switch (thread->type) { case THREAD_READ: -#if defined (HAVE_POLL) +#if defined (HAVE_POLL_CALL) thread_cancel_read_or_write (thread, POLLIN | POLLHUP); #else thread_cancel_read_or_write (thread, 0); @@ -1011,7 +1011,7 @@ thread_cancel (struct thread *thread) thread_array = thread->master->read; break; case THREAD_WRITE: -#if defined (HAVE_POLL) +#if defined (HAVE_POLL_CALL) thread_cancel_read_or_write (thread, POLLOUT | POLLHUP); #else thread_cancel_read_or_write (thread, 0); @@ -1143,7 +1143,7 @@ thread_process_fds_helper (struct thread_master *m, struct thread *thread, threa thread_delete_fd (thread_array, thread); thread_list_add (&m->ready, thread); thread->type = THREAD_READY; -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) thread->master->handler.pfds[pos].events &= ~(state); #endif return 1; @@ -1151,7 +1151,7 @@ thread_process_fds_helper (struct thread_master *m, struct thread *thread, threa return 0; } -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) /* check poll events */ static void @@ -1192,7 +1192,7 @@ check_pollfds(struct thread_master *m, fd_set *readfd, int num) static void thread_process_fds (struct thread_master *m, thread_fd_set *rset, thread_fd_set *wset, int num) { -#if defined (HAVE_POLL) +#if defined (HAVE_POLL_CALL) check_pollfds (m, rset, num); #else int ready = 0, index; @@ -1280,7 +1280,7 @@ thread_fetch (struct thread_master *m, struct thread *fetch) thread_process (&m->event); /* Structure copy. */ -#if !defined(HAVE_POLL) +#if !defined(HAVE_POLL_CALL) readfd = fd_copy_fd_set(m->handler.readfd); writefd = fd_copy_fd_set(m->handler.writefd); exceptfd = fd_copy_fd_set(m->handler.exceptfd); diff --git a/lib/thread.h b/lib/thread.h index 3440a92999..35a11cb77e 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -49,7 +49,7 @@ struct pqueue; */ typedef fd_set thread_fd_set; -#if defined(HAVE_POLL) +#if defined(HAVE_POLL_CALL) #include struct fd_handler { From ff871f86e119c5b916907fce4ac042d6e0125d58 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 8 Mar 2017 16:37:42 +0100 Subject: [PATCH 003/193] pimd: fix clang warning pimd/pim_sock.c:178:13: error: implicit conversion from 'int' to 'char' changes value from 148 to -108 [-Werror,-Wconstant-conversion] ra[0] = 148; Signed-off-by: David Lamparter --- pimd/pim_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 54816d126b..e1949e3602 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -136,7 +136,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char lo /* Set router alert (RFC 2113) for all IGMP messages (RFC 3376 4. Message Formats)*/ if (protocol == IPPROTO_IGMP) { - char ra[4]; + uint8_t ra[4]; ra[0] = 148; ra[1] = 4; ra[2] = 0; From 399598bf6b749daa15d70ad64fc885d00cde1225 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 9 May 2017 14:52:54 -0400 Subject: [PATCH 004/193] bgpd: add back unicast option to 'address-family vpnv(4&6)' Issue #459 --- bgpd/bgp_vty.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 39933a1953..347d026aff 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -6141,6 +6141,13 @@ DEFUN (address_family_vpnv4, return CMD_SUCCESS; } +ALIAS (address_family_vpnv4, + address_family_vpnv4_unicast_cmd, + "address-family vpnv4 unicast", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family modifier\n") + DEFUN (address_family_vpnv6, address_family_vpnv6_cmd, "address-family vpnv6", @@ -6151,6 +6158,13 @@ DEFUN (address_family_vpnv6, return CMD_SUCCESS; } +ALIAS (address_family_vpnv6, + address_family_vpnv6_unicast_cmd, + "address-family vpnv6 unicast", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family modifier\n") + DEFUN (address_family_encap, address_family_encap_cmd, "address-family encap", @@ -15149,7 +15163,9 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_safi_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd); + install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); + install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd); install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encapv4_cmd); install_element (BGP_NODE, &address_family_encapv6_cmd); From 5490641755c40a9cdd56719766cf3aaa868342f9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 9 May 2017 16:18:04 -0400 Subject: [PATCH 005/193] *: Remove ability to install frr_sudoers If the user were to uncomment last line and allow VTYSH_SHOW to be used as a non-root account, this would allow arbitrary command completion inside of vtysh via multiple -c ... -c .... lines Signed-off-by: Donald Sharp --- cumulus/etc/sudoers.d/frr_sudoers | 15 --------------- debian/frr.postinst | 1 - 2 files changed, 16 deletions(-) delete mode 100644 cumulus/etc/sudoers.d/frr_sudoers diff --git a/cumulus/etc/sudoers.d/frr_sudoers b/cumulus/etc/sudoers.d/frr_sudoers deleted file mode 100644 index 4a42fb24f4..0000000000 --- a/cumulus/etc/sudoers.d/frr_sudoers +++ /dev/null @@ -1,15 +0,0 @@ -Defaults env_keep += VTYSH_PAGER - -# Allow user in group frr to run vtysh show commands -# without a password by uncommenting the "%frr" line below. - -# Subshell commands need to be disallowed, including -# preventing the user passing command line args like 'start-shell' -# Since vtysh allows minimum non-conflicting prefix'es, that means -# anything beginning with the string "st" in any arg. That's a bit -# restrictive. -# Instead, use NOEXEC, to prevent any exec'ed commands. - -Cmnd_Alias VTY_SHOW = /usr/bin/vtysh -c show * -# %frr ALL = (root) NOPASSWD:NOEXEC: VTY_SHOW - diff --git a/debian/frr.postinst b/debian/frr.postinst index 43d3ffa9e0..9020d7bf7a 100644 --- a/debian/frr.postinst +++ b/debian/frr.postinst @@ -15,7 +15,6 @@ frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'` chown -R ${frruid}:${frrgid} /etc/frr touch /etc/frr/vtysh.conf chgrp ${frrvtygid} /etc/frr/vtysh* -chmod 440 /etc/sudoers.d/frr_sudoers chmod 644 /etc/frr/* ENVIRONMENTFILE=/etc/environment From 9bcb88c7bfc063e3f78965921e1ac0669e503c3f Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 10 May 2017 00:55:10 +0000 Subject: [PATCH 006/193] Change Frr.conf to frr.conf Signed-off-by: Daniel Walton --- cumulus/etc/frr/{Frr.conf => frr.conf} | 0 doc/Building_FRR_on_Ubuntu1604.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename cumulus/etc/frr/{Frr.conf => frr.conf} (100%) diff --git a/cumulus/etc/frr/Frr.conf b/cumulus/etc/frr/frr.conf similarity index 100% rename from cumulus/etc/frr/Frr.conf rename to cumulus/etc/frr/frr.conf diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index 7848ff68ab..2d5b57ed56 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -120,7 +120,7 @@ Add the following lines to `/etc/modules-load.d/modules.conf`: sudo install -m 644 cumulus/etc/default/frr /etc/default/frr sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons sudo install -m 644 cumulus/etc/frr/debian.conf /etc/frr/debian.conf - sudo install -m 644 cumulus/etc/frr/Frr.conf /etc/frr/Frr.conf + sudo install -m 644 cumulus/etc/frr/frr.conf /etc/frr/frr.conf sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf ### Enable daemons From bb1e60c3a17d7a6168f450d909cf51918e85f7ee Mon Sep 17 00:00:00 2001 From: Hung-Weic Chiu Date: Wed, 10 May 2017 01:57:11 +0000 Subject: [PATCH 007/193] - Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT - Minor refactoring Signed-off-by: Hung-Weic Chiu --- lib/command.c | 5 ++++- tools/permutations.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/command.c b/lib/command.c index 43b2c478a0..ff921ff402 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1615,8 +1615,11 @@ permute (struct graph_node *start, struct vty *vty) bool skip = false; if (stok->type == FORK_TKN && tok->type != FORK_TKN) for (ALL_LIST_ELEMENTS_RO (position, ln, gnn)) - if (gnn == gn && (skip = true)) + if (gnn == gn) + { + skip = true; break; + } if (!skip) permute (gn, vty); } diff --git a/tools/permutations.c b/tools/permutations.c index 6e1a37981a..88d1464697 100644 --- a/tools/permutations.c +++ b/tools/permutations.c @@ -87,8 +87,11 @@ permute (struct graph_node *start) bool skip = false; if (stok->type == FORK_TKN && tok->type != FORK_TKN) for (ALL_LIST_ELEMENTS_RO (position, ln, gnn)) - if (gnn == gn && (skip = true)) + if (gnn == gn) + { + skip = true; break; + } if (!skip) permute (gn); } From 4afc1b4d4b88484379a78d794e9eee7374cb8b08 Mon Sep 17 00:00:00 2001 From: Hung-Weic Chiu Date: Wed, 10 May 2017 02:51:28 +0000 Subject: [PATCH 008/193] Address the error "Dead assignment" of static analysif - Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html - Remove unused variable Signed-off-by: Hung-Weic Chiu --- bgpd/bgp_btoa.c | 2 +- bgpd/bgpd.c | 2 +- bgpd/rfapi/rfapi_rib.c | 1 - isisd/isis_pdu.c | 1 - ospfd/ospf_flood.c | 1 - ospfd/ospf_te.c | 4 ++-- ripd/ripd.c | 1 - ripngd/ripngd.c | 12 ++++++------ zebra/label_manager.c | 1 - 9 files changed, 10 insertions(+), 15 deletions(-) diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index 37bef9b85d..d3162a4ea5 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -238,7 +238,7 @@ main (int argc, char **argv) printf ("len: %zd\n", len); - ret = fread (s->data + 12, len, 1, fp); + fread (s->data + 12, len, 1, fp); if (feof (fp)) { printf ("ENDOF FILE 2\n"); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 9af26f5510..24ef4465fe 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -6116,7 +6116,7 @@ peer_ttl_security_hops_set (struct peer *peer, int gtsm_hops) * min & max ttls on the socket. The return value is * irrelevant. */ - ret = peer_ebgp_multihop_set (peer, MAXTTL); + peer_ebgp_multihop_set (peer, MAXTTL); } } } diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index d633023dcf..8fb2fe44ed 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -1306,7 +1306,6 @@ callback: if (!printedprefix) { vnc_zlog_debug_verbose ("%s: For prefix %s (d)", __func__, buf_prefix); - printedprefix = 1; } vnc_zlog_debug_verbose ("%s: delete_list has %d elements", __func__, delete_list->count); diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 5fbf6c194e..a41581ff02 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1458,7 +1458,6 @@ process_lsp (int level, struct isis_circuit *circuit, const u_char *ssnpa) ((level == IS_LEVEL_2) && (circuit->u.p2p.neighbor->adj_usage == ISIS_ADJ_LEVEL1))) return ISIS_WARNING; /* Silently discard */ - adj = circuit->u.p2p.neighbor; } } diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 417a7aa8d2..4cc28f7486 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -260,7 +260,6 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr, (void *)current, dump_lsa_key (new)); - lsa_ack_flag = 0; oi = nbr->oi; /* If there is already a database copy, and if the diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 449f9e7b97..a89d67c6bb 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1480,12 +1480,12 @@ ospf_mpls_te_lsa_originate_as (void *arg) if (IS_FLOOD_AS (lp->type)) { top = (struct ospf *) arg; - rc = ospf_mpls_te_lsa_originate2 (top, lp); + ospf_mpls_te_lsa_originate2 (top, lp); } else { area = (struct ospf_area *) arg; - rc = ospf_mpls_te_lsa_originate1 (area, lp); + ospf_mpls_te_lsa_originate1 (area, lp); } } diff --git a/ripd/ripd.c b/ripd/ripd.c index b668b0a0b4..9e8c21da31 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2398,7 +2398,6 @@ rip_output_process (struct connected *ifc, struct sockaddr_in *to, if (ret >= 0 && IS_RIP_DEBUG_SEND) rip_packet_dump ((struct rip_packet *)STREAM_DATA (s), stream_get_endp (s), "SEND"); - num = 0; stream_reset (s); } diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index a883bec3c4..8ea66517c3 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -970,11 +970,11 @@ ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p, } } - rinfo = ripng_ecmp_replace (&newinfo); + ripng_ecmp_replace (&newinfo); route_unlock_node (rp); } else - rinfo = ripng_ecmp_add (&newinfo); + ripng_ecmp_add (&newinfo); if (IS_RIPNG_DEBUG_EVENT) { if (!nexthop) @@ -2021,11 +2021,11 @@ DEFUN (show_ipv6_ripng, p = (struct prefix_ipv6 *) &rp->p; #ifdef DEBUG - len = vty_out (vty, "R(a) %d/%d %s/%d ", + vty_out (vty, "R(a) %d/%d %s/%d ", aggregate->count, aggregate->suppress, inet6_ntoa (p->prefix), p->prefixlen); #else - len = vty_out (vty, "R(a) %s/%d ", + vty_out (vty, "R(a) %s/%d ", inet6_ntoa (p->prefix), p->prefixlen); #endif /* DEBUG */ vty_out (vty, "%s", VTY_NEWLINE); @@ -2043,13 +2043,13 @@ DEFUN (show_ipv6_ripng, p = (struct prefix_ipv6 *) &rp->p; #ifdef DEBUG - len = vty_out (vty, "%c(%s) 0/%d %s/%d ", + vty_out (vty, "%c(%s) 0/%d %s/%d ", zebra_route_char(rinfo->type), ripng_route_subtype_print(rinfo), rinfo->suppress, inet6_ntoa (p->prefix), p->prefixlen); #else - len = vty_out (vty, "%c(%s) %s/%d ", + vty_out (vty, "%c(%s) %s/%d ", zebra_route_char(rinfo->type), ripng_route_subtype_print(rinfo), inet6_ntoa (p->prefix), p->prefixlen); diff --git a/zebra/label_manager.c b/zebra/label_manager.c index bf67141cd4..7dbb36edb8 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -205,7 +205,6 @@ struct label_manager_chunk *assign_label_chunk(u_char proto, u_short instance, struct label_manager_chunk *lmc; struct listnode *node; - node = lbl_mgr.lc_list->head; /* first check if there's one available */ for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) { if (lmc->proto == NO_PROTO && lmc->end - lmc->start + 1 == size) { From 6500e013dbc2acd10d619f899c9a0f93b008d5fa Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 9 May 2017 21:04:00 +0000 Subject: [PATCH 009/193] vtysh: add \n to 'router rip[ng]' docstrings Signed-off-by: Quentin Young --- vtysh/vtysh.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 682cd99c23..5bb969bef7 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1315,22 +1315,22 @@ DEFUNSH (VTYSH_RIPD, } DEFUNSH (VTYSH_RIPD, - router_rip, - router_rip_cmd, - "router rip", - ROUTER_STR - "RIP") + router_rip, + router_rip_cmd, + "router rip", + ROUTER_STR + "RIP\n") { vty->node = RIP_NODE; return CMD_SUCCESS; } DEFUNSH (VTYSH_RIPNGD, - router_ripng, - router_ripng_cmd, - "router ripng", - ROUTER_STR - "RIPng") + router_ripng, + router_ripng_cmd, + "router ripng", + ROUTER_STR + "RIPng\n") { vty->node = RIPNG_NODE; return CMD_SUCCESS; From 818c4f214a9bbad29b39dccb964ad231bc898baf Mon Sep 17 00:00:00 2001 From: Adam Fitzgerald Date: Thu, 11 May 2017 21:03:23 +1000 Subject: [PATCH 010/193] added troubleshooting section to debian 8 build doc --- doc/Building_FRR_on_Debian8.md | 41 +++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md index 0084433721..a60783d310 100644 --- a/doc/Building_FRR_on_Debian8.md +++ b/doc/Building_FRR_on_Debian8.md @@ -4,13 +4,13 @@ Building FRR on Debian 8 from Git Source Debian 8 restrictions: ---------------------- -- MPLS is not supported on `Debian 8` with default kernel. MPLS requires - Linux Kernel 4.5 or higher (LDP can be built, but may have limited use +- MPLS is not supported on `Debian 8` with default kernel. MPLS requires + Linux Kernel 4.5 or higher (LDP can be built, but may have limited use without MPLS) Install required packages ------------------------- - + Add packages: sudo apt-get install git autoconf automake libtool make gawk \ @@ -24,7 +24,7 @@ Install newer pytest (>3.0) from pip Get FRR, compile it and install it (from Git) --------------------------------------------- -**This assumes you want to build and install FRR from source and not using +**This assumes you want to build and install FRR from source and not using any packages** ### Add frr groups and user @@ -87,7 +87,7 @@ an example.) ### Enable IP & IPv6 forwarding -Edit `/etc/sysctl.conf` and uncomment the following values (ignore the +Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings) # Uncomment the next line to enable packet forwarding for IPv4 @@ -99,3 +99,34 @@ other settings) net.ipv6.conf.all.forwarding=1 **Reboot** or use `sysctl -p` to apply the same config to the running system + +### Troubleshooting + +**Local state directory** + +The local state directory must exist and have the correct permissions applied +for the frrouting daemons to start. In the above ./configure example the +local state directory is set to /var/run/frr (--localstatedir=/var/run/frr) +Debian considers /var/run/frr to be temporary and this is removed after a +reboot. + +When using a different local state directory you need to create the new +directory and change the ownership to the frr user, for example: + + mkdir /var/opt/frr + chown frr /var/opt/frr + +**Shared library error** + +If you try and start any of the frrouting daemons you may see the below error +due to the frrouting shared library directory not being found: + + ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory + +The fix is to add the following line to /etc/ld.so.conf which will continue to +reference the library directory after the system reboots. To load the library +directory path immediately run the ldconfig command after adding the line to +the file eg: + + echo include /usr/local/lib >> /etc/ld.so.conf + ldconfig From 86fb2ae8414acafe417dc8a45e080b9cdb9e377e Mon Sep 17 00:00:00 2001 From: Adam Fitzgerald Date: Thu, 11 May 2017 21:03:23 +1000 Subject: [PATCH 011/193] added troubleshooting section to debian 8 build doc --- doc/Building_FRR_on_Debian8.md | 39 ++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md index a42ca6d781..1a961f752a 100644 --- a/doc/Building_FRR_on_Debian8.md +++ b/doc/Building_FRR_on_Debian8.md @@ -4,8 +4,8 @@ Building FRR on Debian 8 from Git Source Debian 8 restrictions: ---------------------- -- MPLS is not supported on `Debian 8` with default kernel. MPLS requires - Linux Kernel 4.5 or higher (LDP can be built, but may have limited use +- MPLS is not supported on `Debian 8` with default kernel. MPLS requires + Linux Kernel 4.5 or higher (LDP can be built, but may have limited use without MPLS) Install required packages @@ -24,7 +24,7 @@ Install newer pytest (>3.0) from pip Get FRR, compile it and install it (from Git) --------------------------------------------- -**This assumes you want to build and install FRR from source and not using +**This assumes you want to build and install FRR from source and not using any packages** ### Add frr groups and user @@ -87,7 +87,7 @@ an example.) ### Enable IP & IPv6 forwarding -Edit `/etc/sysctl.conf` and uncomment the following values (ignore the +Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings) # Uncomment the next line to enable packet forwarding for IPv4 @@ -99,3 +99,34 @@ other settings) net.ipv6.conf.all.forwarding=1 **Reboot** or use `sysctl -p` to apply the same config to the running system + +### Troubleshooting + +**Local state directory** + +The local state directory must exist and have the correct permissions applied +for the frrouting daemons to start. In the above ./configure example the +local state directory is set to /var/run/frr (--localstatedir=/var/run/frr) +Debian considers /var/run/frr to be temporary and this is removed after a +reboot. + +When using a different local state directory you need to create the new +directory and change the ownership to the frr user, for example: + + mkdir /var/opt/frr + chown frr /var/opt/frr + +**Shared library error** + +If you try and start any of the frrouting daemons you may see the below error +due to the frrouting shared library directory not being found: + + ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory + +The fix is to add the following line to /etc/ld.so.conf which will continue to +reference the library directory after the system reboots. To load the library +directory path immediately run the ldconfig command after adding the line to +the file eg: + + echo include /usr/local/lib >> /etc/ld.so.conf + ldconfig From 42025b43f265c042116d9432cf4d34aeb79152f6 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 10 May 2017 19:27:33 +0200 Subject: [PATCH 012/193] bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next hop for EVPN In the case of EVPN, add the nexthop attribute. Signed-off-by: Philippe Guibert --- bgpd/bgp_attr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 1fccd25c8a..61dcbd1b29 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2737,8 +2737,9 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, stream_putw (s, pkt_afi); /* AFI */ stream_putc (s, pkt_safi); /* SAFI */ - - if (nh_afi == AFI_MAX) + if (afi == AFI_L2VPN) + nh_afi = AFI_L2VPN; + else if (nh_afi == AFI_MAX) nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); /* Nexthop */ switch (nh_afi) From cefd435b19fda334c102ab020254658bee72ccec Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 11 May 2017 08:46:48 -0400 Subject: [PATCH 013/193] bgpd: Issue #198 - clean up duplicate command resulting from CLI refactoring Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 137 ----------------------------------------------- 1 file changed, 137 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 603979942d..23be34c63b 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -577,73 +577,6 @@ DEFUN (show_bgp_ipv6_encap_rd_tags, return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1); } -DEFUN (show_bgp_ipv4_encap_neighbor_routes, - show_bgp_ipv4_encap_neighbor_routes_cmd, - "show [ip] bgp ipv4 encap neighbors A.B.C.D routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_peer = 0; - union sockunion *su; - struct peer *peer; - - argv_find(argv, argc, "A.B.C.D", &idx_peer); - su = sockunion_str2su (argv[idx_peer]->arg); - - if (!su) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_neighbor, su, 0); -} - -DEFUN (show_bgp_ipv6_encap_neighbor_routes, - show_bgp_ipv6_encap_neighbor_routes_cmd, - "show [ip] bgp ipv6 encap neighbors A.B.C.D routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_peer = 5; - union sockunion su; - struct peer *peer; - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_neighbor, &su, 0); -} - DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, show_bgp_ipv4_encap_rd_neighbor_routes_cmd, "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors routes", @@ -734,72 +667,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0); } -DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes, - show_bgp_ipv4_encap_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv4 encap neighbors A.B.C.D advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_peer = 5; - int ret; - struct peer *peer; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, NULL); -} - -DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes, - show_bgp_ipv6_encap_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv6 encap neighbors A.B.C.D advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_peer = 5; - int ret; - struct peer *peer; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, NULL); -} - DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", @@ -899,16 +766,12 @@ bgp_encap_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); } From 5c7ef8dc4fee3521a225aec0a3d42912a5bfd247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Fingen?= Date: Wed, 26 Apr 2017 11:50:21 +0200 Subject: [PATCH 014/193] lm: Make relay label manager async MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid blocking zebra when it's acting as a proxy for an external label manager. Besides: Fix get chunk reconnection. Socket was still being destroyed on failure, so next attempt would never work. Filter out unwanted messages in lm sync sock. Until LDE client sends ZEBRA_LABEL_MANAGER_CONNECT message, zserv doesn't know which kind of client it is, so it might enqueue unwanted messages like interface add, interface up, etc. Changes in this commit discard those messages in the client side in case they arrive before the expected response. Change function name for zclient_connect in label manager to avoid confusion with zclient one. Signed-off-by: ßingen --- ldpd/lde.c | 4 +- lib/zclient.c | 100 ++++++++++++++++++------------- zebra/label_manager.c | 133 ++++++++++++++++++++++++++++++------------ zebra/label_manager.h | 2 +- zebra/zserv.c | 5 +- 5 files changed, 159 insertions(+), 85 deletions(-) diff --git a/ldpd/lde.c b/ldpd/lde.c index d8a2924b31..36998e7cf8 100644 --- a/ldpd/lde.c +++ b/ldpd/lde.c @@ -140,6 +140,8 @@ zclient_sync_init(u_short instance) fprintf(stderr, "Error connecting synchronous zclient!\n"); lde_sleep(); } + /* make socket non-blocking */ + sock_set_nonblock(zclient_sync->sock); /* Connect to label manager */ while (lm_label_manager_connect (zclient_sync) != 0) { @@ -1596,8 +1598,6 @@ lde_get_label_chunk(void) if (ret < 0) { log_warnx("Error getting label chunk!"); - close(zclient_sync->sock); - zclient_sync->sock = -1; return -1; } diff --git a/lib/zclient.c b/lib/zclient.c index d2a5186315..6aea4bd0a3 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1465,6 +1465,47 @@ zebra_interface_vrf_update_read (struct stream *s, vrf_id_t vrf_id, *new_vrf_id = new_id; return ifp; } + +/* filter unwanted messages until the expected one arrives */ +static int +zclient_read_sync_response (struct zclient *zclient, u_int16_t expected_cmd) +{ + struct stream *s; + u_int16_t size; + u_char marker; + u_char version; + vrf_id_t vrf_id; + u_int16_t cmd; + fd_set readfds; + int ret; + + ret = 0; + cmd = expected_cmd + 1; + while (ret == 0 && cmd != expected_cmd) + { + s = zclient->ibuf; + stream_reset (s); + + /* wait until response arrives */ + FD_ZERO (&readfds); + FD_SET (zclient->sock, &readfds); + select (zclient->sock+1, &readfds, NULL, NULL, NULL); + if (!FD_ISSET(zclient->sock, &readfds)) + continue; + /* read response */ + ret = zclient_read_header (s, zclient->sock, &size, &marker, &version, + &vrf_id, &cmd); + if (zclient_debug) + zlog_debug ("%s: Response (%d bytes) received", __func__, size); + } + if (ret != 0) + { + zlog_err ("%s: Invalid Sync Message Reply", __func__); + return -1; + } + + return 0; +} /** * Connect to label manager in a syncronous way * @@ -1480,11 +1521,6 @@ lm_label_manager_connect (struct zclient *zclient) int ret; struct stream *s; u_char result; - u_int16_t size; - u_char marker; - u_char version; - vrf_id_t vrf_id; - u_int16_t cmd; if (zclient_debug) zlog_debug ("Connecting to Label Manager"); @@ -1524,20 +1560,15 @@ lm_label_manager_connect (struct zclient *zclient) zlog_debug ("%s: Label manager connect request (%d bytes) sent", __func__, ret); /* read response */ - s = zclient->ibuf; - stream_reset (s); + if (zclient_read_sync_response (zclient, ZEBRA_LABEL_MANAGER_CONNECT) != 0) + return -1; - ret = zclient_read_header (s, zclient->sock, &size, &marker, &version, - &vrf_id, &cmd); - if (ret != 0 || cmd != ZEBRA_LABEL_MANAGER_CONNECT) { - zlog_err ("%s: Invalid Label Manager Connect Message Reply Header", __func__); - return -1; - } /* result */ + s = zclient->ibuf; result = stream_getc(s); if (zclient_debug) - zlog_debug ("%s: Label Manager connect response (%d bytes) received, result %u", - __func__, size, result); + zlog_debug ("%s: Label Manager connect response received, result %u", + __func__, result); return (int)result; } @@ -1561,11 +1592,6 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size, { int ret; struct stream *s; - u_int16_t size; - u_char marker; - u_char version; - vrf_id_t vrf_id; - u_int16_t cmd; u_char response_keep; if (zclient_debug) @@ -1604,18 +1630,10 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size, zlog_debug ("%s: Label chunk request (%d bytes) sent", __func__, ret); /* read response */ + if (zclient_read_sync_response (zclient, ZEBRA_GET_LABEL_CHUNK) != 0) + return -1; + s = zclient->ibuf; - stream_reset (s); - - ret = zclient_read_header (s, zclient->sock, &size, &marker, &version, - &vrf_id, &cmd); - if (ret != 0 || cmd != ZEBRA_GET_LABEL_CHUNK) { - zlog_err ("%s: Invalid Get Label Chunk Message Reply Header", __func__); - return -1; - } - if (zclient_debug) - zlog_debug ("%s: Label chunk response (%d bytes) received", __func__, size); - /* keep */ response_keep = stream_getc(s); /* start and end labels */ @@ -1623,18 +1641,20 @@ lm_get_label_chunk (struct zclient *zclient, u_char keep, uint32_t chunk_size, *end = stream_getl(s); /* not owning this response */ - if (keep != response_keep) { - zlog_err ("%s: Invalid Label chunk: %u - %u, keeps mismatch %u != %u", - __func__, *start, *end, keep, response_keep); - } + if (keep != response_keep) + { + zlog_err ("%s: Invalid Label chunk: %u - %u, keeps mismatch %u != %u", + __func__, *start, *end, keep, response_keep); + } /* sanity */ if (*start > *end || *start < MPLS_MIN_UNRESERVED_LABEL - || *end > MPLS_MAX_UNRESERVED_LABEL) { - zlog_err ("%s: Invalid Label chunk: %u - %u", __func__, - *start, *end); - return -1; - } + || *end > MPLS_MAX_UNRESERVED_LABEL) + { + zlog_err ("%s: Invalid Label chunk: %u - %u", __func__, + *start, *end); + return -1; + } if (zclient_debug) zlog_debug ("Label Chunk assign: %u - %u (%u) ", diff --git a/zebra/label_manager.c b/zebra/label_manager.c index 7dbb36edb8..08f3c3cfe9 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -56,6 +56,80 @@ static void delete_label_chunk(void *val) XFREE(MTYPE_LM_CHUNK, val); } +static int relay_response_back(struct zserv *zserv) +{ + int ret = 0; + struct stream *src, *dst; + u_int16_t size = 0; + u_char marker; + u_char version; + vrf_id_t vrf_id; + u_int16_t resp_cmd; + + src = zclient->ibuf; + dst = zserv->obuf; + + stream_reset(src); + + ret = zclient_read_header(src, zclient->sock, &size, &marker, &version, + &vrf_id, &resp_cmd); + if (ret < 0 && errno != EAGAIN) { + zlog_err("%s: Error reading Label Manager response: %s", __func__, + strerror(errno)); + return -1; + } + zlog_debug("%s: Label Manager response received, %d bytes", __func__, + size); + if (size == 0) + return -1; + + /* send response back */ + stream_copy(dst, src); + ret = writen(zserv->sock, dst->data, stream_get_endp(dst)); + if (ret <= 0) { + zlog_err("%s: Error sending Label Manager response back: %s", + __func__, strerror(errno)); + return -1; + } + zlog_debug("%s: Label Manager response (%d bytes) sent back", __func__, + ret); + + return 0; +} + +static int lm_zclient_read(struct thread *t) +{ + struct zserv *zserv; + int ret; + + /* Get socket to zebra. */ + zserv = THREAD_ARG(t); + zclient->t_read = NULL; + + /* read response and send it back */ + ret = relay_response_back(zserv); + + return ret; +} + +static int reply_error (int cmd, struct zserv *zserv, vrf_id_t vrf_id) +{ + struct stream *s; + + s = zserv->obuf; + stream_reset (s); + + zserv_create_header (s, cmd, vrf_id); + + /* result */ + stream_putc (s, 1); + + /* Write packet size. */ + stream_putw_at (s, 0, stream_get_endp (s)); + + return writen (zserv->sock, s->data, stream_get_endp (s)); + +} /** * Receive a request to get or release a label chunk and forward it to external * label manager. @@ -64,19 +138,25 @@ static void delete_label_chunk(void *val) * proxy. * * @param cmd Type of request (connect, get or release) - * @param src Input buffer from zserv + * @param zserv * @return 0 on success, -1 otherwise */ -int zread_relay_label_manager_request(int cmd, struct zserv *zserv) +int zread_relay_label_manager_request(int cmd, struct zserv *zserv, vrf_id_t vrf_id) { struct stream *src, *dst; - int ret; + int ret = 0; if (zclient->sock < 0) { zlog_err("%s: Error relaying label chunk request: no zclient socket", __func__); + reply_error (cmd, zserv, vrf_id); return -1; } + + /* in case there's any incoming message enqueued, read and forward it */ + while (ret == 0) + ret = relay_response_back(zserv); + /* Send request to external label manager */ src = zserv->ibuf; dst = zclient->obuf; @@ -87,6 +167,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv) if (ret <= 0) { zlog_err("%s: Error relaying label chunk request: %s", __func__, strerror(errno)); + reply_error (cmd, zserv, vrf_id); return -1; } zlog_debug("%s: Label chunk request relayed. %d bytes sent", __func__, @@ -96,43 +177,15 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv) if (cmd == ZEBRA_RELEASE_LABEL_CHUNK) return 0; - /* read response */ - src = zclient->ibuf; - dst = zserv->obuf; - - stream_reset(src); - - u_int16_t size; - u_char marker; - u_char version; - vrf_id_t vrf_id; - u_int16_t resp_cmd; - ret = zclient_read_header(src, zclient->sock, &size, &marker, &version, - &vrf_id, &resp_cmd); - if (ret < 0) { - zlog_err("%s: Error reading label chunk response: %s", __func__, - strerror(errno)); - return -1; - } - zlog_debug("%s: Label chunk response received, %d bytes", __func__, - size); - - /* send response back */ - stream_copy(dst, src); - stream_copy(zserv->obuf, zclient->ibuf); - ret = writen(zserv->sock, dst->data, stream_get_endp(dst)); - if (ret <= 0) { - zlog_err("%s: Error sending label chunk response back: %s", - __func__, strerror(errno)); - return -1; - } - zlog_debug("%s: Label chunk response (%d bytes) sent back", __func__, - ret); + /* make sure we listen to the response */ + if (!zclient->t_read) + zclient->t_read = + thread_add_read(zclient->master, lm_zclient_read, zserv, zclient->sock); return 0; } -static int zclient_connect(struct thread *t) +static int lm_zclient_connect(struct thread *t) { zclient->t_connect = NULL; @@ -142,11 +195,15 @@ static int zclient_connect(struct thread *t) if (zclient_socket_connect(zclient) < 0) { zlog_err("Error connecting synchronous zclient!"); THREAD_TIMER_ON(zebrad.master, zclient->t_connect, - zclient_connect, + lm_zclient_connect, zclient, CONNECTION_DELAY); return -1; } + /* make socket non-blocking */ + if (set_nonblocking(zclient->sock) < 0) + zlog_warn("%s: set_nonblocking(%d) failed", __func__, zclient->sock); + return 0; } @@ -165,7 +222,7 @@ static void lm_zclient_init(char *lm_zserv_path) zclient = zclient_new(zebrad.master); zclient->sock = -1; zclient->t_connect = NULL; - zclient_connect (NULL); + lm_zclient_connect(NULL); } /** diff --git a/zebra/label_manager.h b/zebra/label_manager.h index 0c6a5ebc7d..fd0b3b549b 100644 --- a/zebra/label_manager.h +++ b/zebra/label_manager.h @@ -62,7 +62,7 @@ struct label_manager { bool lm_is_external; -int zread_relay_label_manager_request(int cmd, struct zserv *zserv); +int zread_relay_label_manager_request(int cmd, struct zserv *zserv, vrf_id_t vrf_id); void label_manager_init(char *lm_zserv_path); struct label_manager_chunk *assign_label_chunk(u_char proto, u_short instance, u_char keep, uint32_t size); diff --git a/zebra/zserv.c b/zebra/zserv.c index 3477dc36d2..533678f16d 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1911,10 +1911,7 @@ zread_label_manager_request (int cmd, struct zserv *client, vrf_id_t vrf_id) /* external label manager */ if (lm_is_external) - { - if (zread_relay_label_manager_request (cmd, client) != 0) - zsend_label_manager_connect_response (client, vrf_id, 1); - } + zread_relay_label_manager_request (cmd, client, vrf_id); /* this is a label manager */ else { From 83540e9861b033d971af7e8da359289dbe25384d Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:19:42 -0300 Subject: [PATCH 015/193] bgpd: fix 'show bgp [...] longer-prefixes' Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 02b029d9ee..dbf969168e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8654,7 +8654,7 @@ DEFUN (show_ip_bgp, } /* prefix-longer */ if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx)) - return bgp_show_prefix_longer (vty, bgp, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer); + return bgp_show_prefix_longer (vty, bgp, argv[idx]->arg, afi, safi, bgp_show_type_prefix_longer); if (safi == SAFI_MPLS_VPN) return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj); From 5143a87b92fc635b05586d4a95a6e22e2cbfc397 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:21:34 -0300 Subject: [PATCH 016/193] lib: add labeled-unicast in safi2str() While here, move SAFI_ENCAP above SAFI_MPLS_VPN to keep the ordering consistent. Signed-off-by: Renato Westphal --- lib/prefix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/prefix.c b/lib/prefix.c index 0cc759bb7c..28af2833e0 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -252,12 +252,14 @@ safi2str(safi_t safi) return "unicast"; case SAFI_MULTICAST: return "multicast"; - case SAFI_ENCAP: - return "encap"; case SAFI_MPLS_VPN: return "vpn"; + case SAFI_ENCAP: + return "encap"; case SAFI_EVPN: return "evpn"; + case SAFI_LABELED_UNICAST: + return "labeled-unicast"; } return NULL; } From 9ff63e6f55a8a66509dc917482f702faa1574fbd Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:28:43 -0300 Subject: [PATCH 017/193] bgpd: removed unused parameter from bgp_dump_attr() Originally we used the 'peer' parameter for this: if (peer_sort (peer) == BGP_PEER_IBGP) snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d", attr->local_pref); Now we have this: if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u", attr->local_pref); Remove the now useless 'peer' parameter. Signed-off-by: Renato Westphal --- bgpd/bgp_debug.c | 2 +- bgpd/bgp_debug.h | 2 +- bgpd/bgp_packet.c | 2 +- bgpd/bgp_updgrp_packet.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 0bd74dbdc4..55cd7edd83 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -383,7 +383,7 @@ bgp_debug_peer_updout_enabled(char *host) /* Dump attribute. */ int -bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) +bgp_dump_attr (struct attr *attr, char *buf, size_t size) { if (! attr) return 0; diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h index 0968568225..64f087a68e 100644 --- a/bgpd/bgp_debug.h +++ b/bgpd/bgp_debug.h @@ -138,7 +138,7 @@ struct bgp_debug_filter extern const char *bgp_type_str[]; -extern int bgp_dump_attr (struct peer *, struct attr *, char *, size_t); +extern int bgp_dump_attr (struct attr *, char *, size_t); extern int bgp_debug_peer_updout_enabled(char *host); extern const char *bgp_notify_code_str(char); extern const char *bgp_notify_subcode_str(char, char); diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 0800dd74ba..b5a03f2692 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1493,7 +1493,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size) BGP_DEBUG (update, UPDATE_IN) || BGP_DEBUG (update, UPDATE_PREFIX)) { - ret = bgp_dump_attr (peer, &attr, peer->rcvd_attr_str, BUFSIZ); + ret = bgp_dump_attr (&attr, peer->rcvd_attr_str, BUFSIZ); if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW) zlog_err ("%s rcvd UPDATE with errors in attr(s)!! Withdrawing route.", diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 9be1a50db7..4ef436acb1 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -749,7 +749,7 @@ subgroup_update_packet (struct update_subgroup *subgrp) { memset (send_attr_str, 0, BUFSIZ); send_attr_printed = 0; - bgp_dump_attr (peer, adv->baa->attr, send_attr_str, BUFSIZ); + bgp_dump_attr (adv->baa->attr, send_attr_str, BUFSIZ); } } @@ -1043,7 +1043,7 @@ subgroup_default_update_packet (struct update_subgroup *subgrp, char tx_id_buf[30]; attrstr[0] = '\0'; - bgp_dump_attr (peer, attr, attrstr, BUFSIZ); + bgp_dump_attr (attr, attrstr, BUFSIZ); bgp_info_addpath_tx_str (addpath_encode, BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE, tx_id_buf); zlog_debug ("u%" PRIu64 ":s%" PRIu64 " send UPDATE %s%s %s", (SUBGRP_UPDGRP (subgrp))->id, subgrp->id, From af5d681978a822a109b40ff9705a9da503a6ff40 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:40:21 -0300 Subject: [PATCH 018/193] bgpd: fix duplicate install of command Only happens when FRR is configured with --enable-oldvpn-commands. Signed-off-by: Renato Westphal --- bgpd/bgp_mplsvpn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 421b62fba0..97b40df28a 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1196,7 +1196,6 @@ bgp_mplsvpn_init (void) install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd); #ifdef KEEP_OLD_VPN_COMMANDS install_element (VIEW_NODE, &show_ip_bgp_vpn_all_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_all_tags_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_tags_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_all_neighbor_routes_cmd); From 8b89a3023f651786a4709ee6212a0d6c61183d35 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 11:01:02 -0300 Subject: [PATCH 019/193] bgpd: fix segfault with '[no] bgp network import-check' These commands were causing bgpd to crash if a static VPN route was configured. While here, fix a bug in bgp_static_add() and bgp_static_delete(). Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index dbf969168e..ac4cb04c88 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4401,7 +4401,7 @@ bgp_static_add (struct bgp *bgp) for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) { - bgp_static = rn->info; + bgp_static = rm->info; bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi); } } @@ -4435,7 +4435,7 @@ bgp_static_delete (struct bgp *bgp) for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) { - bgp_static = rn->info; + bgp_static = rm->info; bgp_static_withdraw_safi (bgp, &rm->p, AFI_IP, safi, (struct prefix_rd *)&rn->p, @@ -4462,6 +4462,8 @@ bgp_static_redo_import_check (struct bgp *bgp) afi_t afi; safi_t safi; struct bgp_node *rn; + struct bgp_node *rm; + struct bgp_table *table; struct bgp_static *bgp_static; /* Use this flag to force reprocessing of the route */ @@ -4471,8 +4473,21 @@ bgp_static_redo_import_check (struct bgp *bgp) for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn)) if (rn->info != NULL) { - bgp_static = rn->info; - bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN)) + { + table = rn->info; + + for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) + { + bgp_static = rm->info; + bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi); + } + } + else + { + bgp_static = rn->info; + bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + } } bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS); } From 17c7bb7b1c4dabd41515b1423f6848614affc255 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 11:04:31 -0300 Subject: [PATCH 020/193] lib: remove gap between AFI_IP6 and AFI_L2VPN We have several pieces of code like this in FRR: for (afi = AFI_IP; afi < AFI_MAX; afi++) for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) bgp_distance_table[afi][safi] = bgp_table_init (afi, safi); We were creating a lot of useless garbage in the code because of this gap. Fix this. Signed-off-by: Renato Westphal --- lib/zebra.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zebra.h b/lib/zebra.h index cd72dc67f8..0cc81bdb70 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -404,8 +404,8 @@ extern const char *zserv_command_string (unsigned int command); typedef enum { AFI_IP = 1, AFI_IP6 = 2, - AFI_L2VPN = 4, - AFI_MAX = 5 + AFI_L2VPN = 3, + AFI_MAX = 4 } afi_t; /* Subsequent Address Family Identifier. */ From 3eefc7345412a9cfb13b6442549573c961561aa0 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 11:36:14 -0300 Subject: [PATCH 021/193] bgpd: remove unused bgp_attr_default_intern() function This function is not used anymore since commit 137446f9. Signed-off-by: Renato Westphal --- bgpd/bgp_attr.c | 20 -------------------- bgpd/bgp_attr.h | 1 - 2 files changed, 21 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 8b4ea9c752..22157c5ec5 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -968,26 +968,6 @@ bgp_attr_default_set (struct attr *attr, u_char origin) return attr; } - -/* Make network statement's attribute. */ -struct attr * -bgp_attr_default_intern (u_char origin) -{ - struct attr attr; - struct attr *new; - - memset (&attr, 0, sizeof (struct attr)); - bgp_attr_extra_get (&attr); - - bgp_attr_default_set(&attr, origin); - - new = bgp_attr_intern (&attr); - bgp_attr_extra_free (&attr); - - aspath_unintern (&new->aspath); - return new; -} - /* Create the attributes for an aggregate */ struct attr * bgp_attr_aggregate_intern (struct bgp *bgp, u_char origin, diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 3351ad2239..1df1faf939 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -246,7 +246,6 @@ extern void bgp_attr_unintern_sub (struct attr *); extern void bgp_attr_unintern (struct attr **); extern void bgp_attr_flush (struct attr *); extern struct attr *bgp_attr_default_set (struct attr *attr, u_char); -extern struct attr *bgp_attr_default_intern (u_char); extern struct attr *bgp_attr_aggregate_intern (struct bgp *, u_char, struct aspath *, struct community *, int as_set, u_char); From ff595214665edcf0564c7f08693e1eacb03f39c4 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:19:42 -0300 Subject: [PATCH 022/193] bgpd: fix 'show bgp [...] longer-prefixes' Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index d3a6e7e906..195e3811d4 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8421,7 +8421,7 @@ DEFUN (show_ip_bgp, } /* prefix-longer */ if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx)) - return bgp_show_prefix_longer (vty, bgp, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer); + return bgp_show_prefix_longer (vty, bgp, argv[idx]->arg, afi, safi, bgp_show_type_prefix_longer); if (safi == SAFI_MPLS_VPN) return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj); From 92a8bd6e7a9b24a350e45c1a3db939b0f591fa0a Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 09:40:21 -0300 Subject: [PATCH 023/193] bgpd: fix duplicate install of command Only happens when FRR is configured with --enable-oldvpn-commands. Signed-off-by: Renato Westphal --- bgpd/bgp_mplsvpn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 421b62fba0..97b40df28a 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1196,7 +1196,6 @@ bgp_mplsvpn_init (void) install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd); #ifdef KEEP_OLD_VPN_COMMANDS install_element (VIEW_NODE, &show_ip_bgp_vpn_all_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_all_tags_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_tags_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpn_all_neighbor_routes_cmd); From 7c7f4284cf79cf973f9d50b2a40889e09e328d72 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 11:01:02 -0300 Subject: [PATCH 024/193] bgpd: fix segfault with '[no] bgp network import-check' These commands were causing bgpd to crash if a static VPN route was configured. While here, fix a bug in bgp_static_add() and bgp_static_delete(). Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 195e3811d4..de51de7a66 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4314,7 +4314,7 @@ bgp_static_add (struct bgp *bgp) for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) { - bgp_static = rn->info; + bgp_static = rm->info; bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi); } } @@ -4348,7 +4348,7 @@ bgp_static_delete (struct bgp *bgp) for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) { - bgp_static = rn->info; + bgp_static = rm->info; bgp_static_withdraw_safi (bgp, &rm->p, AFI_IP, safi, (struct prefix_rd *)&rn->p, @@ -4375,6 +4375,8 @@ bgp_static_redo_import_check (struct bgp *bgp) afi_t afi; safi_t safi; struct bgp_node *rn; + struct bgp_node *rm; + struct bgp_table *table; struct bgp_static *bgp_static; /* Use this flag to force reprocessing of the route */ @@ -4384,8 +4386,21 @@ bgp_static_redo_import_check (struct bgp *bgp) for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn)) if (rn->info != NULL) { - bgp_static = rn->info; - bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN)) + { + table = rn->info; + + for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) + { + bgp_static = rm->info; + bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi); + } + } + else + { + bgp_static = rn->info; + bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + } } bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS); } From ab87c0f350f8c844f31f9420d2be579482eb8250 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 12 May 2017 21:37:36 +0000 Subject: [PATCH 025/193] lib: use %p specifier for pointers Fixes builds on ARM Signed-off-by: Quentin Young --- lib/grammar_sandbox.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 97de943216..0da7981fc1 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -588,7 +588,7 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start, return; snprintf(tokennum, sizeof(tokennum), "%d?", tok->type); - fprintf(ofd, " n%016llx [ shape=box, label=<", (unsigned long long)start); + fprintf(ofd, " n%p [ shape=box, label=<", start); fprintf(ofd, "%s", LOOKUP_DEF(tokennames, tok->type, tokennum)); if (tok->attr == CMD_ATTR_DEPRECATED) @@ -621,20 +621,13 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start, struct graph_node *adj = vector_slot (start->to, i); // if this node is a vararg, just print * if (adj == start) { - fprintf(ofd, " n%016llx -> n%016llx;\n", - (unsigned long long)start, - (unsigned long long)start); + fprintf(ofd, " n%p -> n%p;\n", start, start); } else if (((struct cmd_token *)adj->data)->type == END_TKN) { //struct cmd_token *et = adj->data; - fprintf(ofd, " n%016llx -> end%016llx;\n", - (unsigned long long)start, - (unsigned long long)adj); - fprintf(ofd, " end%016llx [ shape=box, label=, style = filled, fillcolor = \"#ffddaa\" ];\n", - (unsigned long long)adj); + fprintf(ofd, " n%p -> end%p;\n", start, adj); + fprintf(ofd, " end%p [ shape=box, label=, style = filled, fillcolor = \"#ffddaa\" ];\n", adj); } else { - fprintf(ofd, " n%016llx -> n%016llx;\n", - (unsigned long long)start, - (unsigned long long)adj); + fprintf(ofd, " n%p -> n%p;\n", start, adj); size_t k; for (k = 0; k < stackpos; k++) if (stack[k] == adj) From dfdbe7e4b0340c46cd8338e7e44e6bfa5f52e933 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 12 May 2017 09:16:23 -0400 Subject: [PATCH 026/193] lib: Cleanup command parsing a tiny bit The CLI changes now make it impossible for numbers outside the range specified in the cli to make it to this code. No need to check for it again. Signed-off-by: Donald Sharp --- lib/command.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/command.c b/lib/command.c index 03092ed184..2b8eee8de3 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2117,16 +2117,8 @@ DEFUN (config_terminal_length, "Number of lines on screen (0 for no pausing)\n") { int idx_number = 2; - int lines; - char *endptr = NULL; - lines = strtol (argv[idx_number]->arg, &endptr, 10); - if (lines < 0 || lines > 512 || *endptr != '\0') - { - vty_out (vty, "length is malformed%s", VTY_NEWLINE); - return CMD_WARNING; - } - vty->lines = lines; + vty->lines = atoi (argv[idx_number]->arg); return CMD_SUCCESS; } @@ -2150,16 +2142,8 @@ DEFUN (service_terminal_length, "Number of lines of VTY (0 means no line control)\n") { int idx_number = 2; - int lines; - char *endptr = NULL; - lines = strtol (argv[idx_number]->arg, &endptr, 10); - if (lines < 0 || lines > 512 || *endptr != '\0') - { - vty_out (vty, "length is malformed%s", VTY_NEWLINE); - return CMD_WARNING; - } - host.lines = lines; + host.lines = atoi (argv[idx_number]->arg); return CMD_SUCCESS; } From 76220653492a3eb9eadc3d1d78a1a4bfbc1b5ece Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 12 May 2017 15:38:18 -0400 Subject: [PATCH 027/193] eigrpd: Some Basic Corrections * Advertise routes to zebra * Connected routes should not have a nexthop address * Fix segfaut on exit Signed-off-by: Renato Westphal --- eigrpd/eigrp_neighbor.c | 3 ++- eigrpd/eigrp_topology.c | 26 +++++++++++++++++--------- eigrpd/eigrp_update.c | 20 -------------------- eigrpd/eigrp_zebra.c | 9 +++++++-- eigrpd/eigrpd.c | 2 +- 5 files changed, 27 insertions(+), 33 deletions(-) diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index f200351c10..003d3a7a7c 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -195,7 +195,8 @@ eigrp_nbr_delete (struct eigrp_neighbor *nbr) eigrp_fifo_free (nbr->retrans_queue); THREAD_OFF (nbr->t_holddown); - listnode_delete (nbr->ei->nbrs,nbr); + if (nbr->ei) + listnode_delete (nbr->ei->nbrs,nbr); XFREE (MTYPE_EIGRP_NEIGHBOR, nbr); } diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index 25beb63e80..4fcbef7f14 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -216,11 +216,17 @@ void eigrp_neighbor_entry_add(struct eigrp_prefix_entry *node, struct eigrp_neighbor_entry *entry) { - if (listnode_lookup(node->entries, entry) == NULL) + struct list *l = list_new (); + + if (listnode_lookup (node->entries, entry) == NULL) { - listnode_add_sort(node->entries, entry); + listnode_add_sort (node->entries, entry); entry->prefix = node; } + + listnode_add (l, entry); + eigrp_zebra_route_add (node->destination_ipv4, l); + list_delete (l); } /* @@ -236,16 +242,18 @@ eigrp_prefix_entry_delete(struct list *topology, * Emergency removal of the node from this list. * Whatever it is. */ - listnode_delete(eigrp->topology_changes_internalIPV4, node); + listnode_delete (eigrp->topology_changes_internalIPV4, node); - if (listnode_lookup(topology, node) != NULL) + if (listnode_lookup (topology, node) != NULL) { - list_delete_all_node(node->entries); - list_free(node->entries); - list_free(node->rij); - listnode_delete(topology, node); - XFREE(MTYPE_EIGRP_PREFIX_ENTRY,node); + list_delete_all_node (node->entries); + list_free (node->entries); + list_free (node->rij); + listnode_delete (topology, node); + XFREE (MTYPE_EIGRP_PREFIX_ENTRY,node); } + + eigrp_zebra_route_delete (node->destination_ipv4); } /* diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 5c942bd4d5..463f3800fa 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -454,26 +454,6 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * pe->req_action |= EIGRP_FSM_NEED_UPDATE; listnode_add(eigrp->topology_changes_internalIPV4, pe); - - /* - * This code is a guess. I am not actually - * sure that we should be doing this here. - * But for the moment it installs routes - * into the rib. Which is good? - */ - struct eigrp_fsm_action_message *msg; - msg = XCALLOC(MTYPE_EIGRP_FSM_MSG, - sizeof(struct eigrp_fsm_action_message)); - - msg->packet_type = EIGRP_OPC_UPDATE; - msg->eigrp = eigrp; - msg->data_type =EIGRP_TLV_IPv4_INT; - msg->adv_router = nbr; - msg->data.ipv4_int_type = tlv; - msg->entry = ne; - msg->prefix = pe; - int event = eigrp_get_fsm_event(msg); - eigrp_fsm_event(msg, event); } eigrp_IPv4_InternalTLV_free (tlv); } diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index 627d564a78..befb39dba1 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -444,8 +444,13 @@ eigrp_zebra_route_add (struct prefix_ipv4 *p, struct list *successors) /* Nexthop, ifindex, distance and metric information. */ for (ALL_LIST_ELEMENTS_RO (successors, node, te)) { - stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX); - stream_put_in_addr (s, &te->adv_router->src); + if (te->adv_router->src.s_addr) + { + stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX); + stream_put_in_addr (s, &te->adv_router->src); + } + else + stream_putc (s, NEXTHOP_TYPE_IFINDEX); stream_putl (s, te->ei->ifp->ifindex); } diff --git a/eigrpd/eigrpd.c b/eigrpd/eigrpd.c index 40885c8a46..c6af8986b7 100644 --- a/eigrpd/eigrpd.c +++ b/eigrpd/eigrpd.c @@ -188,7 +188,7 @@ eigrp_new (const char *AS) eigrp->topology_table = eigrp_topology_new(); eigrp->neighbor_self = eigrp_nbr_new(NULL); - inet_aton("127.0.0.1", &eigrp->neighbor_self->src); + inet_aton("0.0.0.0", &eigrp->neighbor_self->src); eigrp->variance = EIGRP_VARIANCE_DEFAULT; eigrp->max_paths = EIGRP_MAX_PATHS_DEFAULT; From 63863c4797d0f41f5369b37285de78259b38742f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 27 Apr 2017 14:55:23 -0300 Subject: [PATCH 028/193] eigrpd: Diverse Fixes * Correct the metric calculation as well as the default metrics; * Do not show invalid routes in the "show ip eigrp topology". * Add support to VRFs; * When downloading a neighbor remove the related routes; * Fix bugs in the parser of packages they were creating Invalid default routes; * Add and remove routes in the zebra; * Add command "on router eigrp AS"; * Make "delay" and "bandwitch" commands work as well as Display them in running config; * Add "no" version of several commands; * Fix a serious momory leaks; * Fix segfault when there is no 'successor' route to a Given prefix; * Other minor corrections; Signed-off-by: Renato Westphal Signed-off-by: Donald Sharp --- eigrpd/eigrp_const.h | 5 +- eigrpd/eigrp_dump.c | 12 +++- eigrpd/eigrp_dump.h | 2 +- eigrpd/eigrp_neighbor.c | 3 +- eigrpd/eigrp_network.c | 4 +- eigrpd/eigrp_topology.c | 10 +-- eigrpd/eigrp_vty.c | 149 +++++++++++++++++++--------------------- eigrpd/eigrpd.c | 26 +++++-- eigrpd/eigrpd.h | 1 + 9 files changed, 117 insertions(+), 95 deletions(-) diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h index 9397717bef..13eba207e2 100644 --- a/eigrpd/eigrp_const.h +++ b/eigrpd/eigrp_const.h @@ -89,8 +89,8 @@ #define EIGRP_HELLO_INTERVAL_DEFAULT 5 #define EIGRP_HOLD_INTERVAL_DEFAULT 15 -#define EIGRP_BANDWIDTH_DEFAULT 10000000 -#define EIGRP_DELAY_DEFAULT 1000 +#define EIGRP_BANDWIDTH_DEFAULT 100000 +#define EIGRP_DELAY_DEFAULT 10 #define EIGRP_RELIABILITY_DEFAULT 255 #define EIGRP_LOAD_DEFAULT 1 @@ -103,6 +103,7 @@ #define INTERFACE_DOWN_BY_ZEBRA 1 #define INTERFACE_DOWN_BY_VTY 2 +#define INTERFACE_DOWN_BY_FINAL 3 #define EIGRP_HELLO_NORMAL 0x00 #define EIGRP_HELLO_GRACEFUL_SHUTDOWN 0x01 diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index 21bef48ecb..97ef37d8a9 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -317,8 +317,18 @@ show_ip_eigrp_prefix_entry (struct vty *vty, struct eigrp_prefix_entry *tn) } void -show_ip_eigrp_neighbor_entry (struct vty *vty, struct eigrp *eigrp, struct eigrp_neighbor_entry *te) +show_ip_eigrp_neighbor_entry (struct vty *vty, struct eigrp *eigrp, + struct eigrp_neighbor_entry *te, int *first) { + if (te->reported_distance == EIGRP_MAX_METRIC) + return; + + if (*first) + { + show_ip_eigrp_prefix_entry (vty, te->prefix); + *first = 0; + } + if (te->adv_router == eigrp->neighbor_self) vty_out (vty, "%-7s%s, %s%s", " ", "via Connected", eigrp_if_name_string (te->ei), VTY_NEWLINE); diff --git a/eigrpd/eigrp_dump.h b/eigrpd/eigrp_dump.h index 54e6338a33..bbc0d306d9 100644 --- a/eigrpd/eigrp_dump.h +++ b/eigrpd/eigrp_dump.h @@ -158,7 +158,7 @@ extern void show_ip_eigrp_interface_sub (struct vty *, struct eigrp *, struct eigrp_interface *); extern void show_ip_eigrp_neighbor_sub (struct vty *, struct eigrp_neighbor *, int); extern void show_ip_eigrp_prefix_entry (struct vty *, struct eigrp_prefix_entry *); -extern void show_ip_eigrp_neighbor_entry (struct vty *, struct eigrp *, struct eigrp_neighbor_entry *); +extern void show_ip_eigrp_neighbor_entry (struct vty *, struct eigrp *, struct eigrp_neighbor_entry *, int *); extern void eigrp_debug_init (void); diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index 003d3a7a7c..dfea5258f5 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -187,7 +187,8 @@ void eigrp_nbr_delete (struct eigrp_neighbor *nbr) { eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_DOWN); - eigrp_topology_neighbor_down(nbr->ei->eigrp, nbr); + if (nbr->ei) + eigrp_topology_neighbor_down(nbr->ei->eigrp, nbr); /* Cancel all events. *//* Thread lookup cost would be negligible. */ thread_cancel_event (master, nbr); diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index dff7f27277..b8f21f1e86 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -425,11 +425,11 @@ eigrp_calculate_total_metrics(struct eigrp *eigrp, { entry->total_metric = entry->reported_metric; uint64_t temp_delay = (uint64_t) entry->total_metric.delay - + (uint64_t) EIGRP_IF_PARAM (entry->ei, delay); + + (uint64_t) eigrp_delay_to_scaled (EIGRP_IF_PARAM (entry->ei, delay)); entry->total_metric.delay = temp_delay > EIGRP_MAX_METRIC ? EIGRP_MAX_METRIC : (u_int32_t) temp_delay; - u_int32_t bw = EIGRP_IF_PARAM (entry->ei,bandwidth); + u_int32_t bw = eigrp_bandwidth_to_scaled (EIGRP_IF_PARAM (entry->ei,bandwidth)); entry->total_metric.bandwith = entry->total_metric.bandwith > bw ? bw : entry->total_metric.bandwith; diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index 4fcbef7f14..cab56c19db 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -218,14 +218,16 @@ eigrp_neighbor_entry_add(struct eigrp_prefix_entry *node, { struct list *l = list_new (); + listnode_add (l, entry); + if (listnode_lookup (node->entries, entry) == NULL) { listnode_add_sort (node->entries, entry); entry->prefix = node; + + eigrp_zebra_route_add (node->destination_ipv4, l); } - listnode_add (l, entry); - eigrp_zebra_route_add (node->destination_ipv4, l); list_delete (l); } @@ -250,10 +252,9 @@ eigrp_prefix_entry_delete(struct list *topology, list_free (node->entries); list_free (node->rij); listnode_delete (topology, node); + eigrp_zebra_route_delete (node->destination_ipv4); XFREE (MTYPE_EIGRP_PREFIX_ENTRY,node); } - - eigrp_zebra_route_delete (node->destination_ipv4); } /* @@ -266,6 +267,7 @@ eigrp_neighbor_entry_delete(struct eigrp_prefix_entry *node, if (listnode_lookup(node->entries, entry) != NULL) { listnode_delete(node->entries, entry); + eigrp_zebra_route_delete (node->destination_ipv4); XFREE(MTYPE_EIGRP_NEIGHBOR_ENTRY,entry); } } diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index cc346405a5..c3413992cd 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -127,9 +127,33 @@ config_write_interfaces (struct vty *vty, struct eigrp *eigrp) static int eigrp_write_interface (struct vty *vty) { - int write=0; + struct listnode *node; + struct interface *ifp; - return write; + for (ALL_LIST_ELEMENTS_RO (vrf_iflist(VRF_DEFAULT), node, ifp)) { + vty_out (vty, "interface %s%s", ifp->name, + VTY_NEWLINE); + + if (ifp->desc) + vty_out (vty, " description %s%s", ifp->desc, + VTY_NEWLINE); + + if (IF_DEF_PARAMS (ifp)->bandwidth != EIGRP_BANDWIDTH_DEFAULT) + vty_out (vty, " bandwidth %u%s", IF_DEF_PARAMS (ifp)->bandwidth, + VTY_NEWLINE); + if (IF_DEF_PARAMS (ifp)->delay != EIGRP_DELAY_DEFAULT) + vty_out (vty, " delay %u%s", IF_DEF_PARAMS (ifp)->delay, VTY_NEWLINE); + if (IF_DEF_PARAMS (ifp)->v_hello != EIGRP_HELLO_INTERVAL_DEFAULT) + vty_out (vty, " ip hello-interval eigrp %u%s", + IF_DEF_PARAMS (ifp)->v_hello, VTY_NEWLINE); + if (IF_DEF_PARAMS (ifp)->v_wait != EIGRP_HOLD_INTERVAL_DEFAULT) + vty_out (vty, " ip hold-time eigrp %u%s", + IF_DEF_PARAMS (ifp)->v_wait, VTY_NEWLINE); + + vty_out (vty, "!%s", VTY_NEWLINE); + } + + return 0; } /** @@ -206,7 +230,17 @@ DEFUN (no_router_eigrp, { vty->node = CONFIG_NODE; - /*TODO: */ + struct eigrp *eigrp; + + eigrp = eigrp_lookup (); + if (eigrp->AS != atoi (argv[3]->arg)) + { + vty_out (vty, "%% Attempting to deconfigure non-existent AS%s", + VTY_NEWLINE); + return CMD_WARNING; + } + + eigrp_finish_final (eigrp); return CMD_SUCCESS; } @@ -416,43 +450,7 @@ DEFUN (no_eigrp_neighbor, DEFUN (show_ip_eigrp_topology, show_ip_eigrp_topology_cmd, - "show ip eigrp topology", - SHOW_STR - IP_STR - "IP-EIGRP show commands\n" - "IP-EIGRP topology\n") -{ - struct eigrp *eigrp; - struct listnode *node, *nnode, *node2, *nnode2; - struct eigrp_prefix_entry *tn; - struct eigrp_neighbor_entry *te; - - eigrp = eigrp_lookup (); - if (eigrp == NULL) - { - vty_out (vty, " EIGRP Routing Process not enabled%s", VTY_NEWLINE); - return CMD_SUCCESS; - } - - show_ip_eigrp_topology_header (vty, eigrp); - - for (ALL_LIST_ELEMENTS (eigrp->topology_table, node, nnode, tn)) - { - show_ip_eigrp_prefix_entry (vty,tn); - for (ALL_LIST_ELEMENTS (tn->entries, node2, nnode2, te)) - { - if (((te->flags & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG) == EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)|| - ((te->flags & EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG) == EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG)) - show_ip_eigrp_neighbor_entry (vty, eigrp, te); - } - } - - return CMD_SUCCESS; -} - -DEFUN (show_ip_eigrp_topology_all_links, - show_ip_eigrp_topology_all_links_cmd, - "show ip eigrp topology all-links", + "show ip eigrp topology [all-links]", SHOW_STR IP_STR "IP-EIGRP show commands\n" @@ -460,9 +458,10 @@ DEFUN (show_ip_eigrp_topology_all_links, "Show all links in topology table\n") { struct eigrp *eigrp; - struct listnode *node, *nnode, *node2, *nnode2; + struct listnode *node, *node2; struct eigrp_prefix_entry *tn; struct eigrp_neighbor_entry *te; + int first; eigrp = eigrp_lookup (); if (eigrp == NULL) @@ -473,12 +472,18 @@ DEFUN (show_ip_eigrp_topology_all_links, show_ip_eigrp_topology_header (vty, eigrp); - for (ALL_LIST_ELEMENTS (eigrp->topology_table, node, nnode, tn)) + for (ALL_LIST_ELEMENTS_RO (eigrp->topology_table, node, tn)) { - show_ip_eigrp_prefix_entry (vty,tn); - for (ALL_LIST_ELEMENTS (tn->entries, node2, nnode2, te)) + first = 1; + for (ALL_LIST_ELEMENTS_RO (tn->entries, node2, te)) { - show_ip_eigrp_neighbor_entry (vty, eigrp, te); + if (argc == 5 || + (((te->flags & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG) == EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)|| + ((te->flags & EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG) == EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG))) + { + show_ip_eigrp_neighbor_entry (vty, eigrp, te, &first); + first = 0; + } } } @@ -611,6 +616,7 @@ DEFUN (eigrp_if_delay, delay = atoi (argv[1]->arg); IF_DEF_PARAMS (ifp)->delay = delay; + eigrp_if_reset (ifp); return CMD_SUCCESS; } @@ -634,6 +640,7 @@ DEFUN (no_eigrp_if_delay, } IF_DEF_PARAMS (ifp)->delay = EIGRP_DELAY_DEFAULT; + eigrp_if_reset (ifp); return CMD_SUCCESS; } @@ -658,23 +665,20 @@ DEFUN (eigrp_if_bandwidth, bandwidth = atoi (argv[1]->arg); IF_DEF_PARAMS (ifp)->bandwidth = bandwidth; + eigrp_if_reset (ifp); return CMD_SUCCESS; } DEFUN (no_eigrp_if_bandwidth, no_eigrp_if_bandwidth_cmd, - "bandwidth (1-10000000)", + "no bandwidth [(1-10000000)]", + NO_STR "Set bandwidth informational parameter\n" "Bandwidth in kilobits\n") { VTY_DECLVAR_CONTEXT(interface, ifp); - u_int32_t bandwidth; struct eigrp *eigrp; - struct eigrp_interface *ei; - struct listnode *node, *nnode, *node2, *nnode2; - struct eigrp_prefix_entry *pe; - struct eigrp_neighbor_entry *ne; eigrp = eigrp_lookup (); if (eigrp == NULL) @@ -683,25 +687,8 @@ DEFUN (no_eigrp_if_bandwidth, return CMD_SUCCESS; } - bandwidth = atoi (argv[1]->arg); - - IF_DEF_PARAMS (ifp)->bandwidth = bandwidth; - - for (ALL_LIST_ELEMENTS (eigrp->eiflist, node, nnode, ei)) - { - if (ei->ifp == ifp) - break; - } - - for (ALL_LIST_ELEMENTS (eigrp->topology_table, node, nnode, pe)) - { - for (ALL_LIST_ELEMENTS (pe->entries, node2, nnode2, ne)) - { - if (ne->ei == ei) - break; - /*TODO: */ - } - } + IF_DEF_PARAMS (ifp)->bandwidth = EIGRP_BANDWIDTH_DEFAULT; + eigrp_if_reset (ifp); return CMD_SUCCESS; } @@ -734,7 +721,7 @@ DEFUN (eigrp_if_ip_hellointerval, DEFUN (no_eigrp_if_ip_hellointerval, no_eigrp_if_ip_hellointerval_cmd, - "no ip hello-interval eigrp (1-65535)", + "no ip hello-interval eigrp [(1-65535)]", NO_STR "Interface Internet Protocol config commands\n" "Configures EIGRP hello interval\n" @@ -743,6 +730,8 @@ DEFUN (no_eigrp_if_ip_hellointerval, { VTY_DECLVAR_CONTEXT(interface, ifp); struct eigrp *eigrp; + struct eigrp_interface *ei; + struct listnode *node, *nnode; eigrp = eigrp_lookup (); if (eigrp == NULL) @@ -753,6 +742,16 @@ DEFUN (no_eigrp_if_ip_hellointerval, IF_DEF_PARAMS (ifp)->v_hello = EIGRP_HELLO_INTERVAL_DEFAULT; + for (ALL_LIST_ELEMENTS (eigrp->eiflist, node, nnode, ei)) + { + if (ei->ifp == ifp) + { + THREAD_TIMER_OFF (ei->t_hello); + thread_add_timer (master, eigrp_hello_timer, ei, 1, &ei->t_hello); + break; + } + } + return CMD_SUCCESS; } @@ -760,7 +759,7 @@ DEFUN (eigrp_if_ip_holdinterval, eigrp_if_ip_holdinterval_cmd, "ip hold-time eigrp (1-65535)", "Interface Internet Protocol config commands\n" - "Configures EIGRP hello interval\n" + "Configures EIGRP IPv4 hold time\n" "Enhanced Interior Gateway Routing Protocol (EIGRP)\n" "Seconds before neighbor is considered down\n") { @@ -837,8 +836,6 @@ DEFUN (no_eigrp_ip_summary_address, return CMD_SUCCESS; } - - DEFUN (no_eigrp_if_ip_holdinterval, no_eigrp_if_ip_holdinterval_cmd, "no ip hold-time eigrp", @@ -1014,7 +1011,7 @@ DEFUN (no_eigrp_authentication_keychain, DEFUN (eigrp_redistribute_source_metric, eigrp_redistribute_source_metric_cmd, "redistribute " FRR_REDIST_STR_EIGRPD - " metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)", + " [metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)]", REDIST_STR FRR_REDIST_HELP_STR_EIGRPD "Metric for redistributed routes\n" @@ -1482,8 +1479,6 @@ eigrp_vty_show_init (void) install_element (VIEW_NODE, &show_ip_eigrp_topology_cmd); - install_element (VIEW_NODE, &show_ip_eigrp_topology_all_links_cmd); - install_element (VIEW_NODE, &show_ip_eigrp_topology_detail_cmd); } diff --git a/eigrpd/eigrpd.c b/eigrpd/eigrpd.c index c6af8986b7..6c0033481d 100644 --- a/eigrpd/eigrpd.c +++ b/eigrpd/eigrpd.c @@ -61,7 +61,6 @@ static struct eigrp_master eigrp_master; struct eigrp_master *eigrp_om; -static void eigrp_finish_final(struct eigrp *); static void eigrp_delete(struct eigrp *); static struct eigrp *eigrp_new(const char *); static void eigrp_add(struct eigrp *); @@ -262,26 +261,39 @@ eigrp_terminate (void) void eigrp_finish (struct eigrp *eigrp) { - eigrp_finish_final(eigrp); /* eigrp being shut-down? If so, was this the last eigrp instance? */ if (CHECK_FLAG(eigrp_om->options, EIGRP_MASTER_SHUTDOWN) && (listcount(eigrp_om->eigrp) == 0)) - exit(0); + { + if (zclient) + zclient_free (zclient); + + exit(0); + } return; } /* Final cleanup of eigrp instance */ -static void +void eigrp_finish_final (struct eigrp *eigrp) { + struct eigrp_interface *ei; + struct eigrp_neighbor *nbr; + struct listnode *node, *nnode, *node2, *nnode2; - close(eigrp->fd); + for (ALL_LIST_ELEMENTS (eigrp->eiflist, node, nnode, ei)) + { + for (ALL_LIST_ELEMENTS (ei->nbrs, node2, nnode2, nbr)) + eigrp_nbr_delete (nbr); + eigrp_if_free (ei, INTERFACE_DOWN_BY_FINAL); + } - if (zclient) - zclient_free(zclient); + THREAD_OFF (eigrp->t_write); + THREAD_OFF (eigrp->t_read); + close (eigrp->fd); list_delete(eigrp->eiflist); list_delete(eigrp->oi_write_q); diff --git a/eigrpd/eigrpd.h b/eigrpd/eigrpd.h index 61d4ba752a..901d413c0c 100644 --- a/eigrpd/eigrpd.h +++ b/eigrpd/eigrpd.h @@ -46,6 +46,7 @@ extern struct eigrp_master *eigrp_om; /* Prototypes */ extern void eigrp_master_init (void); extern void eigrp_terminate (void); + extern void eigrp_finish_final (struct eigrp *); extern void eigrp_finish (struct eigrp *); extern struct eigrp *eigrp_get (const char *); extern struct eigrp *eigrp_lookup (void); From b380f68a7ae1ba89c4289c86ccc0ba0cf8aa2f87 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sat, 13 May 2017 16:37:13 -0400 Subject: [PATCH 029/193] bgpd: add epvn as labeled safi type (ISSUE #471) Signed-off-by: Lou Berger --- bgpd/bgp_label.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_label.h b/bgpd/bgp_label.h index 49a7b945ab..b45e791ce2 100644 --- a/bgpd/bgp_label.h +++ b/bgpd/bgp_label.h @@ -42,7 +42,8 @@ extern int bgp_nlri_parse_label (struct peer *peer, struct attr *attr, static inline int bgp_labeled_safi (safi_t safi) { - if ((safi == SAFI_LABELED_UNICAST) || (safi == SAFI_MPLS_VPN)) + if ((safi == SAFI_LABELED_UNICAST) || (safi == SAFI_MPLS_VPN) || + (safi == SAFI_EVPN)) return 1; return 0; } From 57907d6fe9f91131b7d5ed750d283399f1ca3a42 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sat, 13 May 2017 16:38:35 -0400 Subject: [PATCH 030/193] bgpd: fix VPN SAFI label distribution (Issue #473) Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 24a68778dc..2142719f49 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1270,7 +1270,7 @@ subgroup_announce_check (struct bgp_node *rn, struct bgp_info *ri, } /* If it's labeled safi, make sure the route has a valid label. */ - if (bgp_labeled_safi(safi)) + if (safi == SAFI_LABELED_UNICAST) { u_char *tag = bgp_adv_label(rn, ri, peer, afi, safi); if (!bgp_is_valid_label(tag)) @@ -1942,7 +1942,7 @@ bgp_process_main (struct work_queue *wq, void *data) * to do this upon changes to best path except of the label index changes. */ bgp_table_lock (bgp_node_table (rn)); - if (bgp_labeled_safi (safi)) + if (safi == SAFI_LABELED_UNICAST) { if (new_select) { @@ -2848,7 +2848,7 @@ bgp_update (struct peer *peer, struct prefix *p, u_int32_t addpath_id, new = info_make(type, sub_type, 0, peer, attr_new, rn); /* Update MPLS tag. */ - if (bgp_labeled_safi(safi) || safi == SAFI_EVPN) + if (bgp_labeled_safi(safi)) memcpy ((bgp_info_extra_get (new))->tag, tag, 3); /* Update Overlay Index */ @@ -4462,6 +4462,8 @@ bgp_static_redo_import_check (struct bgp *bgp) afi_t afi; safi_t safi; struct bgp_node *rn; + struct bgp_node *rm; + struct bgp_table *table; struct bgp_static *bgp_static; /* Use this flag to force reprocessing of the route */ @@ -4471,8 +4473,21 @@ bgp_static_redo_import_check (struct bgp *bgp) for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn)) if (rn->info != NULL) { - bgp_static = rn->info; - bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN)) + { + table = rn->info; + + for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) + { + bgp_static = rm->info; + bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi); + } + } + else + { + bgp_static = rn->info; + bgp_static_update (bgp, &rn->p, bgp_static, afi, safi); + } } bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS); } From e5efc58be957eb3c52c03e3b9d80a2a7e8a869ad Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sat, 13 May 2017 17:46:05 -0400 Subject: [PATCH 031/193] bgpd: fix rfapi label origination (Issue #473) Signed-off-by: Lou Berger --- bgpd/rfapi/rfapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 99d26cf13c..fee6d745ee 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -1198,6 +1198,7 @@ add_vnc_route ( bgp, prd, table, p, new); } bgp_unlock_node (prn); + encode_label (label_val, bn->local_label); } bgp_unlock_node (bn); From 20aeb9709ee03c6331265c6e0bc287f0c3628e56 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sun, 14 May 2017 11:10:42 -0400 Subject: [PATCH 032/193] bgpd: fix v6 encap safi config - more labeled unicast breakage (Issue #473) Signed-off-by: Lou Berger --- bgpd/bgp_vty.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4d983c3876..f2fa8a0643 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -60,16 +60,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA static struct peer_group * listen_range_exists (struct bgp *bgp, struct prefix *range, int exact); -#if 0 -#define INSTALL_CMD_ON_AF_NODES(cmd) \ - install_element(BGP_IPV4_NODE, cmd); \ - install_element(BGP_IPV4M_NODE, cmd); \ - install_element(BGP_IPV4L_NODE, cmd); \ - install_element(BGP_IPV6_NODE, cmd); \ - install_element(BGP_IPV6M_NODE, cmd); \ - install_element(BGP_IPV6L_NODE, cmd); \ - install_element(BGP_VPNV4_NODE, cmd); -#endif + static enum node_type bgp_node_type (afi_t afi, safi_t safi) { @@ -111,7 +102,7 @@ bgp_node_type (afi_t afi, safi_t safi) return BGP_VPNV6_NODE; break; case SAFI_ENCAP: - return BGP_ENCAP_NODE; + return BGP_ENCAPV6_NODE; break; } break; From 0918e873f241d5df4fa38da4a9e7bc414e805559 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sun, 14 May 2017 20:24:25 -0400 Subject: [PATCH 033/193] bgpd: fix table leak introduced in labeled unicast (Issue #473) Fix tested for vpn and encap ribs/safi. Labeled unicast may still leak as not tested. Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 2142719f49..23fc4f8c36 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1941,9 +1941,9 @@ bgp_process_main (struct work_queue *wq, void *data) * Right now, since we only deal with per-prefix labels, it is not necessary * to do this upon changes to best path except of the label index changes. */ - bgp_table_lock (bgp_node_table (rn)); if (safi == SAFI_LABELED_UNICAST) { + bgp_table_lock (bgp_node_table (rn)); if (new_select) { if (!old_select || From 368d025eca65041d1187041b6a5e1d3e828807c2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 15 May 2017 06:29:54 +0000 Subject: [PATCH 034/193] lib: fix access to stack value Passing stack value to thread_add_* causes thread->ref to become an invalid pointer when the value goes out of scope Signed-off-by: Quentin Young --- lib/thread.c | 22 +++++++++++----------- lib/vty.c | 14 ++++++-------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index e4dbebe1c4..aef9ac5cf9 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -613,6 +613,7 @@ thread_get (struct thread_master *m, u_char type, thread->arg = arg; thread->index = -1; thread->yield = THREAD_YIELD_TIME_SLOT; /* default */ + thread->ref = NULL; /* * So if the passed in funcname is not what we have @@ -829,12 +830,12 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, thread_add_fd (m->write, thread); } pthread_mutex_unlock (&thread->mtx); - } - if (t_ptr) - { - *t_ptr = thread; - thread->ref = t_ptr; + if (t_ptr) + { + *t_ptr = thread; + thread->ref = t_ptr; + } } } pthread_mutex_unlock (&m->mtx); @@ -869,14 +870,13 @@ funcname_thread_add_timer_timeval (struct thread_master *m, monotime(&thread->u.sands); timeradd(&thread->u.sands, time_relative, &thread->u.sands); pqueue_enqueue(thread, queue); + if (t_ptr) + { + *t_ptr = thread; + thread->ref = t_ptr; + } } pthread_mutex_unlock (&thread->mtx); - - if (t_ptr) - { - *t_ptr = thread; - thread->ref = t_ptr; - } } pthread_mutex_unlock (&m->mtx); } diff --git a/lib/vty.c b/lib/vty.c index a8e54a57de..54f4fd7777 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2613,20 +2613,18 @@ static struct thread_master *vty_master; static void vty_event (enum event event, int sock, struct vty *vty) { - struct thread *vty_serv_thread; - switch (event) { case VTY_SERV: - vty_serv_thread = NULL; - thread_add_read(vty_master, vty_accept, vty, sock, &vty_serv_thread); - vector_set_index (Vvty_serv_thread, sock, vty_serv_thread); + vector_set_index (Vvty_serv_thread, sock, NULL); + thread_add_read(vty_master, vty_accept, vty, sock, + (struct thread **) &Vvty_serv_thread->index[sock]); break; #ifdef VTYSH case VTYSH_SERV: - vty_serv_thread = NULL; - thread_add_read(vty_master, vtysh_accept, vty, sock, &vty_serv_thread); - vector_set_index (Vvty_serv_thread, sock, vty_serv_thread); + vector_set_index (Vvty_serv_thread, sock, NULL); + thread_add_read(vty_master, vtysh_accept, vty, sock, + (struct thread **) &Vvty_serv_thread->index[sock]); break; case VTYSH_READ: vty->t_read = NULL; From 46c3ce832799c53b90ce914b4b4c09b0589ea136 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 07:33:48 -0400 Subject: [PATCH 035/193] bgpd: Cleanup some SA Signed-off-by: Donald Sharp --- bgpd/bgp_attr.c | 3 +-- bgpd/bgp_clist.c | 18 +++++++----------- bgpd/bgp_dump.c | 2 +- bgpd/bgp_packet.c | 5 +++-- bgpd/bgp_route.c | 10 +++++++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index b97ba61c95..7d5a98fec6 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1500,8 +1500,7 @@ bgp_attr_as4_path (struct bgp_attr_parser_args *args, struct aspath **as4_path) } /* Set aspath attribute flag. */ - if (as4_path) - attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS4_PATH); + attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS4_PATH); return BGP_ATTR_PARSE_PROCEED; } diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 3def97c73d..91cd7e3762 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -1158,16 +1158,13 @@ extcommunity_list_set (struct community_list_handler *ch, } } - if (str) - { - if (style == EXTCOMMUNITY_LIST_STANDARD) - ecom = ecommunity_str2com (str, 0, 1); - else - regex = bgp_regcomp (str); + if (style == EXTCOMMUNITY_LIST_STANDARD) + ecom = ecommunity_str2com (str, 0, 1); + else + regex = bgp_regcomp (str); - if (! ecom && ! regex) - return COMMUNITY_LIST_ERR_MALFORMED_VAL; - } + if (! ecom && ! regex) + return COMMUNITY_LIST_ERR_MALFORMED_VAL; if (ecom) ecom->str = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_DISPLAY, 0); @@ -1180,8 +1177,7 @@ extcommunity_list_set (struct community_list_handler *ch, entry->config = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_COMMUNITY_LIST, 0); else if (regex) entry->config = XSTRDUP (MTYPE_COMMUNITY_LIST_CONFIG, str); - else - entry->config = NULL; + entry->u.ecom = ecom; entry->reg = regex; diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 10ddf1660c..c552ceab5a 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -626,7 +626,7 @@ bgp_dump_parse_time (const char *str) return 0; total += time * 60; time = 0; - seen_h = 1; + seen_m = 1; } else return 0; diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 0800dd74ba..ca211589f7 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -603,6 +603,8 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code, struct stream *s; int length; + assert (data); + /* Allocate new stream. */ s = stream_new (BGP_MAX_PACKET_SIZE); @@ -614,8 +616,7 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code, stream_putc (s, sub_code); /* BGP notify sub_code */ /* If notify data is present. */ - if (data) - stream_write (s, data, datalen); + stream_write (s, data, datalen); /* Set BGP packet length. */ length = bgp_packet_set_size (s); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 834b9e073e..01032193a5 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8887,6 +8887,7 @@ bgp_show_community (struct vty *vty, struct bgp *bgp, int argc, int i; char *str; int first = 0; + int ret = 0; b = buffer_new (1024); for (i = 0; i < argc; i++) @@ -8915,9 +8916,12 @@ bgp_show_community (struct vty *vty, struct bgp *bgp, int argc, return CMD_WARNING; } - return bgp_show (vty, bgp, afi, safi, - (exact ? bgp_show_type_community_exact : - bgp_show_type_community), com, 0); + ret = bgp_show (vty, bgp, afi, safi, + (exact ? bgp_show_type_community_exact : + bgp_show_type_community), com, 0); + community_free (com); + + return ret; } static int From 16705ecc653dd657c5b8149934d8734e89c27c07 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 18 Nov 2016 12:06:57 +0100 Subject: [PATCH 036/193] lib: parser: add named variables in CLI struct cmd_token now has a "varname" field which is derived from the DEFUN's string definition. It can be manually specified with "$name" after some token, e.g. "foo WORD$var". A later commit adds code to automatically fill the value if nothing is specified. Signed-off-by: David Lamparter --- lib/command.c | 9 +++++++++ lib/command.h | 2 ++ lib/command_parse.y | 42 +++++++++++++++++++++++++++++++++++++----- lib/grammar_sandbox.c | 2 ++ 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/lib/command.c b/lib/command.c index 2b8eee8de3..06d9422f70 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2772,6 +2772,7 @@ new_cmd_token (enum cmd_token_type type, u_char attr, token->refcnt = 1; token->arg = NULL; token->allowrepeat = false; + token->varname = NULL; return token; } @@ -2800,10 +2801,18 @@ copy_cmd_token (struct cmd_token *token) copy->text = token->text ? XSTRDUP (MTYPE_CMD_TEXT, token->text) : NULL; copy->desc = token->desc ? XSTRDUP (MTYPE_CMD_DESC, token->desc) : NULL; copy->arg = token->arg ? XSTRDUP (MTYPE_CMD_ARG, token->arg) : NULL; + copy->varname = token->varname ? XSTRDUP (MTYPE_CMD_ARG, token->varname) : NULL; return copy; } +void +cmd_set_varname (struct cmd_token *token, const char *varname) +{ + XFREE (MTYPE_CMD_VAR, token->varname); + token->varname = varname ? XSTRDUP (MTYPE_CMD_VAR, varname) : NULL; +} + void cmd_terminate () { diff --git a/lib/command.h b/lib/command.h index 8f6abc85ba..9b2af57991 100644 --- a/lib/command.h +++ b/lib/command.h @@ -210,6 +210,7 @@ struct cmd_token char *desc; // token description long long min, max; // for ranges char *arg; // user input that matches this token + char *varname; struct graph_node *forkjoin; // paired FORK/JOIN for JOIN/FORK }; @@ -446,6 +447,7 @@ extern struct cmd_token *new_cmd_token (enum cmd_token_type, u_char attr, const char *text, const char *desc); extern void del_cmd_token (struct cmd_token *); extern struct cmd_token *copy_cmd_token (struct cmd_token *); +extern void cmd_set_varname(struct cmd_token *token, const char *varname); extern vector completions_to_vec (struct list *completions); extern void cmd_merge_graphs (struct graph *old, struct graph *new, int direction); diff --git a/lib/command_parse.y b/lib/command_parse.y index 0c415af3aa..7e7a68ffdd 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -104,12 +104,15 @@ %type start %type literal_token %type placeholder_token +%type placeholder_token_real %type simple_token %type selector %type selector_token %type selector_token_seq %type selector_seq_seq +%type varname_token + %code { /* bison declarations */ @@ -184,6 +187,16 @@ start: } ; +varname_token: '$' WORD +{ + $$ = XSTRDUP (MTYPE_LEX, $2); +} +| /* empty */ +{ + $$ = NULL; +} +; + cmd_token_seq: /* empty */ | cmd_token_seq cmd_token @@ -207,14 +220,16 @@ simple_token: | placeholder_token ; -literal_token: WORD +literal_token: WORD varname_token { $$ = new_token_node (ctx, WORD_TKN, $1, doc_next(ctx)); + cmd_set_varname ($$->data, $2); + XFREE (MTYPE_LEX, $2); XFREE (MTYPE_LEX, $1); } ; -placeholder_token: +placeholder_token_real: IPV4 { $$ = new_token_node (ctx, IPV4_TKN, $1, doc_next(ctx)); @@ -257,10 +272,22 @@ placeholder_token: XFREE (MTYPE_LEX, $1); } +placeholder_token: + placeholder_token_real varname_token +{ + struct cmd_token *token = $$->data; + $$ = $1; + cmd_set_varname (token, $2); + XFREE (MTYPE_LEX, $2); +}; + + /* productions */ -selector: '<' selector_seq_seq '>' +selector: '<' selector_seq_seq '>' varname_token { $$ = $2; + cmd_set_varname ($2.end->data, $4); + XFREE (MTYPE_LEX, $4); }; selector_seq_seq: @@ -283,7 +310,7 @@ selector_seq_seq: ; /* {keyword} productions */ -selector: '{' selector_seq_seq '}' +selector: '{' selector_seq_seq '}' varname_token { $$ = $2; graph_add_edge ($$.end, $$.start); @@ -293,6 +320,9 @@ selector: '{' selector_seq_seq '}' * loop-avoidal fails to handle * just use [{a|b}] if neccessary, that will work perfectly fine, and reason * #1 is good enough to keep it this way. */ + + cmd_set_varname ($2.end->data, $4); + XFREE (MTYPE_LEX, $4); }; @@ -315,10 +345,12 @@ selector_token_seq: ; /* [option] productions */ -selector: '[' selector_seq_seq ']' +selector: '[' selector_seq_seq ']' varname_token { $$ = $2; graph_add_edge ($$.start, $$.end); + cmd_set_varname ($2.end->data, $4); + XFREE (MTYPE_LEX, $4); } ; diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 0da7981fc1..f35b8beffd 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -526,6 +526,8 @@ pretty_print_graph (struct vty *vty, struct graph_node *start, int level, vty_out(vty, "%s", LOOKUP_DEF(tokennames, tok->type, tokennum)); if (tok->text) vty_out(vty, ":\"%s\"", tok->text); + if (tok->varname) + vty_out(vty, " => %s", tok->varname); if (desc) vty_out(vty, " ?'%s'", tok->desc); vty_out(vty, " "); From 5894e76da7974eb00f4c8277a67630f5e50cec53 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 18 Nov 2016 16:24:47 +0100 Subject: [PATCH 037/193] lib: parser: split off & rename graph handling Put core CLI graph stuff in lib/command_graph.[ch] and consistently prefix all function names with "cmd_". Signed-off-by: David Lamparter --- lib/Makefile.am | 2 + lib/command.c | 344 ++--------------------------------------- lib/command.h | 78 +--------- lib/command_graph.c | 351 ++++++++++++++++++++++++++++++++++++++++++ lib/command_graph.h | 116 ++++++++++++++ lib/command_match.c | 6 +- lib/command_parse.y | 26 ++-- lib/grammar_sandbox.c | 16 +- lib/log.h | 3 +- tools/permutations.c | 4 +- 10 files changed, 509 insertions(+), 437 deletions(-) create mode 100644 lib/command_graph.c create mode 100644 lib/command_graph.h diff --git a/lib/Makefile.am b/lib/Makefile.am index 6e3c6d680d..0323f9ab96 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -17,6 +17,7 @@ libfrr_la_SOURCES = \ network.c pid_output.c getopt.c getopt1.c \ checksum.c vector.c linklist.c vty.c \ graph.c command_parse.y command_lex.l command_match.c \ + command_graph.c \ command.c \ sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \ filter.c routemap.c distribute.c stream.c log.c plist.c \ @@ -60,6 +61,7 @@ pkginclude_HEADERS = \ buffer.h checksum.h filter.h getopt.h hash.h \ if.h linklist.h log.h \ graph.h command_match.h \ + command_graph.h \ command.h \ memory.h network.h prefix.h routemap.h distribute.h sockunion.h \ stream.h table.h thread.h vector.h version.h vty.h zebra.h \ diff --git a/lib/command.c b/lib/command.c index 06d9422f70..7a53357e7a 100644 --- a/lib/command.c +++ b/lib/command.c @@ -40,15 +40,12 @@ #include "workqueue.h" #include "vrf.h" #include "command_match.h" +#include "command_graph.h" #include "qobj.h" #include "defaults.h" DEFINE_MTYPE( LIB, HOST, "Host config") DEFINE_MTYPE( LIB, STRVEC, "String vector") -DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens") -DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text") -DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help") -DEFINE_MTYPE( LIB, CMD_ARG, "Command Argument") /* Command vector which includes some level of command lists. Normally each daemon maintains each own cmdvec. */ @@ -234,8 +231,8 @@ install_node (struct cmd_node *node, node->cmdgraph = graph_new (); node->cmd_vector = vector_init (VECTOR_MIN_SIZE); // add start node - struct cmd_token *token = new_cmd_token (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); - graph_new_node (node->cmdgraph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); + graph_new_node (node->cmdgraph, token, (void (*)(void *)) &cmd_token_del); node->cmd_hash = hash_create (cmd_hash_key, cmd_hash_cmp); } @@ -306,272 +303,6 @@ cmd_prompt (enum node_type node) return cnode->prompt; } -static bool -cmd_nodes_link (struct graph_node *from, struct graph_node *to) -{ - for (size_t i = 0; i < vector_active (from->to); i++) - if (vector_slot (from->to, i) == to) - return true; - return false; -} - -static bool cmd_nodes_equal (struct graph_node *ga, struct graph_node *gb); - -/* returns a single node to be excluded as "next" from iteration - * - for JOIN_TKN, never continue back to the FORK_TKN - * - in all other cases, don't try the node itself (in case of "...") - */ -static inline struct graph_node * -cmd_loopstop(struct graph_node *gn) -{ - struct cmd_token *tok = gn->data; - if (tok->type == JOIN_TKN) - return tok->forkjoin; - else - return gn; -} - -static bool -cmd_subgraph_equal (struct graph_node *ga, struct graph_node *gb, - struct graph_node *a_join) -{ - size_t i, j; - struct graph_node *a_fork, *b_fork; - a_fork = cmd_loopstop (ga); - b_fork = cmd_loopstop (gb); - - if (vector_active (ga->to) != vector_active (gb->to)) - return false; - for (i = 0; i < vector_active (ga->to); i++) - { - struct graph_node *cga = vector_slot (ga->to, i); - - for (j = 0; j < vector_active (gb->to); j++) - { - struct graph_node *cgb = vector_slot (gb->to, i); - - if (cga == a_fork && cgb != b_fork) - continue; - if (cga == a_fork && cgb == b_fork) - break; - - if (cmd_nodes_equal (cga, cgb)) - { - if (cga == a_join) - break; - if (cmd_subgraph_equal (cga, cgb, a_join)) - break; - } - } - if (j == vector_active (gb->to)) - return false; - } - return true; -} - -/* deep compare -- for FORK_TKN, the entire subgraph is compared. - * this is what's needed since we're not currently trying to partially - * merge subgraphs */ -static bool -cmd_nodes_equal (struct graph_node *ga, struct graph_node *gb) -{ - struct cmd_token *a = ga->data, *b = gb->data; - - if (a->type != b->type || a->allowrepeat != b->allowrepeat) - return false; - if (a->type < SPECIAL_TKN && strcmp (a->text, b->text)) - return false; - /* one a ..., the other not. */ - if (cmd_nodes_link (ga, ga) != cmd_nodes_link (gb, gb)) - return false; - - switch (a->type) - { - case RANGE_TKN: - return a->min == b->min && a->max == b->max; - - case FORK_TKN: - /* one is keywords, the other just option or selector ... */ - if (cmd_nodes_link (a->forkjoin, ga) != cmd_nodes_link (b->forkjoin, gb)) - return false; - if (cmd_nodes_link (ga, a->forkjoin) != cmd_nodes_link (gb, b->forkjoin)) - return false; - return cmd_subgraph_equal (ga, gb, a->forkjoin); - - default: - return true; - } -} - -static void -cmd_fork_bump_attr (struct graph_node *gn, struct graph_node *join, - u_char attr) -{ - size_t i; - struct cmd_token *tok = gn->data; - struct graph_node *stop = cmd_loopstop (gn); - - tok->attr = attr; - for (i = 0; i < vector_active (gn->to); i++) - { - struct graph_node *next = vector_slot (gn->to, i); - if (next == stop || next == join) - continue; - cmd_fork_bump_attr (next, join, attr); - } -} - -/* move an entire subtree from the temporary graph resulting from - * parse() into the permanent graph for the command node. - * - * this touches rather deeply into the graph code unfortunately. - */ -static void -cmd_reparent_tree (struct graph *fromgraph, struct graph *tograph, - struct graph_node *node) -{ - struct graph_node *stop = cmd_loopstop (node); - size_t i; - - for (i = 0; i < vector_active (fromgraph->nodes); i++) - if (vector_slot (fromgraph->nodes, i) == node) - { - /* agressive iteration punching through subgraphs - may hit some - * nodes twice. reparent only if found on old graph */ - vector_unset (fromgraph->nodes, i); - vector_set (tograph->nodes, node); - break; - } - - for (i = 0; i < vector_active (node->to); i++) - { - struct graph_node *next = vector_slot (node->to, i); - if (next != stop) - cmd_reparent_tree (fromgraph, tograph, next); - } -} - -static void -cmd_free_recur (struct graph *graph, struct graph_node *node, - struct graph_node *stop) -{ - struct graph_node *next, *nstop; - - for (size_t i = vector_active (node->to); i; i--) - { - next = vector_slot (node->to, i - 1); - if (next == stop) - continue; - nstop = cmd_loopstop (next); - if (nstop != next) - cmd_free_recur (graph, next, nstop); - cmd_free_recur (graph, nstop, stop); - } - graph_delete_node (graph, node); -} - -static void -cmd_free_node (struct graph *graph, struct graph_node *node) -{ - struct cmd_token *tok = node->data; - if (tok->type == JOIN_TKN) - cmd_free_recur (graph, tok->forkjoin, node); - graph_delete_node (graph, node); -} - -/* recursive graph merge. call with - * old ~= new - * (which holds true for old == START_TKN, new == START_TKN) - */ -static void -cmd_merge_nodes (struct graph *oldgraph, struct graph *newgraph, - struct graph_node *old, struct graph_node *new, - int direction) -{ - struct cmd_token *tok; - struct graph_node *old_skip, *new_skip; - old_skip = cmd_loopstop (old); - new_skip = cmd_loopstop (new); - - assert (direction == 1 || direction == -1); - - tok = old->data; - tok->refcnt += direction; - - size_t j, i; - for (j = 0; j < vector_active (new->to); j++) - { - struct graph_node *cnew = vector_slot (new->to, j); - if (cnew == new_skip) - continue; - - for (i = 0; i < vector_active (old->to); i++) - { - struct graph_node *cold = vector_slot (old->to, i); - if (cold == old_skip) - continue; - - if (cmd_nodes_equal (cold, cnew)) - { - struct cmd_token *told = cold->data, *tnew = cnew->data; - - if (told->type == END_TKN) - { - if (direction < 0) - { - graph_delete_node (oldgraph, vector_slot (cold->to, 0)); - graph_delete_node (oldgraph, cold); - } - else - /* force no-match handling to install END_TKN */ - i = vector_active (old->to); - break; - } - - /* the entire fork compared as equal, we continue after it. */ - if (told->type == FORK_TKN) - { - if (tnew->attr < told->attr && direction > 0) - cmd_fork_bump_attr (cold, told->forkjoin, tnew->attr); - /* XXX: no reverse bump on uninstall */ - told = (cold = told->forkjoin)->data; - tnew = (cnew = tnew->forkjoin)->data; - } - if (tnew->attr < told->attr) - told->attr = tnew->attr; - - cmd_merge_nodes (oldgraph, newgraph, cold, cnew, direction); - break; - } - } - /* nothing found => add new to old */ - if (i == vector_active (old->to) && direction > 0) - { - assert (vector_count (cnew->from) == - cmd_nodes_link (cnew, cnew) ? 2 : 1); - graph_remove_edge (new, cnew); - - cmd_reparent_tree (newgraph, oldgraph, cnew); - - graph_add_edge (old, cnew); - } - } - - if (!tok->refcnt) - cmd_free_node (oldgraph, old); -} - -void -cmd_merge_graphs (struct graph *old, struct graph *new, int direction) -{ - assert (vector_active (old->nodes) >= 1); - assert (vector_active (new->nodes) >= 1); - - cmd_merge_nodes (old, new, - vector_slot (old->nodes, 0), vector_slot (new->nodes, 0), - direction); -} - /* Install a command into a node. */ void install_element (enum node_type ntype, struct cmd_element *cmd) @@ -606,11 +337,11 @@ install_element (enum node_type ntype, struct cmd_element *cmd) assert (hash_get (cnode->cmd_hash, cmd, hash_alloc_intern)); struct graph *graph = graph_new(); - struct cmd_token *token = new_cmd_token (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); - graph_new_node (graph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); + graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); - command_parse_format (graph, cmd); - cmd_merge_graphs (cnode->cmdgraph, graph, +1); + cmd_graph_parse (graph, cmd); + cmd_graph_merge (cnode->cmdgraph, graph, +1); graph_delete_graph (graph); vector_set (cnode->cmd_vector, cmd); @@ -652,11 +383,11 @@ uninstall_element (enum node_type ntype, struct cmd_element *cmd) vector_unset_value (cnode->cmd_vector, cmd); struct graph *graph = graph_new(); - struct cmd_token *token = new_cmd_token (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); - graph_new_node (graph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); + graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); - command_parse_format (graph, cmd); - cmd_merge_graphs (cnode->cmdgraph, graph, -1); + cmd_graph_parse (graph, cmd); + cmd_graph_merge (cnode->cmdgraph, graph, -1); graph_delete_graph (graph); if (ntype == VIEW_NODE) @@ -2760,59 +2491,6 @@ cmd_init (int terminal) #endif } -struct cmd_token * -new_cmd_token (enum cmd_token_type type, u_char attr, - const char *text, const char *desc) -{ - struct cmd_token *token = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token)); - token->type = type; - token->attr = attr; - token->text = text ? XSTRDUP (MTYPE_CMD_TEXT, text) : NULL; - token->desc = desc ? XSTRDUP (MTYPE_CMD_DESC, desc) : NULL; - token->refcnt = 1; - token->arg = NULL; - token->allowrepeat = false; - token->varname = NULL; - - return token; -} - -void -del_cmd_token (struct cmd_token *token) -{ - if (!token) return; - - if (token->text) - XFREE (MTYPE_CMD_TEXT, token->text); - if (token->desc) - XFREE (MTYPE_CMD_DESC, token->desc); - if (token->arg) - XFREE (MTYPE_CMD_ARG, token->arg); - - XFREE (MTYPE_CMD_TOKENS, token); -} - -struct cmd_token * -copy_cmd_token (struct cmd_token *token) -{ - struct cmd_token *copy = new_cmd_token (token->type, token->attr, NULL, NULL); - copy->max = token->max; - copy->min = token->min; - copy->text = token->text ? XSTRDUP (MTYPE_CMD_TEXT, token->text) : NULL; - copy->desc = token->desc ? XSTRDUP (MTYPE_CMD_DESC, token->desc) : NULL; - copy->arg = token->arg ? XSTRDUP (MTYPE_CMD_ARG, token->arg) : NULL; - copy->varname = token->varname ? XSTRDUP (MTYPE_CMD_ARG, token->varname) : NULL; - - return copy; -} - -void -cmd_set_varname (struct cmd_token *token, const char *varname) -{ - XFREE (MTYPE_CMD_VAR, token->varname); - token->varname = varname ? XSTRDUP (MTYPE_CMD_VAR, varname) : NULL; -} - void cmd_terminate () { diff --git a/lib/command.h b/lib/command.h index 9b2af57991..4531ec9a17 100644 --- a/lib/command.h +++ b/lib/command.h @@ -29,9 +29,9 @@ #include "graph.h" #include "memory.h" #include "hash.h" +#include "command_graph.h" DECLARE_MTYPE(HOST) -DECLARE_MTYPE(CMD_ARG) /* for test-commands.c */ DECLARE_MTYPE(STRVEC) @@ -165,70 +165,6 @@ struct cmd_node struct hash *cmd_hash; }; -/** - * Types for tokens. - * - * The type determines what kind of data the token can match (in the - * matching use case) or hold (in the argv use case). - */ -enum cmd_token_type -{ - WORD_TKN, // words - VARIABLE_TKN, // almost anything - RANGE_TKN, // integer range - IPV4_TKN, // IPV4 addresses - IPV4_PREFIX_TKN, // IPV4 network prefixes - IPV6_TKN, // IPV6 prefixes - IPV6_PREFIX_TKN, // IPV6 network prefixes - - /* plumbing types */ - FORK_TKN, // marks subgraph beginning - JOIN_TKN, // marks subgraph end - START_TKN, // first token in line - END_TKN, // last token in line - - SPECIAL_TKN = FORK_TKN, -}; - -/* Command attributes */ -enum -{ - CMD_ATTR_NORMAL, - CMD_ATTR_DEPRECATED, - CMD_ATTR_HIDDEN, -}; - -/* Comamand token struct. */ -struct cmd_token -{ - enum cmd_token_type type; // token type - u_char attr; // token attributes - bool allowrepeat; // matcher allowed to match token repetively? - uint32_t refcnt; - - char *text; // token text - char *desc; // token description - long long min, max; // for ranges - char *arg; // user input that matches this token - char *varname; - - struct graph_node *forkjoin; // paired FORK/JOIN for JOIN/FORK -}; - -/* Structure of command element. */ -struct cmd_element -{ - const char *string; /* Command specification by string. */ - const char *doc; /* Documentation of this command. */ - int daemon; /* Daemon to which this command belong. */ - u_char attr; /* Command attributes */ - - /* handler function for command */ - int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]); - - const char *name; /* symbol name for debugging */ -}; - /* Return value of the commands. */ #define CMD_SUCCESS 0 #define CMD_WARNING 1 @@ -442,16 +378,7 @@ extern int cmd_hostname_set (const char *hostname); /* NOT safe for general use; call this only if DEV_BUILD! */ extern void grammar_sandbox_init (void); -/* memory management for cmd_token */ -extern struct cmd_token *new_cmd_token (enum cmd_token_type, u_char attr, - const char *text, const char *desc); -extern void del_cmd_token (struct cmd_token *); -extern struct cmd_token *copy_cmd_token (struct cmd_token *); -extern void cmd_set_varname(struct cmd_token *token, const char *varname); - extern vector completions_to_vec (struct list *completions); -extern void cmd_merge_graphs (struct graph *old, struct graph *new, int direction); -extern void command_parse_format (struct graph *graph, struct cmd_element *cmd); /* Export typical functions. */ extern const char *host_config_get (void); @@ -464,7 +391,4 @@ extern int cmd_banner_motd_file (const char *); /* struct host global, ick */ extern struct host host; -/* text for command */ -#define CMD_CR_TEXT "" - #endif /* _ZEBRA_COMMAND_H */ diff --git a/lib/command_graph.c b/lib/command_graph.c new file mode 100644 index 0000000000..7e611e3622 --- /dev/null +++ b/lib/command_graph.c @@ -0,0 +1,351 @@ +/* + * CLI graph handling + * + * -- + * Copyright (C) 2016 Cumulus Networks, Inc. + * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + * Copyright (C) 2013 by Open Source Routing. + * Copyright (C) 2013 by Internet Systems Consortium, Inc. ("ISC") + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as 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; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include "command_graph.h" + +DECLARE_MTYPE(CMD_TOKEN_DATA) + +DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens") +DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text") +DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help") +DEFINE_MTYPE( LIB, CMD_ARG, "Command Argument") +DEFINE_MTYPE_STATIC(LIB, CMD_VAR, "Command Argument Name") + +struct cmd_token * +cmd_token_new (enum cmd_token_type type, u_char attr, + const char *text, const char *desc) +{ + struct cmd_token *token = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token)); + token->type = type; + token->attr = attr; + token->text = text ? XSTRDUP (MTYPE_CMD_TEXT, text) : NULL; + token->desc = desc ? XSTRDUP (MTYPE_CMD_DESC, desc) : NULL; + token->refcnt = 1; + token->arg = NULL; + token->allowrepeat = false; + token->varname = NULL; + + return token; +} + +void +cmd_token_del (struct cmd_token *token) +{ + if (!token) return; + + XFREE (MTYPE_CMD_TEXT, token->text); + XFREE (MTYPE_CMD_DESC, token->desc); + XFREE (MTYPE_CMD_ARG, token->arg); + XFREE (MTYPE_CMD_VAR, token->varname); + + XFREE (MTYPE_CMD_TOKENS, token); +} + +struct cmd_token * +cmd_token_dup (struct cmd_token *token) +{ + struct cmd_token *copy = cmd_token_new (token->type, token->attr, NULL, NULL); + copy->max = token->max; + copy->min = token->min; + copy->text = token->text ? XSTRDUP (MTYPE_CMD_TEXT, token->text) : NULL; + copy->desc = token->desc ? XSTRDUP (MTYPE_CMD_DESC, token->desc) : NULL; + copy->arg = token->arg ? XSTRDUP (MTYPE_CMD_ARG, token->arg) : NULL; + copy->varname = token->varname ? XSTRDUP (MTYPE_CMD_VAR, token->varname) : NULL; + + return copy; +} + +void cmd_token_varname_set(struct cmd_token *token, const char *varname) +{ + XFREE (MTYPE_CMD_VAR, token->varname); + token->varname = varname ? XSTRDUP (MTYPE_CMD_VAR, varname) : NULL; +} + +static bool +cmd_nodes_link (struct graph_node *from, struct graph_node *to) +{ + for (size_t i = 0; i < vector_active (from->to); i++) + if (vector_slot (from->to, i) == to) + return true; + return false; +} + +static bool cmd_nodes_equal (struct graph_node *ga, struct graph_node *gb); + +/* returns a single node to be excluded as "next" from iteration + * - for JOIN_TKN, never continue back to the FORK_TKN + * - in all other cases, don't try the node itself (in case of "...") + */ +static inline struct graph_node * +cmd_loopstop(struct graph_node *gn) +{ + struct cmd_token *tok = gn->data; + if (tok->type == JOIN_TKN) + return tok->forkjoin; + else + return gn; +} + +static bool +cmd_subgraph_equal (struct graph_node *ga, struct graph_node *gb, + struct graph_node *a_join) +{ + size_t i, j; + struct graph_node *a_fork, *b_fork; + a_fork = cmd_loopstop (ga); + b_fork = cmd_loopstop (gb); + + if (vector_active (ga->to) != vector_active (gb->to)) + return false; + for (i = 0; i < vector_active (ga->to); i++) + { + struct graph_node *cga = vector_slot (ga->to, i); + + for (j = 0; j < vector_active (gb->to); j++) + { + struct graph_node *cgb = vector_slot (gb->to, i); + + if (cga == a_fork && cgb != b_fork) + continue; + if (cga == a_fork && cgb == b_fork) + break; + + if (cmd_nodes_equal (cga, cgb)) + { + if (cga == a_join) + break; + if (cmd_subgraph_equal (cga, cgb, a_join)) + break; + } + } + if (j == vector_active (gb->to)) + return false; + } + return true; +} + +/* deep compare -- for FORK_TKN, the entire subgraph is compared. + * this is what's needed since we're not currently trying to partially + * merge subgraphs */ +static bool +cmd_nodes_equal (struct graph_node *ga, struct graph_node *gb) +{ + struct cmd_token *a = ga->data, *b = gb->data; + + if (a->type != b->type || a->allowrepeat != b->allowrepeat) + return false; + if (a->type < SPECIAL_TKN && strcmp (a->text, b->text)) + return false; + /* one a ..., the other not. */ + if (cmd_nodes_link (ga, ga) != cmd_nodes_link (gb, gb)) + return false; + + switch (a->type) + { + case RANGE_TKN: + return a->min == b->min && a->max == b->max; + + case FORK_TKN: + /* one is keywords, the other just option or selector ... */ + if (cmd_nodes_link (a->forkjoin, ga) != cmd_nodes_link (b->forkjoin, gb)) + return false; + if (cmd_nodes_link (ga, a->forkjoin) != cmd_nodes_link (gb, b->forkjoin)) + return false; + return cmd_subgraph_equal (ga, gb, a->forkjoin); + + default: + return true; + } +} + +static void +cmd_fork_bump_attr (struct graph_node *gn, struct graph_node *join, + u_char attr) +{ + size_t i; + struct cmd_token *tok = gn->data; + struct graph_node *stop = cmd_loopstop (gn); + + tok->attr = attr; + for (i = 0; i < vector_active (gn->to); i++) + { + struct graph_node *next = vector_slot (gn->to, i); + if (next == stop || next == join) + continue; + cmd_fork_bump_attr (next, join, attr); + } +} + +/* move an entire subtree from the temporary graph resulting from + * parse() into the permanent graph for the command node. + * + * this touches rather deeply into the graph code unfortunately. + */ +static void +cmd_reparent_tree (struct graph *fromgraph, struct graph *tograph, + struct graph_node *node) +{ + struct graph_node *stop = cmd_loopstop (node); + size_t i; + + for (i = 0; i < vector_active (fromgraph->nodes); i++) + if (vector_slot (fromgraph->nodes, i) == node) + { + /* agressive iteration punching through subgraphs - may hit some + * nodes twice. reparent only if found on old graph */ + vector_unset (fromgraph->nodes, i); + vector_set (tograph->nodes, node); + break; + } + + for (i = 0; i < vector_active (node->to); i++) + { + struct graph_node *next = vector_slot (node->to, i); + if (next != stop) + cmd_reparent_tree (fromgraph, tograph, next); + } +} + +static void +cmd_free_recur (struct graph *graph, struct graph_node *node, + struct graph_node *stop) +{ + struct graph_node *next, *nstop; + + for (size_t i = vector_active (node->to); i; i--) + { + next = vector_slot (node->to, i - 1); + if (next == stop) + continue; + nstop = cmd_loopstop (next); + if (nstop != next) + cmd_free_recur (graph, next, nstop); + cmd_free_recur (graph, nstop, stop); + } + graph_delete_node (graph, node); +} + +static void +cmd_free_node (struct graph *graph, struct graph_node *node) +{ + struct cmd_token *tok = node->data; + if (tok->type == JOIN_TKN) + cmd_free_recur (graph, tok->forkjoin, node); + graph_delete_node (graph, node); +} + +/* recursive graph merge. call with + * old ~= new + * (which holds true for old == START_TKN, new == START_TKN) + */ +static void +cmd_merge_nodes (struct graph *oldgraph, struct graph *newgraph, + struct graph_node *old, struct graph_node *new, + int direction) +{ + struct cmd_token *tok; + struct graph_node *old_skip, *new_skip; + old_skip = cmd_loopstop (old); + new_skip = cmd_loopstop (new); + + assert (direction == 1 || direction == -1); + + tok = old->data; + tok->refcnt += direction; + + size_t j, i; + for (j = 0; j < vector_active (new->to); j++) + { + struct graph_node *cnew = vector_slot (new->to, j); + if (cnew == new_skip) + continue; + + for (i = 0; i < vector_active (old->to); i++) + { + struct graph_node *cold = vector_slot (old->to, i); + if (cold == old_skip) + continue; + + if (cmd_nodes_equal (cold, cnew)) + { + struct cmd_token *told = cold->data, *tnew = cnew->data; + + if (told->type == END_TKN) + { + if (direction < 0) + { + graph_delete_node (oldgraph, vector_slot (cold->to, 0)); + graph_delete_node (oldgraph, cold); + } + else + /* force no-match handling to install END_TKN */ + i = vector_active (old->to); + break; + } + + /* the entire fork compared as equal, we continue after it. */ + if (told->type == FORK_TKN) + { + if (tnew->attr < told->attr && direction > 0) + cmd_fork_bump_attr (cold, told->forkjoin, tnew->attr); + /* XXX: no reverse bump on uninstall */ + told = (cold = told->forkjoin)->data; + tnew = (cnew = tnew->forkjoin)->data; + } + if (tnew->attr < told->attr) + told->attr = tnew->attr; + + cmd_merge_nodes (oldgraph, newgraph, cold, cnew, direction); + break; + } + } + /* nothing found => add new to old */ + if (i == vector_active (old->to) && direction > 0) + { + assert (vector_count (cnew->from) == + cmd_nodes_link (cnew, cnew) ? 2 : 1); + graph_remove_edge (new, cnew); + + cmd_reparent_tree (newgraph, oldgraph, cnew); + + graph_add_edge (old, cnew); + } + } + + if (!tok->refcnt) + cmd_free_node (oldgraph, old); +} + +void +cmd_graph_merge (struct graph *old, struct graph *new, int direction) +{ + assert (vector_active (old->nodes) >= 1); + assert (vector_active (new->nodes) >= 1); + + cmd_merge_nodes (old, new, + vector_slot (old->nodes, 0), vector_slot (new->nodes, 0), + direction); +} diff --git a/lib/command_graph.h b/lib/command_graph.h new file mode 100644 index 0000000000..e6d49f2f56 --- /dev/null +++ b/lib/command_graph.h @@ -0,0 +1,116 @@ +/* + * CLI graph handling + * + * -- + * Copyright (C) 2016 Cumulus Networks, Inc. + * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + * Copyright (C) 2013 by Open Source Routing. + * Copyright (C) 2013 by Internet Systems Consortium, Inc. ("ISC") + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as 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; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _FRR_COMMAND_GRAPH_H +#define _FRR_COMMAND_GRAPH_H + +#include +#include + +#include "memory.h" +#include "vector.h" +#include "graph.h" + +DECLARE_MTYPE(CMD_ARG) + +struct vty; + +/** + * Types for tokens. + * + * The type determines what kind of data the token can match (in the + * matching use case) or hold (in the argv use case). + */ +enum cmd_token_type +{ + WORD_TKN, // words + VARIABLE_TKN, // almost anything + RANGE_TKN, // integer range + IPV4_TKN, // IPV4 addresses + IPV4_PREFIX_TKN, // IPV4 network prefixes + IPV6_TKN, // IPV6 prefixes + IPV6_PREFIX_TKN, // IPV6 network prefixes + + /* plumbing types */ + FORK_TKN, // marks subgraph beginning + JOIN_TKN, // marks subgraph end + START_TKN, // first token in line + END_TKN, // last token in line + + SPECIAL_TKN = FORK_TKN, +}; + +/* Command attributes */ +enum +{ + CMD_ATTR_NORMAL, + CMD_ATTR_DEPRECATED, + CMD_ATTR_HIDDEN, +}; + +/* Comamand token struct. */ +struct cmd_token +{ + enum cmd_token_type type; // token type + uint8_t attr; // token attributes + bool allowrepeat; // matcher allowed to match token repetively? + uint32_t refcnt; + + char *text; // token text + char *desc; // token description + long long min, max; // for ranges + char *arg; // user input that matches this token + char *varname; + + struct graph_node *forkjoin; // paired FORK/JOIN for JOIN/FORK +}; + +/* Structure of command element. */ +struct cmd_element +{ + const char *string; /* Command specification by string. */ + const char *doc; /* Documentation of this command. */ + int daemon; /* Daemon to which this command belong. */ + uint8_t attr; /* Command attributes */ + + /* handler function for command */ + int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]); + + const char *name; /* symbol name for debugging */ +}; + +/* text for command */ +#define CMD_CR_TEXT "" + +/* memory management for cmd_token */ +extern struct cmd_token *cmd_token_new (enum cmd_token_type, uint8_t attr, + const char *text, const char *desc); +extern struct cmd_token *cmd_token_dup (struct cmd_token *); +extern void cmd_token_del (struct cmd_token *); +extern void cmd_token_varname_set(struct cmd_token *token, const char *varname); + +extern void cmd_graph_parse (struct graph *graph, struct cmd_element *cmd); +extern void cmd_graph_merge (struct graph *old, struct graph *new, int direction); + +#endif /* _FRR_COMMAND_GRAPH_H */ diff --git a/lib/command_match.c b/lib/command_match.c index bbd9cd091d..df1a8bb72b 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -117,7 +117,7 @@ command_match (struct graph *cmdgraph, struct listnode *tail = listtail (*argv); // delete dummy start node - del_cmd_token ((struct cmd_token *) head->data); + cmd_token_del ((struct cmd_token *) head->data); list_delete_node (*argv, head); // get cmd_element out of list tail @@ -281,7 +281,7 @@ command_match_r (struct graph_node *start, vector vline, unsigned int n, // manually deleted struct cmd_element *el = leaf->data; listnode_add (currbest, el); - currbest->del = (void (*)(void *)) &del_cmd_token; + currbest->del = (void (*)(void *)) &cmd_token_del; // do not break immediately; continue walking through the follow set // to ensure that there is exactly one END_TKN } @@ -320,7 +320,7 @@ command_match_r (struct graph_node *start, vector vline, unsigned int n, { // copy token, set arg and prepend to currbest struct cmd_token *token = start->data; - struct cmd_token *copy = copy_cmd_token (token); + struct cmd_token *copy = cmd_token_dup (token); copy->arg = XSTRDUP (MTYPE_CMD_ARG, input_token); listnode_add_before (currbest, currbest->head, copy); matcher_rv = MATCHER_OK; diff --git a/lib/command_parse.y b/lib/command_parse.y index 7e7a68ffdd..466e3d3f1f 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -44,12 +44,12 @@ * struct parser_ctx is needed for the bison forward decls. */ %code requires { - #include "stdlib.h" - #include "string.h" - #include "memory.h" - #include "command.h" + #include + #include + #include + + #include "command_graph.h" #include "log.h" - #include "graph.h" DECLARE_MTYPE(LEX) @@ -223,7 +223,7 @@ simple_token: literal_token: WORD varname_token { $$ = new_token_node (ctx, WORD_TKN, $1, doc_next(ctx)); - cmd_set_varname ($$->data, $2); + cmd_token_varname_set ($$->data, $2); XFREE (MTYPE_LEX, $2); XFREE (MTYPE_LEX, $1); } @@ -277,7 +277,7 @@ placeholder_token: { struct cmd_token *token = $$->data; $$ = $1; - cmd_set_varname (token, $2); + cmd_token_varname_set (token, $2); XFREE (MTYPE_LEX, $2); }; @@ -286,7 +286,7 @@ placeholder_token: selector: '<' selector_seq_seq '>' varname_token { $$ = $2; - cmd_set_varname ($2.end->data, $4); + cmd_token_varname_set ($2.end->data, $4); XFREE (MTYPE_LEX, $4); }; @@ -321,7 +321,7 @@ selector: '{' selector_seq_seq '}' varname_token * just use [{a|b}] if neccessary, that will work perfectly fine, and reason * #1 is good enough to keep it this way. */ - cmd_set_varname ($2.end->data, $4); + cmd_token_varname_set ($2.end->data, $4); XFREE (MTYPE_LEX, $4); }; @@ -349,7 +349,7 @@ selector: '[' selector_seq_seq ']' varname_token { $$ = $2; graph_add_edge ($$.start, $$.end); - cmd_set_varname ($2.end->data, $4); + cmd_token_varname_set ($2.end->data, $4); XFREE (MTYPE_LEX, $4); } ; @@ -361,7 +361,7 @@ selector: '[' selector_seq_seq ']' varname_token DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)") void -command_parse_format (struct graph *graph, struct cmd_element *cmd) +cmd_graph_parse (struct graph *graph, struct cmd_element *cmd) { struct parser_ctx ctx = { .graph = graph, .el = cmd }; @@ -462,6 +462,6 @@ static struct graph_node * new_token_node (struct parser_ctx *ctx, enum cmd_token_type type, const char *text, const char *doc) { - struct cmd_token *token = new_cmd_token (type, ctx->el->attr, text, doc); - return graph_new_node (ctx->graph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (type, ctx->el->attr, text, doc); + return graph_new_node (ctx->graph, token, (void (*)(void *)) &cmd_token_del); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index f35b8beffd..24bf20dac6 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -70,11 +70,11 @@ DEFUN (grammar_test, // parse the command and install it into the command graph struct graph *graph = graph_new(); - struct cmd_token *token = new_cmd_token (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); - graph_new_node (graph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); + graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); - command_parse_format (graph, cmd); - cmd_merge_graphs (nodegraph, graph, +1); + cmd_graph_parse (graph, cmd); + cmd_graph_merge (nodegraph, graph, +1); return CMD_SUCCESS; } @@ -123,7 +123,7 @@ DEFUN (grammar_test_complete, } for (i = 0; i < vector_active (comps); i++) - del_cmd_token ((struct cmd_token *) vector_slot (comps, i)); + cmd_token_del ((struct cmd_token *) vector_slot (comps, i)); vector_free (comps); } else @@ -229,7 +229,7 @@ DEFUN (grammar_test_doc, cmd->func = NULL; // parse element - command_parse_format (nodegraph, cmd); + cmd_graph_parse (nodegraph, cmd); return CMD_SUCCESS; } @@ -649,8 +649,8 @@ init_cmdgraph (struct vty *vty, struct graph **graph) // initialize graph, add start noe *graph = graph_new (); nodegraph_free = *graph; - struct cmd_token *token = new_cmd_token (START_TKN, 0, NULL, NULL); - graph_new_node (*graph, token, (void (*)(void *)) &del_cmd_token); + struct cmd_token *token = cmd_token_new (START_TKN, 0, NULL, NULL); + graph_new_node (*graph, token, (void (*)(void *)) &cmd_token_del); if (vty) vty_out (vty, "initialized graph%s", VTY_NEWLINE); } diff --git a/lib/log.h b/lib/log.h index cc419cc374..5faf0103e2 100644 --- a/lib/log.h +++ b/lib/log.h @@ -24,6 +24,7 @@ #define _ZEBRA_LOG_H #include +#include #include /* Here is some guidance on logging levels to use: @@ -64,7 +65,7 @@ struct message /* Open zlog function */ extern void openzlog (const char *progname, const char *protoname, - u_short instance, int syslog_options, int syslog_facility); + uint16_t instance, int syslog_options, int syslog_facility); /* Close zlog function. */ extern void closezlog (void); diff --git a/tools/permutations.c b/tools/permutations.c index 88d1464697..72ce634f0c 100644 --- a/tools/permutations.c +++ b/tools/permutations.c @@ -43,9 +43,9 @@ int main (int argc, char *argv[]) cmd->string = strdup(argv[1]); struct graph *graph = graph_new(); - struct cmd_token *token = new_cmd_token (START_TKN, cmd->attr, NULL, NULL); + struct cmd_token *token = cmd_token_new (START_TKN, cmd->attr, NULL, NULL); graph_new_node (graph, token, NULL); - command_parse_format (graph, cmd); + cmd_graph_parse (graph, cmd); permute (vector_slot (graph->nodes, 0)); } From c09c46ae3c2702b3553e558f723e6de4fea3e05d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 22 Mar 2017 06:56:17 +0100 Subject: [PATCH 038/193] lib: parser: add pre-merge varname propagation step Fills token->varname based on context. WORD tokens use the WORD - if it isn't actually "WORD". Other than that, a preceding constant token is used as name. Signed-off-by: David Lamparter --- lib/command.c | 2 + lib/command_graph.c | 131 +++++++++++++++++++++++++++++++++++++++++++- lib/command_graph.h | 1 + 3 files changed, 133 insertions(+), 1 deletion(-) diff --git a/lib/command.c b/lib/command.c index 7a53357e7a..0e19a3dfee 100644 --- a/lib/command.c +++ b/lib/command.c @@ -341,6 +341,7 @@ install_element (enum node_type ntype, struct cmd_element *cmd) graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); cmd_graph_parse (graph, cmd); + cmd_graph_names (graph); cmd_graph_merge (cnode->cmdgraph, graph, +1); graph_delete_graph (graph); @@ -387,6 +388,7 @@ uninstall_element (enum node_type ntype, struct cmd_element *cmd) graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); cmd_graph_parse (graph, cmd); + cmd_graph_names (graph); cmd_graph_merge (cnode->cmdgraph, graph, -1); graph_delete_graph (graph); diff --git a/lib/command_graph.c b/lib/command_graph.c index 7e611e3622..62d0610e18 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -81,7 +81,28 @@ cmd_token_dup (struct cmd_token *token) void cmd_token_varname_set(struct cmd_token *token, const char *varname) { XFREE (MTYPE_CMD_VAR, token->varname); - token->varname = varname ? XSTRDUP (MTYPE_CMD_VAR, varname) : NULL; + if (!varname) + { + token->varname = NULL; + return; + } + + size_t len = strlen (varname), i; + token->varname = XMALLOC (MTYPE_CMD_VAR, len + 1); + + for (i = 0; i < len; i++) + switch (varname[i]) + { + case '-': + case '+': + case '*': + case ':': + token->varname[i] = '_'; + break; + default: + token->varname[i] = tolower (varname[i]); + } + token->varname[len] = '\0'; } static bool @@ -162,6 +183,10 @@ cmd_nodes_equal (struct graph_node *ga, struct graph_node *gb) /* one a ..., the other not. */ if (cmd_nodes_link (ga, ga) != cmd_nodes_link (gb, gb)) return false; + if (!a->varname != !b->varname) + return false; + if (a->varname && strcmp (a->varname, b->varname)) + return false; switch (a->type) { @@ -349,3 +374,107 @@ cmd_graph_merge (struct graph *old, struct graph *new, int direction) vector_slot (old->nodes, 0), vector_slot (new->nodes, 0), direction); } + +static void +cmd_node_names (struct graph_node *gn, struct graph_node *join, + const char *prevname) +{ + size_t i; + struct cmd_token *tok = gn->data, *jointok; + struct graph_node *stop = cmd_loopstop (gn); + + switch (tok->type) + { + case WORD_TKN: + prevname = tok->text; + break; + + case VARIABLE_TKN: + if (!tok->varname + && strcmp (tok->text, "WORD") + && strcmp (tok->text, "NAME")) + cmd_token_varname_set (tok, tok->text); + /* fallthrough */ + case RANGE_TKN: + case IPV4_TKN: + case IPV4_PREFIX_TKN: + case IPV6_TKN: + case IPV6_PREFIX_TKN: + if (!tok->varname && prevname) + cmd_token_varname_set (tok, prevname); + prevname = NULL; + break; + + case START_TKN: + case END_TKN: + case JOIN_TKN: + /* " WORD" -> word is not "bar" or "foo" */ + prevname = NULL; + break; + + case FORK_TKN: + /* apply "$name" */ + jointok = tok->forkjoin->data; + if (!jointok->varname) + break; + for (i = 0; i < vector_active (tok->forkjoin->from); i++) + { + struct graph_node *tail = vector_slot (tok->forkjoin->from, i); + struct cmd_token *tailtok = tail->data; + if (tail == gn || tailtok->varname) + continue; + cmd_token_varname_set (tailtok, jointok->varname); + } + break; + } + + for (i = 0; i < vector_active (gn->to); i++) + { + struct graph_node *next = vector_slot (gn->to, i); + if (next == stop || next == join) + continue; + cmd_node_names (next, join, prevname); + } + + if (tok->type == FORK_TKN && tok->forkjoin != join) + cmd_node_names (tok->forkjoin, join, NULL); +} + +void +cmd_graph_names (struct graph *graph) +{ + struct graph_node *start; + + assert (vector_active (graph->nodes) >= 1); + start = vector_slot (graph->nodes, 0); + + /* apply varname on initial "[no]" */ + do + { + if (vector_active (start->to) != 1) + break; + + struct graph_node *first = vector_slot (start->to, 0); + struct cmd_token *tok = first->data; + /* looking for an option with 2 choices, nothing or "no" */ + if (tok->type != FORK_TKN || vector_active (first->to) != 2) + break; + + struct graph_node *next0 = vector_slot (first->to, 0); + struct graph_node *next1 = vector_slot (first->to, 1); + /* one needs to be empty */ + if (next0 != tok->forkjoin && next1 != tok->forkjoin) + break; + + struct cmd_token *tok0 = next0->data; + struct cmd_token *tok1 = next1->data; + /* the other one needs to be "no" (only one will match here) */ + if ((tok0->type == WORD_TKN && !strcmp(tok0->text, "no"))) + cmd_token_varname_set (tok0, "no"); + if ((tok1->type == WORD_TKN && !strcmp(tok1->text, "no"))) + cmd_token_varname_set (tok1, "no"); + } + while (0); + + cmd_node_names (start, NULL, NULL); +} diff --git a/lib/command_graph.h b/lib/command_graph.h index e6d49f2f56..11cea9bd42 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -111,6 +111,7 @@ extern void cmd_token_del (struct cmd_token *); extern void cmd_token_varname_set(struct cmd_token *token, const char *varname); extern void cmd_graph_parse (struct graph *graph, struct cmd_element *cmd); +extern void cmd_graph_names (struct graph *graph); extern void cmd_graph_merge (struct graph *old, struct graph *new, int direction); #endif /* _FRR_COMMAND_GRAPH_H */ From 70d44c5cd4f28f9d08a24f519d859885d92e2a13 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 19 Nov 2016 11:57:08 +0100 Subject: [PATCH 039/193] lib: cli: autocomplete variables Shows known values in the appropriate naming domain when the user hits or . This patch only works in the telnet CLI, the next patch adds vtysh support. Included completions: - interface names - route-map names - prefix-list names Signed-off-by: David Lamparter --- lib/command.c | 62 ++++++++++++++++++++++++++++++++++++++++++--- lib/command.h | 9 +++++++ lib/command_graph.h | 2 ++ lib/if.c | 32 +++++++++++++++++++++++ lib/plist.c | 36 ++++++++++++++++++++++++++ lib/routemap.c | 28 +++++++++++++++++++- lib/vty.c | 26 ++++++++++++++++--- 7 files changed, 187 insertions(+), 8 deletions(-) diff --git a/lib/command.c b/lib/command.c index 0e19a3dfee..5b4c63fa95 100644 --- a/lib/command.c +++ b/lib/command.c @@ -46,6 +46,7 @@ DEFINE_MTYPE( LIB, HOST, "Host config") DEFINE_MTYPE( LIB, STRVEC, "String vector") +DEFINE_MTYPE( LIB, COMPLETION, "Completion item") /* Command vector which includes some level of command lists. Normally each daemon maintains each own cmdvec. */ @@ -678,6 +679,54 @@ cmd_describe_command (vector vline, struct vty *vty, int *status) return cmd_complete_command_real (vline, vty, status); } +static struct list *varhandlers = NULL; + +void +cmd_variable_complete (struct cmd_token *token, const char *arg, vector comps) +{ + struct listnode *ln; + const struct cmd_variable_handler *cvh; + size_t i, argsz; + vector tmpcomps; + + tmpcomps = arg ? vector_init (VECTOR_MIN_SIZE) : comps; + + for (ALL_LIST_ELEMENTS_RO(varhandlers, ln, cvh)) + { + if (cvh->tokenname && strcmp(cvh->tokenname, token->text)) + continue; + if (cvh->varname && (!token->varname || strcmp(cvh->varname, token->varname))) + continue; + cvh->completions(tmpcomps, token); + break; + } + + if (!arg) + return; + + argsz = strlen(arg); + for (i = vector_active(tmpcomps); i; i--) + { + char *item = vector_slot(tmpcomps, i - 1); + if (strlen(item) >= argsz + && !strncmp(item, arg, argsz)) + vector_set(comps, item); + else + XFREE(MTYPE_COMPLETION, item); + } + vector_free(tmpcomps); +} + +void +cmd_variable_handler_register (const struct cmd_variable_handler *cvh) +{ + if (!varhandlers) + return; + + for (; cvh->completions; cvh++) + listnode_add(varhandlers, (void *)cvh); +} + /** * Generate possible tab-completions for the given input. This function only * returns results that would result in a valid command if used as Readline @@ -719,7 +768,12 @@ cmd_complete_command (vector vline, struct vty *vty, int *status) { struct cmd_token *token = vector_slot (initial_comps, i); if (token->type == WORD_TKN) - vector_set (comps, token); + vector_set (comps, XSTRDUP (MTYPE_COMPLETION, token->text)); + else if (IS_VARYING_TOKEN(token->type)) + { + const char *ref = vector_lookup(vline, vector_active (vline) - 1); + cmd_variable_complete (token, ref, comps); + } } vector_free (initial_comps); @@ -741,9 +795,7 @@ cmd_complete_command (vector vline, struct vty *vty, int *status) unsigned int i; for (i = 0; i < vector_active (comps); i++) { - struct cmd_token *token = vector_slot (comps, i); - ret[i] = XSTRDUP (MTYPE_TMP, token->text); - vector_unset (comps, i); + ret[i] = vector_slot (comps, i); } // set the last element to NULL, because this array is used in // a Readline completion_generator function which expects NULL @@ -2394,6 +2446,8 @@ cmd_init (int terminal) { qobj_init (); + varhandlers = list_new (); + /* Allocate initial top vector of commands. */ cmdvec = vector_init (VECTOR_MIN_SIZE); diff --git a/lib/command.h b/lib/command.h index 4531ec9a17..1aca8b4ae1 100644 --- a/lib/command.h +++ b/lib/command.h @@ -32,6 +32,7 @@ #include "command_graph.h" DECLARE_MTYPE(HOST) +DECLARE_MTYPE(COMPLETION) /* for test-commands.c */ DECLARE_MTYPE(STRVEC) @@ -391,4 +392,12 @@ extern int cmd_banner_motd_file (const char *); /* struct host global, ick */ extern struct host host; +struct cmd_variable_handler { + const char *tokenname, *varname; + void (*completions)(vector out, struct cmd_token *token); +}; + +extern void cmd_variable_complete (struct cmd_token *token, const char *arg, vector comps); +extern void cmd_variable_handler_register (const struct cmd_variable_handler *cvh); + #endif /* _ZEBRA_COMMAND_H */ diff --git a/lib/command_graph.h b/lib/command_graph.h index 11cea9bd42..595508d5ce 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -61,6 +61,8 @@ enum cmd_token_type SPECIAL_TKN = FORK_TKN, }; +#define IS_VARYING_TOKEN(x) ((x) >= VARIABLE_TKN && (x) < FORK_TKN) + /* Command attributes */ enum { diff --git a/lib/if.c b/lib/if.c index ecb7463168..3fbf2df6a0 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1126,6 +1126,36 @@ ifaddr_ipv4_lookup (struct in_addr *addr, ifindex_t ifindex) } #endif /* ifaddr_ipv4_table */ +static void if_autocomplete(vector comps, struct cmd_token *token) +{ + struct interface *ifp; + struct listnode *ln; + struct vrf *vrf = NULL; + + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) + { + for (ALL_LIST_ELEMENTS_RO(vrf->iflist, ln, ifp)) + vector_set (comps, XSTRDUP (MTYPE_COMPLETION, ifp->name)); + } + +} + +static const struct cmd_variable_handler if_var_handlers[] = { + { + /* "interface NAME" */ + .varname = "interface", + .completions = if_autocomplete + }, { + .tokenname = "IFNAME", + .completions = if_autocomplete + }, { + .tokenname = "INTERFACE", + .completions = if_autocomplete + }, { + .completions = NULL + } +}; + /* Initialize interface list. */ void if_init (struct list **intf_list) @@ -1136,6 +1166,8 @@ if_init (struct list **intf_list) #endif /* ifaddr_ipv4_table */ (*intf_list)->cmp = (int (*)(void *, void *))if_cmp_func; + + cmd_variable_handler_register(if_var_handlers); } void diff --git a/lib/plist.c b/lib/plist.c index 3714969696..8f59c0c058 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -3156,6 +3156,40 @@ config_write_prefix_ipv4 (struct vty *vty) return config_write_prefix_afi (AFI_IP, vty); } +static void +plist_autocomplete_afi (afi_t afi, vector comps, struct cmd_token *token) +{ + struct prefix_list *plist; + struct prefix_master *master; + + master = prefix_master_get (afi, 0); + if (master == NULL) + return; + + for (plist = master->str.head; plist; plist = plist->next) + vector_set (comps, XSTRDUP (MTYPE_COMPLETION, plist->name)); + for (plist = master->num.head; plist; plist = plist->next) + vector_set (comps, XSTRDUP (MTYPE_COMPLETION, plist->name)); +} + +static void +plist_autocomplete(vector comps, struct cmd_token *token) +{ + plist_autocomplete_afi (AFI_IP, comps, token); + plist_autocomplete_afi (AFI_IP6, comps, token); +} + +static const struct cmd_variable_handler plist_var_handlers[] = { + { + /* "prefix-list WORD" */ + .varname = "prefix_list", + .completions = plist_autocomplete + }, { + .completions = NULL + } +}; + + static void prefix_list_init_ipv4 (void) { @@ -3275,6 +3309,8 @@ prefix_list_init_ipv6 (void) void prefix_list_init () { + cmd_variable_handler_register(plist_var_handlers); + prefix_list_init_ipv4 (); prefix_list_init_ipv6 (); } diff --git a/lib/routemap.c b/lib/routemap.c index cd34ffaae5..482155987d 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -2001,7 +2001,7 @@ DEFUN (match_interface, DEFUN (no_match_interface, no_match_interface_cmd, - "no match interface [INTERFACE]", + "no match interface [WORD]", NO_STR MATCH_STR "Match first hop interface of route\n" @@ -2958,6 +2958,30 @@ route_map_finish (void) route_map_master_hash = NULL; } +static void rmap_autocomplete(vector comps, struct cmd_token *token) +{ + struct route_map *map; + + for (map = route_map_master.head; map; map = map->next) + vector_set (comps, XSTRDUP (MTYPE_COMPLETION, map->name)); +} + +static const struct cmd_variable_handler rmap_var_handlers[] = { + { + /* "route-map WORD" */ + .varname = "route_map", + .completions = rmap_autocomplete + }, { + .tokenname = "ROUTEMAP_NAME", + .completions = rmap_autocomplete + }, { + .tokenname = "RMAP_NAME", + .completions = rmap_autocomplete + }, { + .completions = NULL + } +}; + /* Initialization of route map vector. */ void route_map_init (void) @@ -2973,6 +2997,8 @@ route_map_init (void) route_map_dep_hash[i] = hash_create(route_map_dep_hash_make_key, route_map_dep_hash_cmp); + cmd_variable_handler_register(rmap_var_handlers); + /* Install route map top node. */ install_node (&rmap_node, route_map_config_write); diff --git a/lib/vty.c b/lib/vty.c index a8e54a57de..83dc0106fb 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -955,14 +955,14 @@ vty_complete_command (struct vty *vty) vty_backward_pure_word (vty); vty_insert_word_overwrite (vty, matched[0]); vty_self_insert (vty, ' '); - XFREE (MTYPE_TMP, matched[0]); + XFREE (MTYPE_COMPLETION, matched[0]); break; case CMD_COMPLETE_MATCH: vty_prompt (vty); vty_redraw_line (vty); vty_backward_pure_word (vty); vty_insert_word_overwrite (vty, matched[0]); - XFREE (MTYPE_TMP, matched[0]); + XFREE (MTYPE_COMPLETION, matched[0]); break; case CMD_COMPLETE_LIST_MATCH: for (i = 0; matched[i] != NULL; i++) @@ -970,7 +970,7 @@ vty_complete_command (struct vty *vty) if (i != 0 && ((i % 6) == 0)) vty_out (vty, "%s", VTY_NEWLINE); vty_out (vty, "%-10s ", matched[i]); - XFREE (MTYPE_TMP, matched[i]); + XFREE (MTYPE_COMPLETION, matched[i]); } vty_out (vty, "%s", VTY_NEWLINE); @@ -1109,6 +1109,26 @@ vty_describe_command (struct vty *vty) else vty_describe_fold (vty, width, desc_width, token); + if (IS_VARYING_TOKEN(token->type)) + { + const char *ref = vector_slot(vline, vector_active(vline) - 1); + + vector varcomps = vector_init (VECTOR_MIN_SIZE); + cmd_variable_complete (token, ref, varcomps); + + if (vector_active(varcomps) > 0) + { + vty_out(vty, " "); + for (size_t j = 0; j < vector_active (varcomps); j++) + { + char *item = vector_slot (varcomps, j); + vty_out(vty, " %s", item); + XFREE(MTYPE_COMPLETION, item); + } + vty_out(vty, "%s", VTY_NEWLINE); + } + vector_free(varcomps); + } #if 0 vty_out (vty, " %-*s %s%s", width desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd, From 7f059ea614bf310015bcb4e9b8dd7b1f6c6e072a Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 10 May 2017 16:38:48 +0200 Subject: [PATCH 040/193] vtysh: autocomplete variables This asks the connected daemons for their variable completions through a hidden CLI command. Signed-off-by: David Lamparter --- lib/command.c | 35 +++++++++++++++++++++ vtysh/vtysh.c | 73 +++++++++++++++++++++++++++++++++++++------- vtysh/vtysh.h | 2 +- vtysh/vtysh_config.c | 8 ++--- 4 files changed, 102 insertions(+), 16 deletions(-) diff --git a/lib/command.c b/lib/command.c index 5b4c63fa95..cc597952e4 100644 --- a/lib/command.c +++ b/lib/command.c @@ -727,6 +727,38 @@ cmd_variable_handler_register (const struct cmd_variable_handler *cvh) listnode_add(varhandlers, (void *)cvh); } +DEFUN_HIDDEN (autocomplete, + autocomplete_cmd, + "autocomplete TYPE TEXT VARNAME", + "Autocompletion handler (internal, for vtysh)\n" + "cmd_token->type\n" + "cmd_token->text\n" + "cmd_token->varname\n") +{ + struct cmd_token tok; + vector comps = vector_init(32); + size_t i; + + memset(&tok, 0, sizeof(tok)); + tok.type = atoi(argv[1]->arg); + tok.text = argv[2]->arg; + tok.varname = argv[3]->arg; + if (!strcmp(tok.varname, "-")) + tok.varname = NULL; + + cmd_variable_complete(&tok, NULL, comps); + + for (i = 0; i < vector_active(comps); i++) + { + char *text = vector_slot(comps, i); + vty_out(vty, "%s\n", text); + XFREE(MTYPE_COMPLETION, text); + } + + vector_free(comps); + return CMD_SUCCESS; +} + /** * Generate possible tab-completions for the given input. This function only * returns results that would result in a valid command if used as Readline @@ -2434,6 +2466,8 @@ install_default (enum node_type node) install_element (node, &config_write_cmd); install_element (node, &show_running_config_cmd); + + install_element (node, &autocomplete_cmd); } /* Initialize command interface. Install basic nodes and commands. @@ -2483,6 +2517,7 @@ cmd_init (int terminal) install_element (VIEW_NODE, &show_logging_cmd); install_element (VIEW_NODE, &show_commandtree_cmd); install_element (VIEW_NODE, &echo_cmd); + install_element (VIEW_NODE, &autocomplete_cmd); } if (terminal) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index c28d57cff2..fcae717374 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -107,12 +107,9 @@ begins_with(const char *str, const char *prefix) return strncmp(str, prefix, lenprefix) == 0; } -/* NB: multiplexed function: - * if fp == NULL, this calls vtysh_config_parse_line - * if fp != NULL, this prints lines to fp - */ static int -vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp) +vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp, + void (*callback)(void *, const char *), void *cbarg) { int ret; char stackbuf[4096]; @@ -178,8 +175,8 @@ vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp) fputs (buf, fp); fputc ('\n', fp); } - else - vtysh_config_parse_line (buf); + if (callback) + callback(cbarg, buf); if (eol == end) /* \n\0\0\0 */ @@ -223,14 +220,15 @@ out: static int vtysh_client_run_all (struct vtysh_client *head_client, const char *line, - int continue_on_err, FILE *fp) + int continue_on_err, FILE *fp, + void (*callback)(void *, const char *), void *cbarg) { struct vtysh_client *client; int rc, rc_all = CMD_SUCCESS; for (client = head_client; client; client = client->next) { - rc = vtysh_client_run(client, line, fp); + rc = vtysh_client_run(client, line, fp, callback, cbarg); if (rc != CMD_SUCCESS) { if (!continue_on_err) @@ -245,13 +243,13 @@ static int vtysh_client_execute (struct vtysh_client *head_client, const char *line, FILE *fp) { - return vtysh_client_run_all (head_client, line, 0, fp); + return vtysh_client_run_all (head_client, line, 0, fp, NULL, NULL); } static void vtysh_client_config (struct vtysh_client *head_client, char *line) { - vtysh_client_run_all (head_client, line, 1, NULL); + vtysh_client_run_all (head_client, line, 1, NULL, vtysh_config_parse_line, NULL); } void @@ -796,6 +794,27 @@ vtysh_rl_describe (void) width, token->text, token->desc); + + if (IS_VARYING_TOKEN(token->type)) + { + const char *ref = vector_slot(vline, vector_active(vline) - 1); + + vector varcomps = vector_init (VECTOR_MIN_SIZE); + cmd_variable_complete (token, ref, varcomps); + + if (vector_active (varcomps) > 0) + { + fprintf(stdout, " "); + for (size_t j = 0; j < vector_active (varcomps); j++) + { + char *item = vector_slot (varcomps, j); + fprintf (stdout, " %s", item); + XFREE (MTYPE_COMPLETION, item); + } + vty_out (vty, "%s", VTY_NEWLINE); + } + vector_free (varcomps); + } } cmd_free_strvec (vline); @@ -838,6 +857,7 @@ command_generator (const char *text, int state) } if (matched && matched[index]) + /* this is free()'d by readline, but we leak 1 count of MTYPE_COMPLETION */ return matched[index++]; XFREE (MTYPE_TMP, matched); @@ -3193,6 +3213,36 @@ vtysh_prompt (void) return buf; } +static void vtysh_ac_line(void *arg, const char *line) +{ + vector comps = arg; + size_t i; + for (i = 0; i < vector_active(comps); i++) + if (!strcmp(line, (char *)vector_slot(comps, i))) + return; + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, line)); +} + +static void vtysh_autocomplete(vector comps, struct cmd_token *token) +{ + char accmd[256]; + size_t i; + + snprintf(accmd, sizeof(accmd), "autocomplete %d %s %s", token->type, + token->text, token->varname ? token->varname : "-"); + + for (i = 0; i < array_size(vtysh_client); i++) + vtysh_client_run_all (&vtysh_client[i], accmd, 1, NULL, + vtysh_ac_line, comps); +} + +static const struct cmd_variable_handler vtysh_var_handler = { + /* match all */ + .tokenname = NULL, + .varname = NULL, + .completions = vtysh_autocomplete +}; + void vtysh_init_vty (void) { @@ -3203,6 +3253,7 @@ vtysh_init_vty (void) /* Initialize commands. */ cmd_init (0); + cmd_variable_handler_register(&vtysh_var_handler); /* Install nodes. */ install_node (&bgp_node, NULL); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index ad45abcdf3..57151aceed 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -85,7 +85,7 @@ int vtysh_mark_file(const char *filename); int vtysh_read_config (const char *); int vtysh_write_config_integrated (void); -void vtysh_config_parse_line (const char *); +void vtysh_config_parse_line (void *, const char *); void vtysh_config_dump (FILE *); diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 2a84847aaa..aa003c7528 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -145,7 +145,7 @@ config_add_line_uniq (struct list *config, const char *line) } void -vtysh_config_parse_line (const char *line) +vtysh_config_parse_line (void *arg, const char *line) { char c; static struct config *config = NULL; @@ -418,12 +418,12 @@ vtysh_config_write () if (host.name) { sprintf (line, "hostname %s", host.name); - vtysh_config_parse_line(line); + vtysh_config_parse_line(NULL, line); } if (vtysh_write_integrated == WRITE_INTEGRATED_NO) - vtysh_config_parse_line ("no service integrated-vtysh-config"); + vtysh_config_parse_line (NULL, "no service integrated-vtysh-config"); if (vtysh_write_integrated == WRITE_INTEGRATED_YES) - vtysh_config_parse_line ("service integrated-vtysh-config"); + vtysh_config_parse_line (NULL, "service integrated-vtysh-config"); user_config_write (); } From b8a815e5e464257e0eeca49128475c3a5eb1253f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 10 May 2017 16:55:42 +0200 Subject: [PATCH 041/193] bgpd: autocomplete neighbor names Add autocompletion for neighbor IP/IPv6/peer-group names. Signed-off-by: David Lamparter --- bgpd/bgp_vty.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f2fa8a0643..0a8bef061b 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10912,9 +10912,51 @@ static struct cmd_node bgp_evpn_node = static void community_list_vty (void); +static void +bgp_ac_neighbor (vector comps, struct cmd_token *token) +{ + struct bgp *bgp; + struct peer *peer; + struct listnode *lnbgp, *lnpeer; + + bool ipv4 = !strcmp(token->text, "A.B.C.D"); + bool ipv6 = !strcmp(token->text, "X:X::X:X"); + bool name = !(ipv4 || ipv6); + + for (ALL_LIST_ELEMENTS_RO (bm->bgp, lnbgp, bgp)) + for (ALL_LIST_ELEMENTS_RO (bgp->peer, lnpeer, peer)) + if (peer->group) + { + if (!name) + continue; + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, peer->host)); + } + else + { + bool is_v6 = !!strchr(peer->host, ':'); + if (is_v6 != ipv6 || name) + continue; + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, peer->host)); + } +} + +static const struct cmd_variable_handler bgp_var_neighbor[] = { + { + .varname = "neighbor", + .completions = bgp_ac_neighbor + }, { + .varname = "neighbors", + .completions = bgp_ac_neighbor + }, { + .completions = NULL + } +}; + void bgp_vty_init (void) { + cmd_variable_handler_register(bgp_var_neighbor); + /* Install bgp top node. */ install_node (&bgp_node, bgp_config_write); install_node (&bgp_ipv4_unicast_node, NULL); From 4e3e06d6384c1e0a7106d740945344d095f02b9c Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 11 May 2017 11:20:20 +0200 Subject: [PATCH 042/193] doc: update CLI documentation Fix markdown formatting & add variable names. Signed-off-by: David Lamparter --- doc/cli.md | 111 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 93 insertions(+), 18 deletions(-) diff --git a/doc/cli.md b/doc/cli.md index 559f75a740..c90437ef8d 100644 --- a/doc/cli.md +++ b/doc/cli.md @@ -7,10 +7,12 @@ Definition Grammar This is a reference for the syntax used when defining new CLI commands. An example definition is: +``` DEFUN (command_name, command_name_cmd, --> "example DEFINITION...", <..doc strings..>) +``` The arrowed part is the definition string. @@ -27,34 +29,36 @@ Characters allowed in each token type: Tokens ------ -* WORD -- A token that begins with +, -, or a lowercase letter. It is - an unchanging part of the command and will only match itself. - Example: "show ip bgp", every token is a WORD. -* IPV4 -- 'A.B.C.D', matches an IPv4 address. -* IPV6 -- 'X:X::X:X', matches an IPv6 address. -* IPV4_PREFIX -- 'A.B.C.D/M', matches an IPv4 prefix in CIDR notation. -* IPV6_PREFIX -- 'X:X::X:X/M', matches an IPv6 prefix in CIDR notation. -* VARIABLE -- Begins with a capital letter. Matches any input. -* RANGE -- Numeric range delimited by parentheses, e.g. (-100 - 100) or - (10-20). Will only match numbers in the range. +* `WORD` -- A token that begins with +, -, or a lowercase letter. It is + an unchanging part of the command and will only match itself. + Example: "show ip bgp", every token is a WORD. +* `IPV4` -- 'A.B.C.D', matches an IPv4 address. +* `IPV6` -- 'X:X::X:X', matches an IPv6 address. +* `IPV4_PREFIX` -- 'A.B.C.D/M', matches an IPv4 prefix in CIDR notation. +* `IPV6_PREFIX` -- 'X:X::X:X/M', matches an IPv6 prefix in CIDR notation. +* `VARIABLE` -- Begins with a capital letter. Matches any input. +* `RANGE` -- Numeric range delimited by parentheses, e.g. (-100 - 100) or + (10-20). Will only match numbers in the range. Rules ----- -* -- Contain sequences of tokens separated by pipes and +* `` -- Contain sequences of tokens separated by pipes and provide mutual exclusion. Sequences may contain - but not as the first token. - Disallowed: "example < c|d>" - Allowed: "example -* [square brackets] -- Contains sequences of tokens that are optional (can be - omitted). -* {curly|braces} -- similar to angle brackets, but instead of mutual + `` but not as the first token. + Disallowed: `"example < c|d>"` + Allowed: `"example "` +* `[square brackets]` -- Contains sequences of tokens that are optional (can be + omitted). `[]` can be shortened to `[a|b]`. +* `{curly|braces}` -- similar to angle brackets, but instead of mutual exclusion, curly braces indicate that one or more of the pipe-separated sequences may be provided in any order. -* VARIADICS... -- Any token which accepts input (so anything except WORD) +* `VARIADICS...` -- Any token which accepts input (so anything except WORD) and that occurs as the last token of a line may be followed by an ellipsis, which indicates that input matching the token may be repeated an unlimited number of times. +* `$name` -- Specify a variable name for the preceding token. See + "Variable Names" below. Some general notes: @@ -69,6 +73,40 @@ Some general notes: configuration items should be defined in separate commands. Clarity is preferred over LOC (within reason). +Variable Names +-------------- +The parser tries to fill the "varname" field on each token. This can happen +either manually or automatically. Manual specifications work by appending +`"$name"` after the input specifier: + +``` +foo bar$cmd WORD$name A.B.C.D$ip +``` + +Note that you can also assign variable names to fixed input tokens, this can +be useful if multiple commands share code. You can also use "$name" after a +multiple-choice option: + +``` +foo bar $addr [optionA|optionB]$mode +``` + +The variable name is in this case assigned to the last token in each of the +branches. + +Automatic assignment of variable names works by applying the following rules: + +- manual names always have priority +- a "[no]" at the beginning receives "no" as varname on the "no" token +- WORD tokens whose text is not "WORD" or "NAME" receive a cleaned lowercase + version of the token text as varname, e.g. "ROUTE-MAP" becomes "route_map". +- other variable tokens (i.e. everything except "fixed") receive the text of + the preceding fixed token as varname, if one can be found. E.g.: + "ip route A.B.C.D/M INTERFACE" assigns "route" to the "A.B.C.D/M" token. + +These rules should make it possible to avoid manual varname assignment in 90% +of the cases. + Doc Strings ----------- Each token in a command definition should be documented with a brief doc @@ -77,11 +115,13 @@ command tree. These strings are provided as the last parameter to DEFUN macros, concatenated together and separated by an escaped newline ('\n'). These are best explained by example. +``` DEFUN (config_terminal, config_terminal_cmd, "configure terminal", "Configuration from vty interface\n" "Configuration terminal\n") +``` The last parameter is split into two lines for readability. Two newline delimited doc strings are present, one for each token in the command. The @@ -110,11 +150,13 @@ constructs. In the examples below, each arrowed token needs a doc string. +``` "show ip bgp" ^ ^ ^ "command [example]" ^ ^ ^ ^ +``` Data Structures --------------- @@ -216,22 +258,32 @@ it is generally _incorrect_ to assume consistent indices in this array. As a simple example: Command definition: +``` command [foo] +``` User enters: +``` command foo bar +``` Array: +``` [0] -> command [1] -> foo [2] -> bar +``` User enters: +``` command baz +``` Array: +``` [0] -> command [1] -> baz +``` @@ -242,24 +294,32 @@ tokens when the CLI matcher does not need them to make an unambiguous match. This is best explained by example. Command definitions: +``` command dog cow command dog crow +``` User input: +``` c d c -> ambiguous command c d co -> match "command dog cow" +``` In the new implementation, this functionality has improved. Where previously the parser would stop at the first ambiguous token, it will now look ahead and attempt to disambiguate based on tokens later on in the input string. Command definitions: +``` show ip bgp A.B.C.D show ipv6 bgp X:X::X:X +``` User enters: +``` s i b 4.3.2.1 -> match "show ip bgp A.B.C.D" s i b ::e0 -> match "show ipv6 bgp X:X::X:X" +``` Previously both of these commands would be ambiguous since 'i' does not explicitly select either 'ip' or 'ipv6'. However, since the user later provides @@ -268,17 +328,23 @@ parser is able to look ahead and select the appropriate command. This has some implications for parsing the argv*[] that is passed to the command handler. Now consider a command definition such as: +``` command +``` 'foo' only matches the string 'foo', but 'VAR' matches any input, including 'foo'. Who wins? In situations like this the matcher will always choose the 'better' match, so 'foo' will win. Consider also: +``` show foo +``` User input: +``` show ip foo +``` 'ip' partially matches 'ipv6' but exactly matches 'ip', so 'ip' will win. @@ -286,6 +352,7 @@ User input: struct cmd_token ---------------- +``` /* Command token struct. */ struct cmd_token { @@ -297,7 +364,9 @@ struct cmd_token char *desc; // token description long long min, max; // for ranges char *arg; // user input that matches this token + char *varname; // variable name }; +``` This struct is used in the CLI graph to match input against. It is also used to pass user input to command handler functions, as it is frequently useful for @@ -316,7 +385,9 @@ has the full text of the corresponding token in the definition string and using it makes for much more readable code. An example is helpful. Command definition: +``` command <(1-10)|foo|BAR> +``` In this example, the user may enter any one of: * an integer between 1 and 10 @@ -325,9 +396,11 @@ In this example, the user may enter any one of: If the user enters "command f", then: +``` argv[1]->type == WORD_TKN argv[1]->arg == "f" argv[1]->text == "foo" +``` Range tokens have some special treatment; a token with ->type == RANGE_TKN will have the ->min and ->max fields set to the bounding values of the range. @@ -342,6 +415,7 @@ all matching input permutations. It also dumps a text representation of the graph, which is more useful for debugging than anything else. It looks like this: +``` $ ./permutations "show [ip] bgp [ WORD]" show ip bgp view WORD @@ -350,6 +424,7 @@ show ip bgp show bgp view WORD show bgp vrf WORD show bgp +``` This functionality is also built into VTY/VTYSH; the 'list permutations' command will list all possible matching input permutations in the current CLI From 9a7fc1bd7a4961793bfb4340a4c4819e217fcb70 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 11 May 2017 11:26:40 +0200 Subject: [PATCH 043/193] lib: cli: fix IPv6 address partial matching A partially-entered IPv6 address would never return a "partly_match", meaning some possible completions weren't listed by the matcher. This specifically breaks autocompleting BGP IPv6 neighbor addresses. Before: aegaeon# show ip bg ne 2001: WORD Neighbor on BGP configured interface After: aegaeon# show ip bg ne 2001: WORD Neighbor on BGP configured interface X:X::X:X Neighbor to display information about 2001:db8::2 Signed-off-by: David Lamparter --- lib/command_match.c | 39 +++++++++++--------------------- tests/lib/cli/test_cli.refout.in | 8 ++++--- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/lib/command_match.c b/lib/command_match.c index df1a8bb72b..d1f9ef1cb1 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -78,10 +78,7 @@ static enum match_type match_ipv4_prefix (const char *); static enum match_type -match_ipv6 (const char *); - -static enum match_type -match_ipv6_prefix (const char *); +match_ipv6_prefix (const char *, bool); static enum match_type match_range (struct cmd_token *, const char *); @@ -677,9 +674,9 @@ match_token (struct cmd_token *token, char *input_token) case IPV4_PREFIX_TKN: return match_ipv4_prefix (input_token); case IPV6_TKN: - return match_ipv6 (input_token); + return match_ipv6_prefix (input_token, false); case IPV6_PREFIX_TKN: - return match_ipv6_prefix (input_token); + return match_ipv6_prefix (input_token, true); case RANGE_TKN: return match_range (token, input_token); case VARIABLE_TKN: @@ -835,35 +832,18 @@ match_ipv4_prefix (const char *str) #define STATE_MASK 7 static enum match_type -match_ipv6 (const char *str) -{ - struct sockaddr_in6 sin6_dummy; - int ret; - - if (strspn (str, IPV6_ADDR_STR) != strlen (str)) - return no_match; - - ret = inet_pton(AF_INET6, str, &sin6_dummy.sin6_addr); - - if (ret == 1) - return exact_match; - - return no_match; -} - -static enum match_type -match_ipv6_prefix (const char *str) +match_ipv6_prefix (const char *str, bool prefix) { int state = STATE_START; int colons = 0, nums = 0, double_colon = 0; int mask; - const char *sp = NULL; + const char *sp = NULL, *start = str; char *endptr = NULL; if (str == NULL) return partly_match; - if (strspn (str, IPV6_PREFIX_STR) != strlen (str)) + if (strspn (str, prefix ? IPV6_PREFIX_STR : IPV6_ADDR_STR) != strlen (str)) return no_match; while (*str != '\0' && state != STATE_MASK) @@ -966,6 +946,13 @@ match_ipv6_prefix (const char *str) str++; } + if (!prefix) + { + struct sockaddr_in6 sin6_dummy; + int ret = inet_pton(AF_INET6, start, &sin6_dummy.sin6_addr); + return ret == 1 ? exact_match : partly_match; + } + if (state < STATE_MASK) return partly_match; diff --git a/tests/lib/cli/test_cli.refout.in b/tests/lib/cli/test_cli.refout.in index 18822c150d..db9da429ab 100644 --- a/tests/lib/cli/test_cli.refout.in +++ b/tests/lib/cli/test_cli.refout.in @@ -61,7 +61,7 @@ cmd2 with 3 args. [01]: ipv6 [02]: de4d:b33f::cafe test# arg ipv6 de4d:b3 -% There is no matched command. + X:X::X:X 02 test# arg ipv6 de4d:b33f::caf X:X::X:X 02 test# arg ipv6 de4d:b33f::cafe @@ -264,7 +264,8 @@ cmd10 with 3 args. test# test# alt a test# alt a a - WORD 02 + WORD 02 + X:X::X:X 02 test# alt a ab cmd11 with 3 args. [00]: alt @@ -281,7 +282,8 @@ cmd12 with 3 args. [02]: 1.2.3.4 test# alt a 1 test# alt a 1:2 - WORD 02 + WORD 02 + X:X::X:X 02 test# alt a 1:2 test# alt a 1:2:: WORD 02 From d48ed3e09864f28bc57e64161e62872d9eab7d25 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 12 May 2017 12:22:56 +0200 Subject: [PATCH 044/193] bgpd: autocomplete peer-groups & interface peers This wasn't quite correct in the previous patch, leading to peer-groups & interface peers breaking in autocompletion. Signed-off-by: David Lamparter --- bgpd/bgp_vty.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 0a8bef061b..e5734bd76b 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10917,27 +10917,38 @@ bgp_ac_neighbor (vector comps, struct cmd_token *token) { struct bgp *bgp; struct peer *peer; + struct peer_group *group; struct listnode *lnbgp, *lnpeer; - bool ipv4 = !strcmp(token->text, "A.B.C.D"); - bool ipv6 = !strcmp(token->text, "X:X::X:X"); - bool name = !(ipv4 || ipv6); - for (ALL_LIST_ELEMENTS_RO (bm->bgp, lnbgp, bgp)) - for (ALL_LIST_ELEMENTS_RO (bgp->peer, lnpeer, peer)) - if (peer->group) + { + for (ALL_LIST_ELEMENTS_RO (bgp->peer, lnpeer, peer)) { - if (!name) + /* only provide suggestions on the appropriate input token type, + * they'll otherwise show up multiple times */ + enum cmd_token_type match_type; + char *name = peer->host; + + if (peer->conf_if) + { + match_type = VARIABLE_TKN; + name = peer->conf_if; + } + else if (strchr(peer->host, ':')) + match_type = IPV6_TKN; + else + match_type = IPV4_TKN; + + if (token->type != match_type) continue; - vector_set(comps, XSTRDUP(MTYPE_COMPLETION, peer->host)); - } - else - { - bool is_v6 = !!strchr(peer->host, ':'); - if (is_v6 != ipv6 || name) - continue; - vector_set(comps, XSTRDUP(MTYPE_COMPLETION, peer->host)); + + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, name)); } + + if (token->type == VARIABLE_TKN) + for (ALL_LIST_ELEMENTS_RO (bgp->group, lnpeer, group)) + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, group->name)); + } } static const struct cmd_variable_handler bgp_var_neighbor[] = { From 32a71fd80c9af5cf21f9eb0691df015e98468d2e Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 12 May 2017 12:25:26 +0200 Subject: [PATCH 045/193] doc: fix VARIABLE <> WORD confusion in cli.md Signed-off-by: David Lamparter --- doc/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/cli.md b/doc/cli.md index c90437ef8d..ffd34dd302 100644 --- a/doc/cli.md +++ b/doc/cli.md @@ -98,7 +98,7 @@ Automatic assignment of variable names works by applying the following rules: - manual names always have priority - a "[no]" at the beginning receives "no" as varname on the "no" token -- WORD tokens whose text is not "WORD" or "NAME" receive a cleaned lowercase +- VARIABLE tokens whose text is not "WORD" or "NAME" receive a cleaned lowercase version of the token text as varname, e.g. "ROUTE-MAP" becomes "route_map". - other variable tokens (i.e. everything except "fixed") receive the text of the preceding fixed token as varname, if one can be found. E.g.: From 896014f4bc4893de845b35b292a36bccffaf2bda Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 13 May 2017 10:25:29 +0200 Subject: [PATCH 046/193] *: make consistent & update GPLv2 file headers The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter --- COMMUNITY.md | 33 +++++++++-------- COPYING | 32 ++++++++--------- bgpd/bgp_advertise.c | 36 +++++++++---------- bgpd/bgp_advertise.h | 36 +++++++++---------- bgpd/bgp_aspath.c | 38 ++++++++++---------- bgpd/bgp_aspath.h | 36 +++++++++---------- bgpd/bgp_attr.c | 36 +++++++++---------- bgpd/bgp_attr.h | 36 +++++++++---------- bgpd/bgp_attr_evpn.c | 36 +++++++++---------- bgpd/bgp_attr_evpn.h | 36 +++++++++---------- bgpd/bgp_bfd.c | 7 ++-- bgpd/bgp_bfd.h | 7 ++-- bgpd/bgp_btoa.c | 36 +++++++++---------- bgpd/bgp_clist.c | 36 +++++++++---------- bgpd/bgp_clist.h | 36 +++++++++---------- bgpd/bgp_community.c | 36 +++++++++---------- bgpd/bgp_community.h | 36 +++++++++---------- bgpd/bgp_damp.c | 36 +++++++++---------- bgpd/bgp_damp.h | 36 +++++++++---------- bgpd/bgp_debug.c | 36 +++++++++---------- bgpd/bgp_debug.h | 36 +++++++++---------- bgpd/bgp_dump.c | 36 +++++++++---------- bgpd/bgp_dump.h | 36 +++++++++---------- bgpd/bgp_ecommunity.c | 36 +++++++++---------- bgpd/bgp_ecommunity.h | 36 +++++++++---------- bgpd/bgp_encap.c | 36 ++++++++----------- bgpd/bgp_encap.h | 7 ++-- bgpd/bgp_encap_tlv.c | 7 ++-- bgpd/bgp_encap_tlv.h | 7 ++-- bgpd/bgp_encap_types.h | 7 ++-- bgpd/bgp_evpn.c | 36 +++++++++---------- bgpd/bgp_evpn.h | 36 +++++++++---------- bgpd/bgp_evpn_vty.c | 36 +++++++++---------- bgpd/bgp_evpn_vty.h | 36 +++++++++---------- bgpd/bgp_filter.c | 36 +++++++++---------- bgpd/bgp_filter.h | 36 +++++++++---------- bgpd/bgp_fsm.c | 38 ++++++++++---------- bgpd/bgp_fsm.h | 38 ++++++++++---------- bgpd/bgp_label.c | 7 ++-- bgpd/bgp_label.h | 7 ++-- bgpd/bgp_lcommunity.c | 4 +-- bgpd/bgp_lcommunity.h | 4 +-- bgpd/bgp_main.c | 36 +++++++++---------- bgpd/bgp_memory.c | 7 ++-- bgpd/bgp_memory.h | 7 ++-- bgpd/bgp_mpath.c | 7 ++-- bgpd/bgp_mpath.h | 7 ++-- bgpd/bgp_mplsvpn.c | 36 +++++++++---------- bgpd/bgp_mplsvpn.h | 36 +++++++++---------- bgpd/bgp_network.c | 36 +++++++++---------- bgpd/bgp_network.h | 36 +++++++++---------- bgpd/bgp_nexthop.c | 36 +++++++++---------- bgpd/bgp_nexthop.h | 36 +++++++++---------- bgpd/bgp_nht.c | 7 ++-- bgpd/bgp_nht.h | 7 ++-- bgpd/bgp_open.c | 36 +++++++++---------- bgpd/bgp_open.h | 36 +++++++++---------- bgpd/bgp_packet.c | 36 +++++++++---------- bgpd/bgp_packet.h | 36 +++++++++---------- bgpd/bgp_regex.c | 36 +++++++++---------- bgpd/bgp_regex.h | 36 +++++++++---------- bgpd/bgp_route.c | 38 ++++++++++---------- bgpd/bgp_route.h | 36 +++++++++---------- bgpd/bgp_routemap.c | 36 +++++++++---------- bgpd/bgp_snmp.c | 36 +++++++++---------- bgpd/bgp_table.c | 36 +++++++++---------- bgpd/bgp_table.h | 36 +++++++++---------- bgpd/bgp_updgrp.c | 7 ++-- bgpd/bgp_updgrp.h | 7 ++-- bgpd/bgp_updgrp_adv.c | 7 ++-- bgpd/bgp_updgrp_packet.c | 7 ++-- bgpd/bgp_vnc_types.h | 7 ++-- bgpd/bgp_vpn.c | 36 +++++++++---------- bgpd/bgp_vpn.h | 36 +++++++++---------- bgpd/bgp_vty.c | 36 +++++++++---------- bgpd/bgp_vty.h | 36 +++++++++---------- bgpd/bgp_zebra.c | 36 +++++++++---------- bgpd/bgp_zebra.h | 36 +++++++++---------- bgpd/bgpd.c | 36 +++++++++---------- bgpd/bgpd.h | 36 +++++++++---------- bgpd/rfapi/bgp_rfapi_cfg.c | 7 ++-- bgpd/rfapi/bgp_rfapi_cfg.h | 7 ++-- bgpd/rfapi/rfapi.c | 7 ++-- bgpd/rfapi/rfapi.h | 7 ++-- bgpd/rfapi/rfapi_ap.c | 7 ++-- bgpd/rfapi/rfapi_ap.h | 7 ++-- bgpd/rfapi/rfapi_backend.h | 7 ++-- bgpd/rfapi/rfapi_descriptor_rfp_utils.c | 7 ++-- bgpd/rfapi/rfapi_descriptor_rfp_utils.h | 7 ++-- bgpd/rfapi/rfapi_encap_tlv.c | 7 ++-- bgpd/rfapi/rfapi_encap_tlv.h | 7 ++-- bgpd/rfapi/rfapi_import.c | 7 ++-- bgpd/rfapi/rfapi_import.h | 7 ++-- bgpd/rfapi/rfapi_monitor.c | 7 ++-- bgpd/rfapi/rfapi_monitor.h | 7 ++-- bgpd/rfapi/rfapi_nve_addr.c | 7 ++-- bgpd/rfapi/rfapi_nve_addr.h | 7 ++-- bgpd/rfapi/rfapi_private.h | 7 ++-- bgpd/rfapi/rfapi_rib.c | 7 ++-- bgpd/rfapi/rfapi_rib.h | 7 ++-- bgpd/rfapi/rfapi_vty.c | 7 ++-- bgpd/rfapi/rfapi_vty.h | 7 ++-- bgpd/rfapi/vnc_debug.c | 7 ++-- bgpd/rfapi/vnc_debug.h | 7 ++-- bgpd/rfapi/vnc_export_bgp.c | 7 ++-- bgpd/rfapi/vnc_export_bgp.h | 7 ++-- bgpd/rfapi/vnc_export_bgp_p.h | 7 ++-- bgpd/rfapi/vnc_export_table.c | 7 ++-- bgpd/rfapi/vnc_export_table.h | 7 ++-- bgpd/rfapi/vnc_import_bgp.c | 7 ++-- bgpd/rfapi/vnc_import_bgp.h | 7 ++-- bgpd/rfapi/vnc_import_bgp_p.h | 7 ++-- bgpd/rfapi/vnc_zebra.c | 7 ++-- bgpd/rfapi/vnc_zebra.h | 7 ++-- bgpd/rfp-example/librfp/rfp.h | 7 ++-- bgpd/rfp-example/librfp/rfp_example.c | 7 ++-- bgpd/rfp-example/librfp/rfp_internal.h | 7 ++-- bgpd/rfp-example/rfptest/rfptest.c | 7 ++-- bgpd/rfp-example/rfptest/rfptest.h | 7 ++-- defaults.h | 4 +-- eigrpd/eigrp_const.h | 7 ++-- eigrpd/eigrp_dump.c | 7 ++-- eigrpd/eigrp_dump.h | 7 ++-- eigrpd/eigrp_filter.c | 7 ++-- eigrpd/eigrp_filter.h | 7 ++-- eigrpd/eigrp_fsm.c | 9 ++--- eigrpd/eigrp_fsm.h | 7 ++-- eigrpd/eigrp_hello.c | 7 ++-- eigrpd/eigrp_interface.c | 7 ++-- eigrpd/eigrp_interface.h | 7 ++-- eigrpd/eigrp_macros.h | 7 ++-- eigrpd/eigrp_main.c | 7 ++-- eigrpd/eigrp_memory.c | 7 ++-- eigrpd/eigrp_memory.h | 7 ++-- eigrpd/eigrp_neighbor.c | 7 ++-- eigrpd/eigrp_neighbor.h | 7 ++-- eigrpd/eigrp_network.c | 7 ++-- eigrpd/eigrp_network.h | 7 ++-- eigrpd/eigrp_packet.c | 7 ++-- eigrpd/eigrp_packet.h | 7 ++-- eigrpd/eigrp_query.c | 7 ++-- eigrpd/eigrp_reply.c | 7 ++-- eigrpd/eigrp_routemap.c | 7 ++-- eigrpd/eigrp_siaquery.c | 7 ++-- eigrpd/eigrp_siareply.c | 7 ++-- eigrpd/eigrp_snmp.c | 7 ++-- eigrpd/eigrp_snmp.h | 7 ++-- eigrpd/eigrp_structs.h | 7 ++-- eigrpd/eigrp_topology.c | 7 ++-- eigrpd/eigrp_topology.h | 7 ++-- eigrpd/eigrp_update.c | 7 ++-- eigrpd/eigrp_vty.c | 7 ++-- eigrpd/eigrp_vty.h | 7 ++-- eigrpd/eigrp_zebra.c | 7 ++-- eigrpd/eigrp_zebra.h | 7 ++-- eigrpd/eigrpd.c | 7 ++-- eigrpd/eigrpd.h | 7 ++-- fpm/fpm_pb.c | 7 ++-- fpm/fpm_pb.h | 7 ++-- isisd/isis_adjacency.c | 8 ++--- isisd/isis_adjacency.h | 8 ++--- isisd/isis_bpf.c | 8 ++--- isisd/isis_circuit.c | 8 ++--- isisd/isis_circuit.h | 8 ++--- isisd/isis_common.h | 8 ++--- isisd/isis_constants.h | 8 ++--- isisd/isis_csm.c | 6 ++-- isisd/isis_csm.h | 8 ++--- isisd/isis_dlpi.c | 8 ++--- isisd/isis_dr.c | 8 ++--- isisd/isis_dr.h | 8 ++--- isisd/isis_dynhn.c | 6 ++-- isisd/isis_dynhn.h | 6 ++-- isisd/isis_events.c | 8 ++--- isisd/isis_events.h | 8 ++--- isisd/isis_flags.c | 6 ++-- isisd/isis_flags.h | 8 ++--- isisd/isis_lsp.c | 8 ++--- isisd/isis_lsp.h | 8 ++--- isisd/isis_main.c | 8 ++--- isisd/isis_memory.c | 7 ++-- isisd/isis_memory.h | 7 ++-- isisd/isis_misc.c | 8 ++--- isisd/isis_misc.h | 8 ++--- isisd/isis_mt.c | 7 ++-- isisd/isis_mt.h | 7 ++-- isisd/isis_network.h | 8 ++--- isisd/isis_pdu.c | 8 ++--- isisd/isis_pdu.h | 8 ++--- isisd/isis_pfpacket.c | 8 ++--- isisd/isis_redist.c | 8 ++--- isisd/isis_redist.h | 8 ++--- isisd/isis_route.c | 8 ++--- isisd/isis_route.h | 8 ++--- isisd/isis_routemap.c | 8 ++--- isisd/isis_routemap.h | 8 ++--- isisd/isis_spf.c | 8 ++--- isisd/isis_spf.h | 8 ++--- isisd/isis_te.c | 7 ++-- isisd/isis_te.h | 7 ++-- isisd/isis_tlv.c | 8 ++--- isisd/isis_tlv.h | 6 ++-- isisd/isis_vty.c | 8 ++--- isisd/isis_zebra.c | 8 ++--- isisd/isis_zebra.h | 8 ++--- isisd/isisd.c | 8 ++--- isisd/isisd.h | 8 ++--- isisd/iso_checksum.c | 8 ++--- isisd/iso_checksum.h | 6 ++-- ldpd/ldp_debug.c | 7 ++-- ldpd/ldp_debug.h | 7 ++-- ldpd/ldp_vty.h | 7 ++-- ldpd/ldp_vty_conf.c | 7 ++-- ldpd/ldp_vty_exec.c | 7 ++-- ldpd/ldp_zebra.c | 7 ++-- lib/agentx.c | 7 ++-- lib/bfd.c | 7 ++-- lib/bfd.h | 7 ++-- lib/bitfield.h | 7 ++-- lib/buffer.c | 9 +++-- lib/buffer.h | 7 ++-- lib/command.c | 7 ++-- lib/command.h | 7 ++-- lib/command_graph.c | 6 ++-- lib/command_graph.h | 6 ++-- lib/command_match.c | 7 ++-- lib/command_match.h | 7 ++-- lib/csv.c | 7 ++-- lib/csv.h | 7 ++-- lib/distribute.c | 7 ++-- lib/distribute.h | 7 ++-- lib/event_counter.c | 7 ++-- lib/event_counter.h | 7 ++-- lib/fifo.h | 36 +++++++++---------- lib/filter.c | 7 ++-- lib/filter.h | 7 ++-- lib/frr_pthread.c | 33 +++++++++-------- lib/frr_pthread.h | 33 +++++++++-------- lib/getopt.c | 48 ++++++++++++------------- lib/getopt.h | 38 ++++++++++---------- lib/getopt1.c | 40 ++++++++++----------- lib/grammar_sandbox.c | 7 ++-- lib/grammar_sandbox_main.c | 4 +-- lib/graph.c | 7 ++-- lib/graph.h | 7 ++-- lib/hash.c | 7 ++-- lib/hash.h | 36 +++++++++---------- lib/if.c | 10 +++--- lib/if.h | 36 +++++++++---------- lib/if_rmap.c | 7 ++-- lib/if_rmap.h | 7 ++-- lib/json.c | 7 ++-- lib/json.h | 7 ++-- lib/keychain.c | 36 +++++++++---------- lib/keychain.h | 7 ++-- lib/libfrr.c | 6 ++-- lib/libfrr.h | 6 ++-- lib/libospf.h | 7 ++-- lib/linklist.c | 7 ++-- lib/linklist.h | 7 ++-- lib/log.c | 7 ++-- lib/log.h | 7 ++-- lib/log_int.h | 7 ++-- lib/memory_vty.c | 6 ++-- lib/memory_vty.h | 36 +++++++++---------- lib/mpls.h | 7 ++-- lib/network.c | 7 ++-- lib/network.h | 7 ++-- lib/nexthop.c | 7 ++-- lib/nexthop.h | 7 ++-- lib/ns.c | 7 ++-- lib/ns.h | 7 ++-- lib/pid_output.c | 7 ++-- lib/plist.c | 7 ++-- lib/plist.h | 7 ++-- lib/plist_int.h | 7 ++-- lib/pqueue.c | 36 +++++++++---------- lib/pqueue.h | 36 +++++++++---------- lib/prefix.c | 7 ++-- lib/prefix.h | 7 ++-- lib/privs.c | 7 ++-- lib/privs.h | 7 ++-- lib/ptm_lib.c | 7 ++-- lib/ptm_lib.h | 7 ++-- lib/qobj.c | 7 ++-- lib/routemap.c | 36 +++++++++---------- lib/routemap.h | 7 ++-- lib/sigevent.c | 7 ++-- lib/sigevent.h | 7 ++-- lib/smux.c | 7 ++-- lib/smux.h | 7 ++-- lib/snmp.c | 7 ++-- lib/sockopt.c | 7 ++-- lib/sockopt.h | 7 ++-- lib/sockunion.c | 7 ++-- lib/sockunion.h | 7 ++-- lib/spf_backoff.c | 7 ++-- lib/spf_backoff.h | 7 ++-- lib/srcdest_table.c | 7 ++-- lib/srcdest_table.h | 7 ++-- lib/stream.c | 9 +++-- lib/stream.h | 7 ++-- lib/strlcat.c | 33 ++++++++--------- lib/strlcpy.c | 33 ++++++++--------- lib/systemd.c | 38 ++++++++++---------- lib/systemd.h | 38 ++++++++++---------- lib/table.c | 7 ++-- lib/table.h | 7 ++-- lib/thread.c | 7 ++-- lib/thread.h | 7 ++-- lib/vector.c | 7 ++-- lib/vector.h | 7 ++-- lib/vrf.c | 7 ++-- lib/vrf.h | 7 ++-- lib/vty.c | 7 ++-- lib/vty.h | 36 +++++++++---------- lib/wheel.c | 7 ++-- lib/wheel.h | 7 ++-- lib/workqueue.c | 7 ++-- lib/workqueue.h | 7 ++-- lib/zassert.h | 7 ++-- lib/zclient.c | 7 ++-- lib/zclient.h | 11 +++--- lib/zebra.h | 36 +++++++++---------- ospf6d/ospf6_abr.c | 7 ++-- ospf6d/ospf6_abr.h | 7 ++-- ospf6d/ospf6_area.c | 7 ++-- ospf6d/ospf6_area.h | 7 ++-- ospf6d/ospf6_asbr.c | 7 ++-- ospf6d/ospf6_asbr.h | 7 ++-- ospf6d/ospf6_bfd.c | 7 ++-- ospf6d/ospf6_bfd.h | 7 ++-- ospf6d/ospf6_flood.c | 7 ++-- ospf6d/ospf6_flood.h | 7 ++-- ospf6d/ospf6_interface.c | 7 ++-- ospf6d/ospf6_interface.h | 7 ++-- ospf6d/ospf6_intra.c | 7 ++-- ospf6d/ospf6_intra.h | 7 ++-- ospf6d/ospf6_lsa.c | 7 ++-- ospf6d/ospf6_lsa.h | 7 ++-- ospf6d/ospf6_lsdb.c | 7 ++-- ospf6d/ospf6_lsdb.h | 7 ++-- ospf6d/ospf6_main.c | 7 ++-- ospf6d/ospf6_memory.c | 7 ++-- ospf6d/ospf6_memory.h | 7 ++-- ospf6d/ospf6_message.c | 7 ++-- ospf6d/ospf6_message.h | 7 ++-- ospf6d/ospf6_neighbor.c | 7 ++-- ospf6d/ospf6_neighbor.h | 7 ++-- ospf6d/ospf6_network.c | 7 ++-- ospf6d/ospf6_network.h | 7 ++-- ospf6d/ospf6_proto.c | 7 ++-- ospf6d/ospf6_proto.h | 7 ++-- ospf6d/ospf6_route.c | 7 ++-- ospf6d/ospf6_route.h | 7 ++-- ospf6d/ospf6_snmp.c | 7 ++-- ospf6d/ospf6_spf.c | 7 ++-- ospf6d/ospf6_spf.h | 7 ++-- ospf6d/ospf6_top.c | 7 ++-- ospf6d/ospf6_top.h | 7 ++-- ospf6d/ospf6_zebra.c | 7 ++-- ospf6d/ospf6_zebra.h | 7 ++-- ospf6d/ospf6d.c | 7 ++-- ospf6d/ospf6d.h | 7 ++-- ospfclient/ospf_apiclient.c | 9 +++-- ospfclient/ospf_apiclient.h | 9 +++-- ospfclient/ospfclient.c | 7 ++-- ospfd/ospf_abr.c | 11 +++--- ospfd/ospf_abr.h | 11 +++--- ospfd/ospf_api.c | 9 +++-- ospfd/ospf_api.h | 9 +++-- ospfd/ospf_apiserver.c | 9 +++-- ospfd/ospf_apiserver.h | 9 +++-- ospfd/ospf_asbr.c | 7 ++-- ospfd/ospf_asbr.h | 7 ++-- ospfd/ospf_ase.c | 7 ++-- ospfd/ospf_ase.h | 7 ++-- ospfd/ospf_bfd.c | 7 ++-- ospfd/ospf_bfd.h | 7 ++-- ospfd/ospf_dump.c | 7 ++-- ospfd/ospf_dump.h | 7 ++-- ospfd/ospf_dump_api.c | 4 +-- ospfd/ospf_dump_api.h | 4 +-- ospfd/ospf_flood.c | 9 +++-- ospfd/ospf_flood.h | 9 +++-- ospfd/ospf_ia.c | 7 ++-- ospfd/ospf_ia.h | 7 ++-- ospfd/ospf_interface.c | 9 +++-- ospfd/ospf_interface.h | 9 +++-- ospfd/ospf_ism.c | 7 ++-- ospfd/ospf_ism.h | 7 ++-- ospfd/ospf_lsa.c | 7 ++-- ospfd/ospf_lsa.h | 7 ++-- ospfd/ospf_lsdb.c | 7 ++-- ospfd/ospf_lsdb.h | 7 ++-- ospfd/ospf_main.c | 7 ++-- ospfd/ospf_memory.c | 7 ++-- ospfd/ospf_memory.h | 7 ++-- ospfd/ospf_neighbor.c | 9 +++-- ospfd/ospf_neighbor.h | 9 +++-- ospfd/ospf_network.c | 7 ++-- ospfd/ospf_network.h | 7 ++-- ospfd/ospf_nsm.c | 7 ++-- ospfd/ospf_nsm.h | 7 ++-- ospfd/ospf_opaque.c | 9 +++-- ospfd/ospf_opaque.h | 9 +++-- ospfd/ospf_packet.c | 7 ++-- ospfd/ospf_packet.h | 7 ++-- ospfd/ospf_ri.c | 7 ++-- ospfd/ospf_ri.h | 7 ++-- ospfd/ospf_route.c | 7 ++-- ospfd/ospf_route.h | 7 ++-- ospfd/ospf_routemap.c | 7 ++-- ospfd/ospf_snmp.c | 7 ++-- ospfd/ospf_spf.c | 36 +++++++++---------- ospfd/ospf_spf.h | 7 ++-- ospfd/ospf_te.c | 9 +++-- ospfd/ospf_te.h | 9 +++-- ospfd/ospf_vty.c | 7 ++-- ospfd/ospf_vty.h | 7 ++-- ospfd/ospf_zebra.c | 7 ++-- ospfd/ospf_zebra.h | 7 ++-- ospfd/ospfd.c | 36 +++++++++---------- ospfd/ospfd.h | 9 +++-- pimd/pim_assert.c | 35 +++++++++--------- pimd/pim_assert.h | 35 +++++++++--------- pimd/pim_br.c | 7 ++-- pimd/pim_br.h | 7 ++-- pimd/pim_cmd.c | 35 +++++++++--------- pimd/pim_cmd.h | 35 +++++++++--------- pimd/pim_hello.c | 35 +++++++++--------- pimd/pim_hello.h | 35 +++++++++--------- pimd/pim_iface.c | 33 +++++++++-------- pimd/pim_iface.h | 33 +++++++++-------- pimd/pim_ifchannel.c | 35 +++++++++--------- pimd/pim_ifchannel.h | 35 +++++++++--------- pimd/pim_igmp.c | 35 +++++++++--------- pimd/pim_igmp.h | 35 +++++++++--------- pimd/pim_igmp_join.h | 35 +++++++++--------- pimd/pim_igmpv2.c | 7 ++-- pimd/pim_igmpv2.h | 7 ++-- pimd/pim_igmpv3.c | 35 +++++++++--------- pimd/pim_igmpv3.h | 35 +++++++++--------- pimd/pim_int.c | 35 +++++++++--------- pimd/pim_int.h | 35 +++++++++--------- pimd/pim_join.c | 35 +++++++++--------- pimd/pim_join.h | 35 +++++++++--------- pimd/pim_jp_agg.c | 7 ++-- pimd/pim_jp_agg.h | 7 ++-- pimd/pim_macro.c | 35 +++++++++--------- pimd/pim_macro.h | 35 +++++++++--------- pimd/pim_main.c | 35 +++++++++--------- pimd/pim_memory.c | 7 ++-- pimd/pim_memory.h | 7 ++-- pimd/pim_mroute.c | 35 +++++++++--------- pimd/pim_mroute.h | 35 +++++++++--------- pimd/pim_msdp.c | 7 ++-- pimd/pim_msdp.h | 7 ++-- pimd/pim_msdp_packet.c | 7 ++-- pimd/pim_msdp_packet.h | 7 ++-- pimd/pim_msdp_socket.c | 7 ++-- pimd/pim_msdp_socket.h | 7 ++-- pimd/pim_msg.c | 35 +++++++++--------- pimd/pim_msg.h | 35 +++++++++--------- pimd/pim_neighbor.c | 35 +++++++++--------- pimd/pim_neighbor.h | 35 +++++++++--------- pimd/pim_nht.c | 7 ++-- pimd/pim_nht.h | 7 ++-- pimd/pim_oil.c | 35 +++++++++--------- pimd/pim_oil.h | 35 +++++++++--------- pimd/pim_pim.c | 35 +++++++++--------- pimd/pim_pim.h | 35 +++++++++--------- pimd/pim_register.c | 7 ++-- pimd/pim_register.h | 7 ++-- pimd/pim_routemap.c | 7 ++-- pimd/pim_rp.c | 9 +++-- pimd/pim_rp.h | 9 +++-- pimd/pim_rpf.c | 35 +++++++++--------- pimd/pim_rpf.h | 35 +++++++++--------- pimd/pim_signals.c | 35 +++++++++--------- pimd/pim_signals.h | 35 +++++++++--------- pimd/pim_sock.c | 35 +++++++++--------- pimd/pim_sock.h | 35 +++++++++--------- pimd/pim_ssm.c | 7 ++-- pimd/pim_ssm.h | 7 ++-- pimd/pim_ssmpingd.c | 35 +++++++++--------- pimd/pim_ssmpingd.h | 35 +++++++++--------- pimd/pim_static.c | 35 +++++++++--------- pimd/pim_static.h | 35 +++++++++--------- pimd/pim_str.c | 35 +++++++++--------- pimd/pim_str.h | 35 +++++++++--------- pimd/pim_time.c | 35 +++++++++--------- pimd/pim_time.h | 35 +++++++++--------- pimd/pim_tlv.c | 35 +++++++++--------- pimd/pim_tlv.h | 35 +++++++++--------- pimd/pim_upstream.c | 35 +++++++++--------- pimd/pim_upstream.h | 35 +++++++++--------- pimd/pim_util.c | 35 +++++++++--------- pimd/pim_util.h | 35 +++++++++--------- pimd/pim_version.c | 35 +++++++++--------- pimd/pim_version.h | 35 +++++++++--------- pimd/pim_vty.c | 35 +++++++++--------- pimd/pim_vty.h | 35 +++++++++--------- pimd/pim_zebra.c | 35 +++++++++--------- pimd/pim_zebra.h | 35 +++++++++--------- pimd/pim_zlookup.c | 35 +++++++++--------- pimd/pim_zlookup.h | 35 +++++++++--------- pimd/pimd.c | 35 +++++++++--------- pimd/pimd.h | 35 +++++++++--------- pimd/test_igmpv3_join.c | 35 +++++++++--------- qpb/linear_allocator.h | 7 ++-- qpb/qpb.c | 7 ++-- qpb/qpb.h | 7 ++-- qpb/qpb_allocator.c | 7 ++-- qpb/qpb_allocator.h | 7 ++-- ripd/rip_debug.c | 7 ++-- ripd/rip_debug.h | 7 ++-- ripd/rip_interface.c | 7 ++-- ripd/rip_interface.h | 7 ++-- ripd/rip_main.c | 7 ++-- ripd/rip_memory.c | 7 ++-- ripd/rip_memory.h | 7 ++-- ripd/rip_offset.c | 7 ++-- ripd/rip_peer.c | 7 ++-- ripd/rip_routemap.c | 7 ++-- ripd/rip_snmp.c | 7 ++-- ripd/rip_zebra.c | 7 ++-- ripd/ripd.c | 7 ++-- ripd/ripd.h | 7 ++-- ripngd/ripng_debug.c | 7 ++-- ripngd/ripng_debug.h | 7 ++-- ripngd/ripng_interface.c | 7 ++-- ripngd/ripng_main.c | 7 ++-- ripngd/ripng_memory.c | 7 ++-- ripngd/ripng_memory.h | 7 ++-- ripngd/ripng_nexthop.c | 7 ++-- ripngd/ripng_nexthop.h | 7 ++-- ripngd/ripng_offset.c | 7 ++-- ripngd/ripng_peer.c | 7 ++-- ripngd/ripng_route.c | 7 ++-- ripngd/ripng_route.h | 7 ++-- ripngd/ripng_routemap.c | 7 ++-- ripngd/ripng_zebra.c | 7 ++-- ripngd/ripngd.c | 7 ++-- ripngd/ripngd.h | 7 ++-- tests/bgpd/test_aspath.c | 7 ++-- tests/bgpd/test_capability.c | 7 ++-- tests/bgpd/test_ecommunity.c | 7 ++-- tests/bgpd/test_mp_attr.c | 7 ++-- tests/bgpd/test_mpath.c | 7 ++-- tests/helpers/c/main.c | 7 ++-- tests/helpers/c/prng.c | 7 ++-- tests/helpers/c/prng.h | 7 ++-- tests/helpers/c/tests.h | 7 ++-- tests/lib/cli/common_cli.c | 7 ++-- tests/lib/cli/common_cli.h | 7 ++-- tests/lib/cli/test_cli.c | 7 ++-- tests/lib/cli/test_commands.c | 7 ++-- tests/lib/test_buffer.c | 7 ++-- tests/lib/test_checksum.c | 7 ++-- tests/lib/test_heavy.c | 7 ++-- tests/lib/test_heavy_thread.c | 7 ++-- tests/lib/test_heavy_wq.c | 7 ++-- tests/lib/test_memory.c | 7 ++-- tests/lib/test_nexthop_iter.c | 7 ++-- tests/lib/test_privs.c | 7 ++-- tests/lib/test_segv.c | 7 ++-- tests/lib/test_sig.c | 7 ++-- tests/lib/test_srcdest_table.c | 7 ++-- tests/lib/test_stream.c | 9 +++-- tests/lib/test_table.c | 7 ++-- tests/lib/test_timer_correctness.c | 7 ++-- tests/lib/test_timer_performance.c | 7 ++-- tests/test_lblmgr.c | 7 ++-- tools/cocci.h | 3 +- tools/permutations.c | 7 ++-- vtysh/vtysh.c | 7 ++-- vtysh/vtysh.h | 7 ++-- vtysh/vtysh_config.c | 36 +++++++++---------- vtysh/vtysh_main.c | 7 ++-- vtysh/vtysh_user.c | 7 ++-- vtysh/vtysh_user.h | 7 ++-- watchfrr/watchfrr.c | 34 +++++++++--------- watchfrr/watchfrr.h | 34 +++++++++--------- watchfrr/watchfrr_vty.c | 34 +++++++++--------- zebra/client_main.c | 7 ++-- zebra/connected.c | 7 ++-- zebra/connected.h | 7 ++-- zebra/debug.c | 7 ++-- zebra/debug.h | 7 ++-- zebra/if_ioctl.c | 7 ++-- zebra/if_ioctl_solaris.c | 7 ++-- zebra/if_netlink.c | 7 ++-- zebra/if_netlink.h | 7 ++-- zebra/if_null.c | 7 ++-- zebra/if_sysctl.c | 7 ++-- zebra/interface.c | 7 ++-- zebra/interface.h | 7 ++-- zebra/ioctl.c | 7 ++-- zebra/ioctl.h | 7 ++-- zebra/ioctl_null.c | 7 ++-- zebra/ioctl_solaris.c | 7 ++-- zebra/ioctl_solaris.h | 7 ++-- zebra/ipforward.h | 7 ++-- zebra/ipforward_proc.c | 7 ++-- zebra/ipforward_solaris.c | 7 ++-- zebra/ipforward_sysctl.c | 7 ++-- zebra/irdp.h | 7 ++-- zebra/irdp_interface.c | 7 ++-- zebra/irdp_main.c | 7 ++-- zebra/irdp_packet.c | 7 ++-- zebra/kernel_netlink.c | 7 ++-- zebra/kernel_netlink.h | 7 ++-- zebra/kernel_null.c | 12 +++---- zebra/kernel_socket.c | 7 ++-- zebra/kernel_socket.h | 7 ++-- zebra/label_manager.c | 7 ++-- zebra/label_manager.h | 7 ++-- zebra/main.c | 7 ++-- zebra/misc_null.c | 7 ++-- zebra/redistribute.c | 7 ++-- zebra/redistribute.h | 7 ++-- zebra/redistribute_null.c | 7 ++-- zebra/rib.h | 7 ++-- zebra/router-id.c | 7 ++-- zebra/router-id.h | 7 ++-- zebra/rt.h | 7 ++-- zebra/rt_netlink.c | 7 ++-- zebra/rt_netlink.h | 7 ++-- zebra/rt_socket.c | 7 ++-- zebra/rtadv.c | 7 ++-- zebra/rtadv.h | 7 ++-- zebra/rtadv_null.c | 7 ++-- zebra/rtread_getmsg.c | 7 ++-- zebra/rtread_netlink.c | 7 ++-- zebra/rtread_sysctl.c | 7 ++-- zebra/test_main.c | 7 ++-- zebra/zebra_fpm.c | 7 ++-- zebra/zebra_fpm_dt.c | 7 ++-- zebra/zebra_fpm_netlink.c | 7 ++-- zebra/zebra_fpm_private.h | 7 ++-- zebra/zebra_fpm_protobuf.c | 7 ++-- zebra/zebra_memory.c | 7 ++-- zebra/zebra_memory.h | 7 ++-- zebra/zebra_mpls.c | 7 ++-- zebra/zebra_mpls.h | 7 ++-- zebra/zebra_mpls_netlink.c | 7 ++-- zebra/zebra_mpls_null.c | 7 ++-- zebra/zebra_mpls_openbsd.c | 7 ++-- zebra/zebra_mpls_vty.c | 7 ++-- zebra/zebra_mroute.c | 7 ++-- zebra/zebra_mroute.h | 7 ++-- zebra/zebra_ns.c | 7 ++-- zebra/zebra_ns.h | 7 ++-- zebra/zebra_ptm.c | 7 ++-- zebra/zebra_ptm.h | 7 ++-- zebra/zebra_ptm_null.c | 7 ++-- zebra/zebra_ptm_redistribute.c | 7 ++-- zebra/zebra_ptm_redistribute.h | 7 ++-- zebra/zebra_rib.c | 7 ++-- zebra/zebra_rnh.c | 7 ++-- zebra/zebra_rnh.h | 7 ++-- zebra/zebra_rnh_null.c | 7 ++-- zebra/zebra_routemap.c | 7 ++-- zebra/zebra_routemap.h | 7 ++-- zebra/zebra_snmp.c | 7 ++-- zebra/zebra_static.c | 7 ++-- zebra/zebra_static.h | 7 ++-- zebra/zebra_vrf.c | 7 ++-- zebra/zebra_vrf.h | 7 ++-- zebra/zebra_vty.c | 7 ++-- zebra/zserv.c | 7 ++-- zebra/zserv.h | 7 ++-- zebra/zserv_null.c | 7 ++-- 674 files changed, 4223 insertions(+), 4767 deletions(-) diff --git a/COMMUNITY.md b/COMMUNITY.md index 0eeb93403e..a441929b31 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -230,23 +230,22 @@ form of the header is as follows: ``` /* - Title/Function of file - Copyright (C) 2016 Author’s Name - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 + * Title/Function of file + * Copyright (C) YEAR Author’s Name + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as 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 diff --git a/COPYING b/COPYING index b8cf3a1ab2..d159169d10 100644 --- a/COPYING +++ b/COPYING @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -303,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. 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; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -335,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index da5ab94e97..f005b20183 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -1,22 +1,22 @@ /* BGP advertisement and adjacency - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h index 6dc9bb647c..03a1ffcb99 100644 --- a/bgpd/bgp_advertise.h +++ b/bgpd/bgp_advertise.h @@ -1,22 +1,22 @@ /* BGP advertisement and adjacency - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ADVERTISE_H #define _QUAGGA_BGP_ADVERTISE_H diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 006631c1f0..372650a2a6 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1,23 +1,23 @@ /* AS path management routines. - Copyright (C) 1996, 97, 98, 99 Kunihiro Ishiguro - Copyright (C) 2005 Sun Microsystems, Inc. - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99 Kunihiro Ishiguro + * Copyright (C) 2005 Sun Microsystems, Inc. + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_aspath.h b/bgpd/bgp_aspath.h index b15e32fec3..abf4c6ccf9 100644 --- a/bgpd/bgp_aspath.h +++ b/bgpd/bgp_aspath.h @@ -1,22 +1,22 @@ /* AS path related definitions. - Copyright (C) 1997, 98, 99 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ASPATH_H #define _QUAGGA_BGP_ASPATH_H diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index d80b9f237b..983c335cfa 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1,22 +1,22 @@ /* BGP attributes management routines. - Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 1df1faf939..7dfd397bb9 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -1,22 +1,22 @@ /* BGP attributes. - Copyright (C) 1996, 97, 98 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ATTR_H #define _QUAGGA_BGP_ATTR_H diff --git a/bgpd/bgp_attr_evpn.c b/bgpd/bgp_attr_evpn.c index 5b24d4ec61..e565d0801b 100644 --- a/bgpd/bgp_attr_evpn.c +++ b/bgpd/bgp_attr_evpn.c @@ -1,22 +1,22 @@ /* Ethernet-VPN Attribute handling file - Copyright (C) 2016 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 diff --git a/bgpd/bgp_attr_evpn.h b/bgpd/bgp_attr_evpn.h index 4b7d24de18..3a93f6ae62 100644 --- a/bgpd/bgp_attr_evpn.h +++ b/bgpd/bgp_attr_evpn.h @@ -1,22 +1,22 @@ /* E-VPN attribute handling structure file - Copyright (C) 2016 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 + */ #ifndef _QUAGGA_BGP_ATTR_EVPN_H #define _QUAGGA_BGP_ATTR_EVPN_H diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 0a06a57fe5..08cdee76f3 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_bfd.h b/bgpd/bgp_bfd.h index e872637e3e..e2c85af04a 100644 --- a/bgpd/bgp_bfd.h +++ b/bgpd/bgp_bfd.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_BGP_BFD_H diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index d3162a4ea5..be93448302 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -1,22 +1,22 @@ /* BGP dump to ascii converter - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 3def97c73d..21e33eb1c5 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -1,22 +1,22 @@ /* BGP community-list and extcommunity-list. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_clist.h b/bgpd/bgp_clist.h index 68e45c8f7b..114acde8ff 100644 --- a/bgpd/bgp_clist.h +++ b/bgpd/bgp_clist.h @@ -1,22 +1,22 @@ /* BGP Community list. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_CLIST_H #define _QUAGGA_BGP_CLIST_H diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index 17a3d2fdae..bd67829d77 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -1,22 +1,22 @@ /* Community attribute related functions. - Copyright (C) 1998, 2001 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 2001 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_community.h b/bgpd/bgp_community.h index 257f7767b4..cda079c130 100644 --- a/bgpd/bgp_community.h +++ b/bgpd/bgp_community.h @@ -1,22 +1,22 @@ /* Community attribute related functions. - Copyright (C) 1998 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_COMMUNITY_H #define _QUAGGA_BGP_COMMUNITY_H diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 114e641ebd..dcb4519e1c 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -1,22 +1,22 @@ /* BGP flap dampening - Copyright (C) 2001 IP Infusion Inc. - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2001 IP Infusion Inc. + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 #include diff --git a/bgpd/bgp_damp.h b/bgpd/bgp_damp.h index 030a621974..fe44d980b2 100644 --- a/bgpd/bgp_damp.h +++ b/bgpd/bgp_damp.h @@ -1,22 +1,22 @@ /* BGP flap dampening - Copyright (C) 2001 IP Infusion Inc. - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2001 IP Infusion Inc. + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_DAMP_H #define _QUAGGA_BGP_DAMP_H diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 55cd7edd83..f4722e62dc 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -1,22 +1,22 @@ /* BGP-4, BGP-4+ packet debug routine - Copyright (C) 1996, 97, 99 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 99 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h index 64f087a68e..2912eb750d 100644 --- a/bgpd/bgp_debug.h +++ b/bgpd/bgp_debug.h @@ -1,22 +1,22 @@ /* BGP message debug header. - Copyright (C) 1996, 97, 98 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_DEBUG_H #define _QUAGGA_BGP_DEBUG_H diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 10ddf1660c..cdddde14b0 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -1,22 +1,22 @@ /* BGP-4 dump routine - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_dump.h b/bgpd/bgp_dump.h index d1e66d91c3..a54388fef2 100644 --- a/bgpd/bgp_dump.h +++ b/bgpd/bgp_dump.h @@ -1,22 +1,22 @@ /* BGP dump routine. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_DUMP_H #define _QUAGGA_BGP_DUMP_H diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index c80966ec6d..fa1ad813f1 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -1,22 +1,22 @@ /* BGP Extended Communities Attribute - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_ecommunity.h b/bgpd/bgp_ecommunity.h index 356598f6b1..d6006e81d5 100644 --- a/bgpd/bgp_ecommunity.h +++ b/bgpd/bgp_ecommunity.h @@ -1,22 +1,22 @@ /* BGP Extended Communities Attribute. - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ECOMMUNITY_H #define _QUAGGA_BGP_ECOMMUNITY_H diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 23be34c63b..2e58072bc5 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -1,32 +1,26 @@ - /* * This file created by LabN Consulting, L.L.C. * - * * This file is based on bgp_mplsvpn.c which is Copyright (C) 2000 * Kunihiro Ishiguro * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 */ -/* - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - #include #include "command.h" diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index 4d57fca79d..2805dd3e1d 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_ENCAP_H diff --git a/bgpd/bgp_encap_tlv.c b/bgpd/bgp_encap_tlv.c index 7acd23b9ae..eee2cb72c3 100644 --- a/bgpd/bgp_encap_tlv.c +++ b/bgpd/bgp_encap_tlv.c @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 diff --git a/bgpd/bgp_encap_tlv.h b/bgpd/bgp_encap_tlv.h index d94d544d26..487762714c 100644 --- a/bgpd/bgp_encap_tlv.h +++ b/bgpd/bgp_encap_tlv.h @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_ENCAP_TLV_H diff --git a/bgpd/bgp_encap_types.h b/bgpd/bgp_encap_types.h index 04c0d2f235..ffeb2f61ea 100644 --- a/bgpd/bgp_encap_types.h +++ b/bgpd/bgp_encap_types.h @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_ENCAP_TYPES_H diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 612f49f1cb..c5a0ef8893 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1,22 +1,22 @@ /* Ethernet-VPN Packet and vty Processing File - Copyright (C) 2016 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h index 9b24bb066a..95d4280150 100644 --- a/bgpd/bgp_evpn.h +++ b/bgpd/bgp_evpn.h @@ -1,22 +1,22 @@ /* E-VPN header for packet handling - Copyright (C) 2016 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 + */ #ifndef _QUAGGA_BGP_EVPN_H #define _QUAGGA_BGP_EVPN_H diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index c133d7ba39..4850a8f13a 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -1,22 +1,22 @@ /* Ethernet-VPN Packet and vty Processing File - Copyright (C) 2017 6WIND - -This file is part of FRRouting - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2017 6WIND + * + * This file is part of FRRouting + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 #include "command.h" diff --git a/bgpd/bgp_evpn_vty.h b/bgpd/bgp_evpn_vty.h index 68b5f5cfbf..fe01e84e2b 100644 --- a/bgpd/bgp_evpn_vty.h +++ b/bgpd/bgp_evpn_vty.h @@ -1,22 +1,22 @@ /* EVPN VTY functions to EVPN - Copyright (C) 2017 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2017 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 + */ #ifndef _FRR_BGP_EVPN_VTY_H #define _FRR_BGP_EVPN_VTY_H diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 0de2663dd4..31fc39fd23 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -1,22 +1,22 @@ /* AS path filter list. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_filter.h b/bgpd/bgp_filter.h index 03447942d4..e3ce7a1c1d 100644 --- a/bgpd/bgp_filter.h +++ b/bgpd/bgp_filter.h @@ -1,22 +1,22 @@ /* AS path filter list. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_FILTER_H #define _QUAGGA_BGP_FILTER_H diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 2d0349b6a4..a83c2eebb0 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1,23 +1,23 @@ /* BGP-4 Finite State Machine - From RFC1771 [A Border Gateway Protocol 4 (BGP-4)] - Copyright (C) 1996, 97, 98 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * From RFC1771 [A Border Gateway Protocol 4 (BGP-4)] + * Copyright (C) 1996, 97, 98 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h index 67ba387eb9..33cba868ee 100644 --- a/bgpd/bgp_fsm.h +++ b/bgpd/bgp_fsm.h @@ -1,23 +1,23 @@ /* BGP-4 Finite State Machine - From RFC1771 [A Border Gateway Protocol 4 (BGP-4)] - Copyright (C) 1998 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * From RFC1771 [A Border Gateway Protocol 4 (BGP-4)] + * Copyright (C) 1998 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_FSM_H #define _QUAGGA_BGP_FSM_H diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c index e4186a5732..0798515ebb 100644 --- a/bgpd/bgp_label.c +++ b/bgpd/bgp_label.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_label.h b/bgpd/bgp_label.h index b45e791ce2..dbc675dd43 100644 --- a/bgpd/bgp_label.h +++ b/bgpd/bgp_label.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _BGP_LABEL_H diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index 549a2ebad8..4a969c8b90 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -14,8 +14,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_lcommunity.h b/bgpd/bgp_lcommunity.h index de3697f477..e401c8d8f3 100644 --- a/bgpd/bgp_lcommunity.h +++ b/bgpd/bgp_lcommunity.h @@ -14,8 +14,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_BGP_LCOMMUNITY_H diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 3b844cf70e..f9f2018db4 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -1,22 +1,22 @@ /* Main routine of bgpd. - Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_memory.c b/bgpd/bgp_memory.c index 85e32645ee..c457f4b3e9 100644 --- a/bgpd/bgp_memory.c +++ b/bgpd/bgp_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/bgpd/bgp_memory.h b/bgpd/bgp_memory.h index 341fb235d0..454092cef3 100644 --- a/bgpd/bgp_memory.h +++ b/bgpd/bgp_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_BGP_MEMORY_H diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index a95c4a008e..34690ac776 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_mpath.h b/bgpd/bgp_mpath.h index 9a38b5943d..316dda3ec6 100644 --- a/bgpd/bgp_mpath.h +++ b/bgpd/bgp_mpath.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_BGP_MPATH_H diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 97b40df28a..4234934a6a 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1,22 +1,22 @@ /* MPLS-VPN - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h index 518bf6143f..d5378a9d37 100644 --- a/bgpd/bgp_mplsvpn.h +++ b/bgpd/bgp_mplsvpn.h @@ -1,22 +1,22 @@ /* MPLS-VPN - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_MPLSVPN_H #define _QUAGGA_BGP_MPLSVPN_H diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index b64d902d88..70da5e176f 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -1,22 +1,22 @@ /* BGP network related fucntions - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_network.h b/bgpd/bgp_network.h index 1148d1978b..56938b4374 100644 --- a/bgpd/bgp_network.h +++ b/bgpd/bgp_network.h @@ -1,22 +1,22 @@ /* BGP network related header - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_NETWORK_H #define _QUAGGA_BGP_NETWORK_H diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 9300345899..132b754104 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -1,22 +1,22 @@ /* BGP nexthop scan - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_nexthop.h b/bgpd/bgp_nexthop.h index 652a6813ee..c5d9232e33 100644 --- a/bgpd/bgp_nexthop.h +++ b/bgpd/bgp_nexthop.h @@ -1,22 +1,22 @@ /* BGP nexthop scan - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_NEXTHOP_H #define _QUAGGA_BGP_NEXTHOP_H diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 1e8dc5d974..341bb0abb5 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_nht.h b/bgpd/bgp_nht.h index 02a7e5a45c..3497dc8565 100644 --- a/bgpd/bgp_nht.h +++ b/bgpd/bgp_nht.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _BGP_NHT_H diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 3ad6be1a3f..4374729668 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -1,22 +1,22 @@ /* BGP open message handling - Copyright (C) 1998, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h index 9275b3a101..459b966dd2 100644 --- a/bgpd/bgp_open.h +++ b/bgpd/bgp_open.h @@ -1,22 +1,22 @@ /* BGP open message handling - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_OPEN_H #define _QUAGGA_BGP_OPEN_H diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index b5a03f2692..daee3d19e1 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1,22 +1,22 @@ /* BGP packet management routine. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_packet.h b/bgpd/bgp_packet.h index ea5c7a8998..f7beaf4949 100644 --- a/bgpd/bgp_packet.h +++ b/bgpd/bgp_packet.h @@ -1,22 +1,22 @@ /* BGP packet management header. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_PACKET_H #define _QUAGGA_BGP_PACKET_H diff --git a/bgpd/bgp_regex.c b/bgpd/bgp_regex.c index ea87633dc0..3674a9b6d3 100644 --- a/bgpd/bgp_regex.c +++ b/bgpd/bgp_regex.c @@ -1,22 +1,22 @@ /* AS regular expression routine - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_regex.h b/bgpd/bgp_regex.h index e5d28d1b74..68bff001c9 100644 --- a/bgpd/bgp_regex.h +++ b/bgpd/bgp_regex.h @@ -1,22 +1,22 @@ /* AS regular expression routine - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_REGEX_H #define _QUAGGA_BGP_REGEX_H diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index f96893ff4d..85c43bac66 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1,23 +1,23 @@ /* BGP routing information - Copyright (C) 1996, 97, 98, 99 Kunihiro Ishiguro - Copyright (C) 2016 Job Snijders - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99 Kunihiro Ishiguro + * Copyright (C) 2016 Job Snijders + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 9db84b2cae..96c9bd0035 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -1,22 +1,22 @@ /* BGP routing information base - Copyright (C) 1996, 97, 98, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ROUTE_H #define _QUAGGA_BGP_ROUTE_H diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 4563ec85f6..570fcc1a34 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1,22 +1,22 @@ /* Route map function of bgpd. - Copyright (C) 1998, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index f45d683848..db69400a67 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -1,22 +1,22 @@ /* BGP4 SNMP support - Copyright (C) 1999, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 06e443b25a..ff0cfdd658 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -1,22 +1,22 @@ /* BGP routing table - Copyright (C) 1998, 2001 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 2001 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index a6b99a53d6..cff270ebb9 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -1,22 +1,22 @@ /* BGP routing table - Copyright (C) 1998, 2001 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 2001 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_TABLE_H #define _QUAGGA_BGP_TABLE_H diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 09089a3b3f..04d262050f 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -19,10 +19,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_updgrp.h b/bgpd/bgp_updgrp.h index 8f3e27bc84..87b85adae4 100644 --- a/bgpd/bgp_updgrp.h +++ b/bgpd/bgp_updgrp.h @@ -19,10 +19,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_BGP_UPDGRP_H diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c index 3ed2958254..c6a1606323 100644 --- a/bgpd/bgp_updgrp_adv.c +++ b/bgpd/bgp_updgrp_adv.c @@ -21,10 +21,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index f734763b70..95e9360d43 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -19,10 +19,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/bgpd/bgp_vnc_types.h b/bgpd/bgp_vnc_types.h index 8bc9cb6407..e97a47e1a3 100644 --- a/bgpd/bgp_vnc_types.h +++ b/bgpd/bgp_vnc_types.h @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_VNC_TYPES_H diff --git a/bgpd/bgp_vpn.c b/bgpd/bgp_vpn.c index 5b1b1b85b2..e99161d406 100644 --- a/bgpd/bgp_vpn.c +++ b/bgpd/bgp_vpn.c @@ -1,22 +1,22 @@ /* VPN Related functions - Copyright (C) 2017 6WIND - -This file is part of FRRouting - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2017 6WIND + * + * This file is part of FRRouting + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 #include "command.h" diff --git a/bgpd/bgp_vpn.h b/bgpd/bgp_vpn.h index dd53503bf3..fcccd45c7e 100644 --- a/bgpd/bgp_vpn.h +++ b/bgpd/bgp_vpn.h @@ -1,22 +1,22 @@ /* VPN common functions to MP-BGP - Copyright (C) 2017 6WIND - -This file is part of FRRouting. - -FRRouting is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -FRRouting 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 FRRouting; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2017 6WIND + * + * This file is part of FRRouting. + * + * FRRouting is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRRouting 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 + */ #ifndef _FRR_BGP_VPN_H #define _FRR_BGP_VPN_H diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e5734bd76b..843aa99bd5 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1,22 +1,22 @@ /* BGP VTY interface. - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index a0aabcbd2c..eae1f2d018 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -1,22 +1,22 @@ /* BGP VTY interface. - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_VTY_H #define _QUAGGA_BGP_VTY_H diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index d76eb951db..4fff339b85 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1,22 +1,22 @@ /* zebra client - Copyright (C) 1997, 98, 99 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h index bc4e36352d..6a36fb84f7 100644 --- a/bgpd/bgp_zebra.h +++ b/bgpd/bgp_zebra.h @@ -1,22 +1,22 @@ /* zebra connection and redistribute fucntions. - Copyright (C) 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGP_ZEBRA_H #define _QUAGGA_BGP_ZEBRA_H diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 2c04f79478..2346f8759a 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1,22 +1,22 @@ /* BGP-4, BGP-4+ daemon program - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 66ec8ccc84..84dcb7e1d9 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1,22 +1,22 @@ /* BGP message definition header. - Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _QUAGGA_BGPD_H #define _QUAGGA_BGPD_H diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 4f46565900..722948c737 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 "lib/zebra.h" diff --git a/bgpd/rfapi/bgp_rfapi_cfg.h b/bgpd/rfapi/bgp_rfapi_cfg.h index 8f93d69f6b..44abbe2223 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.h +++ b/bgpd/rfapi/bgp_rfapi_cfg.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_CFG_H diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index fee6d745ee..69fae2ae40 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/rfapi.h b/bgpd/rfapi/rfapi.h index 420c6e0d71..11d41c9d1d 100644 --- a/bgpd/rfapi/rfapi.h +++ b/bgpd/rfapi/rfapi.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_H diff --git a/bgpd/rfapi/rfapi_ap.c b/bgpd/rfapi/rfapi_ap.c index 68292c26b1..fac28cd74c 100644 --- a/bgpd/rfapi/rfapi_ap.c +++ b/bgpd/rfapi/rfapi_ap.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 diff --git a/bgpd/rfapi/rfapi_ap.h b/bgpd/rfapi/rfapi_ap.h index 8a59f05274..c875a52e50 100644 --- a/bgpd/rfapi/rfapi_ap.h +++ b/bgpd/rfapi/rfapi_ap.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_AP_H #define _QUAGGA_BGP_RFAPI_AP_H diff --git a/bgpd/rfapi/rfapi_backend.h b/bgpd/rfapi/rfapi_backend.h index 9e5b0dc5cb..a2537bd918 100644 --- a/bgpd/rfapi/rfapi_backend.h +++ b/bgpd/rfapi/rfapi_backend.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_BACKEND_H diff --git a/bgpd/rfapi/rfapi_descriptor_rfp_utils.c b/bgpd/rfapi/rfapi_descriptor_rfp_utils.c index 8106186d97..d05b271288 100644 --- a/bgpd/rfapi/rfapi_descriptor_rfp_utils.c +++ b/bgpd/rfapi/rfapi_descriptor_rfp_utils.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/rfapi_descriptor_rfp_utils.h b/bgpd/rfapi/rfapi_descriptor_rfp_utils.h index 9067cdf54b..04fbfbcec8 100644 --- a/bgpd/rfapi/rfapi_descriptor_rfp_utils.h +++ b/bgpd/rfapi/rfapi_descriptor_rfp_utils.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/rfapi_encap_tlv.c b/bgpd/rfapi/rfapi_encap_tlv.c index 171ea8f24d..04f8b249f7 100644 --- a/bgpd/rfapi/rfapi_encap_tlv.c +++ b/bgpd/rfapi/rfapi_encap_tlv.c @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 "lib/zebra.h" diff --git a/bgpd/rfapi/rfapi_encap_tlv.h b/bgpd/rfapi/rfapi_encap_tlv.h index 9678655a69..19e16a41a5 100644 --- a/bgpd/rfapi/rfapi_encap_tlv.h +++ b/bgpd/rfapi/rfapi_encap_tlv.h @@ -11,10 +11,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_ENCAP_TLV_H diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index bef4b64d27..741ad7d705 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_import.h b/bgpd/rfapi/rfapi_import.h index 3ba76539dd..1888d5f25d 100644 --- a/bgpd/rfapi/rfapi_import.h +++ b/bgpd/rfapi/rfapi_import.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_monitor.c b/bgpd/rfapi/rfapi_monitor.c index 8eeed0216c..275e448967 100644 --- a/bgpd/rfapi/rfapi_monitor.c +++ b/bgpd/rfapi/rfapi_monitor.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_monitor.h b/bgpd/rfapi/rfapi_monitor.h index c42e57c566..667d61ec1d 100644 --- a/bgpd/rfapi/rfapi_monitor.h +++ b/bgpd/rfapi/rfapi_monitor.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef QUAGGA_HGP_RFAPI_MONITOR_H diff --git a/bgpd/rfapi/rfapi_nve_addr.c b/bgpd/rfapi/rfapi_nve_addr.c index e00ff30312..f80455bbed 100644 --- a/bgpd/rfapi/rfapi_nve_addr.c +++ b/bgpd/rfapi/rfapi_nve_addr.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/rfapi_nve_addr.h b/bgpd/rfapi/rfapi_nve_addr.h index 2b2d2b50d4..f2159d1063 100644 --- a/bgpd/rfapi/rfapi_nve_addr.h +++ b/bgpd/rfapi/rfapi_nve_addr.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_RFAPI_NVE_ADDR_H diff --git a/bgpd/rfapi/rfapi_private.h b/bgpd/rfapi/rfapi_private.h index a5e3970549..5a6936fcce 100644 --- a/bgpd/rfapi/rfapi_private.h +++ b/bgpd/rfapi/rfapi_private.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index 85ac936818..04c69d58ac 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_rib.h b/bgpd/rfapi/rfapi_rib.h index 43a5d43ffa..40e4c0c2f2 100644 --- a/bgpd/rfapi/rfapi_rib.h +++ b/bgpd/rfapi/rfapi_rib.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index 3de79dac04..7c5d6ce3fa 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/rfapi_vty.h b/bgpd/rfapi/rfapi_vty.h index c1aeda953c..46b77b55ed 100644 --- a/bgpd/rfapi/rfapi_vty.h +++ b/bgpd/rfapi/rfapi_vty.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef RFAPI_VTY_H diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c index b5ff5bbc88..cc27277a72 100644 --- a/bgpd/rfapi/vnc_debug.c +++ b/bgpd/rfapi/vnc_debug.c @@ -12,10 +12,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 "lib/zebra.h" diff --git a/bgpd/rfapi/vnc_debug.h b/bgpd/rfapi/vnc_debug.h index d16bceed93..c1d81f5c15 100644 --- a/bgpd/rfapi/vnc_debug.h +++ b/bgpd/rfapi/vnc_debug.h @@ -12,10 +12,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_BGP_VNC_DEBUG_H diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c index 55eda907c8..bca95e47c0 100644 --- a/bgpd/rfapi/vnc_export_bgp.c +++ b/bgpd/rfapi/vnc_export_bgp.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/vnc_export_bgp.h b/bgpd/rfapi/vnc_export_bgp.h index ae113fdcb2..7dbbb40e0a 100644 --- a/bgpd/rfapi/vnc_export_bgp.h +++ b/bgpd/rfapi/vnc_export_bgp.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_RFAPI_VNC_EXPORT_BGP_H_ diff --git a/bgpd/rfapi/vnc_export_bgp_p.h b/bgpd/rfapi/vnc_export_bgp_p.h index fceab02e05..31830a3c13 100644 --- a/bgpd/rfapi/vnc_export_bgp_p.h +++ b/bgpd/rfapi/vnc_export_bgp_p.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_RFAPI_VNC_EXPORT_BGP_P_H_ diff --git a/bgpd/rfapi/vnc_export_table.c b/bgpd/rfapi/vnc_export_table.c index 7c8035cf81..5c7a64d3bb 100644 --- a/bgpd/rfapi/vnc_export_table.c +++ b/bgpd/rfapi/vnc_export_table.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfapi/vnc_export_table.h b/bgpd/rfapi/vnc_export_table.h index 77829ca382..234520670d 100644 --- a/bgpd/rfapi/vnc_export_table.h +++ b/bgpd/rfapi/vnc_export_table.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_VNC_VNC_EXPORT_TABLE_H_ diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c index 10246758f3..cb9c474d92 100644 --- a/bgpd/rfapi/vnc_import_bgp.c +++ b/bgpd/rfapi/vnc_import_bgp.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/vnc_import_bgp.h b/bgpd/rfapi/vnc_import_bgp.h index db739e3320..9a7261067a 100644 --- a/bgpd/rfapi/vnc_import_bgp.h +++ b/bgpd/rfapi/vnc_import_bgp.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ diff --git a/bgpd/rfapi/vnc_import_bgp_p.h b/bgpd/rfapi/vnc_import_bgp_p.h index 85800c1cab..19bcd19253 100644 --- a/bgpd/rfapi/vnc_import_bgp_p.h +++ b/bgpd/rfapi/vnc_import_bgp_p.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_P_H_ diff --git a/bgpd/rfapi/vnc_zebra.c b/bgpd/rfapi/vnc_zebra.c index 84b299ce1d..6a8b4a83fa 100644 --- a/bgpd/rfapi/vnc_zebra.c +++ b/bgpd/rfapi/vnc_zebra.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfapi/vnc_zebra.h b/bgpd/rfapi/vnc_zebra.h index ad24844423..68e567ec35 100644 --- a/bgpd/rfapi/vnc_zebra.h +++ b/bgpd/rfapi/vnc_zebra.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* diff --git a/bgpd/rfp-example/librfp/rfp.h b/bgpd/rfp-example/librfp/rfp.h index 91dbf5e71f..a8df87f82d 100644 --- a/bgpd/rfp-example/librfp/rfp.h +++ b/bgpd/rfp-example/librfp/rfp.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* Sample header file */ diff --git a/bgpd/rfp-example/librfp/rfp_example.c b/bgpd/rfp-example/librfp/rfp_example.c index d4100c096f..dad81c6ddb 100644 --- a/bgpd/rfp-example/librfp/rfp_example.c +++ b/bgpd/rfp-example/librfp/rfp_example.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* stub rfp */ diff --git a/bgpd/rfp-example/librfp/rfp_internal.h b/bgpd/rfp-example/librfp/rfp_internal.h index 64452d2397..b8cfeb0490 100644 --- a/bgpd/rfp-example/librfp/rfp_internal.h +++ b/bgpd/rfp-example/librfp/rfp_internal.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* Sample header file */ diff --git a/bgpd/rfp-example/rfptest/rfptest.c b/bgpd/rfp-example/rfptest/rfptest.c index 39b798e516..2141933d14 100644 --- a/bgpd/rfp-example/rfptest/rfptest.c +++ b/bgpd/rfp-example/rfptest/rfptest.c @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ diff --git a/bgpd/rfp-example/rfptest/rfptest.h b/bgpd/rfp-example/rfptest/rfptest.h index 00effb8673..2ebd7d12b7 100644 --- a/bgpd/rfp-example/rfptest/rfptest.h +++ b/bgpd/rfp-example/rfptest/rfptest.h @@ -13,10 +13,9 @@ * 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * 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 */ /* Sample header file */ diff --git a/defaults.h b/defaults.h index 4a5cc8252a..d9fd44e14c 100644 --- a/defaults.h +++ b/defaults.h @@ -14,8 +14,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _FRR_DEFAULTS_H diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h index 13eba207e2..6673b3a334 100644 --- a/eigrpd/eigrp_const.h +++ b/eigrpd/eigrp_const.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_CONST_H_ diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index 97ef37d8a9..6a0d7a2b68 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_dump.h b/eigrpd/eigrp_dump.h index bbc0d306d9..e18efd453a 100644 --- a/eigrpd/eigrp_dump.h +++ b/eigrpd/eigrp_dump.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRPD_DUMP_H_ diff --git a/eigrpd/eigrp_filter.c b/eigrpd/eigrp_filter.c index bfe51ae88d..5a2755d037 100644 --- a/eigrpd/eigrp_filter.c +++ b/eigrpd/eigrp_filter.c @@ -25,10 +25,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_filter.h b/eigrpd/eigrp_filter.h index 01c776b17e..117cf3c49f 100644 --- a/eigrpd/eigrp_filter.h +++ b/eigrpd/eigrp_filter.h @@ -25,10 +25,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef EIGRPD_EIGRP_FILTER_H_ diff --git a/eigrpd/eigrp_fsm.c b/eigrpd/eigrp_fsm.c index dc62edb68f..ad4eb70181 100644 --- a/eigrpd/eigrp_fsm.c +++ b/eigrpd/eigrp_fsm.c @@ -20,11 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * + * 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 * * This file contains functions for executing logic of finite state machine * @@ -65,7 +63,6 @@ * 5- query from successor while in active state * 6- last reply, FC not satisfied with current value of FDij * 7- state not changed, usually by receiving not last reply - * */ #include diff --git a/eigrpd/eigrp_fsm.h b/eigrpd/eigrp_fsm.h index 0677c09d7f..4ba0d88739 100644 --- a/eigrpd/eigrp_fsm.h +++ b/eigrpd/eigrp_fsm.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_FSM_H diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c index 051836d7e8..58a34530c9 100644 --- a/eigrpd/eigrp_hello.c +++ b/eigrpd/eigrp_hello.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 1ad5e88c22..d7e6092383 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_interface.h b/eigrpd/eigrp_interface.h index c7de3b75b6..0c57f0cbd6 100644 --- a/eigrpd/eigrp_interface.h +++ b/eigrpd/eigrp_interface.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_INTERFACE_H_ diff --git a/eigrpd/eigrp_macros.h b/eigrpd/eigrp_macros.h index dd22829e88..08c2fc34cc 100644 --- a/eigrpd/eigrp_macros.h +++ b/eigrpd/eigrp_macros.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_MACROS_H_ diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c index 6a5e3b1a04..b11b5825cc 100644 --- a/eigrpd/eigrp_main.c +++ b/eigrpd/eigrp_main.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_memory.c b/eigrpd/eigrp_memory.c index dabc0774e2..4aa76018a2 100644 --- a/eigrpd/eigrp_memory.c +++ b/eigrpd/eigrp_memory.c @@ -14,10 +14,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/eigrpd/eigrp_memory.h b/eigrpd/eigrp_memory.h index 0cafdfb1bd..cd29f1725e 100644 --- a/eigrpd/eigrp_memory.h +++ b/eigrpd/eigrp_memory.h @@ -14,10 +14,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _FRR_EIGRP_MEMORY_H diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index dfea5258f5..ea39d6e90e 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_neighbor.h b/eigrpd/eigrp_neighbor.h index e9ddc22f9e..66fa0e71bc 100644 --- a/eigrpd/eigrp_neighbor.h +++ b/eigrpd/eigrp_neighbor.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_NEIGHBOR_H diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index b8f21f1e86..45d91025d1 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_network.h b/eigrpd/eigrp_network.h index 87d1280620..bcca2609a8 100644 --- a/eigrpd/eigrp_network.h +++ b/eigrpd/eigrp_network.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_NETWORK_H diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index 635c1cf66b..72f3e151de 100644 --- a/eigrpd/eigrp_packet.c +++ b/eigrpd/eigrp_packet.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_packet.h b/eigrpd/eigrp_packet.h index b8b2815168..0996eb2ff6 100644 --- a/eigrpd/eigrp_packet.h +++ b/eigrpd/eigrp_packet.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_PACKET_H diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 4488054e06..b5f4cab849 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c index 0c5d9dd92e..fb7770ca5b 100644 --- a/eigrpd/eigrp_reply.c +++ b/eigrpd/eigrp_reply.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_routemap.c b/eigrpd/eigrp_routemap.c index c4a33d5b06..6a6168e4ff 100644 --- a/eigrpd/eigrp_routemap.c +++ b/eigrpd/eigrp_routemap.c @@ -31,10 +31,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_siaquery.c b/eigrpd/eigrp_siaquery.c index b041300764..3fc1aa54d3 100644 --- a/eigrpd/eigrp_siaquery.c +++ b/eigrpd/eigrp_siaquery.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_siareply.c b/eigrpd/eigrp_siareply.c index 4c4793f864..ecce154bf6 100644 --- a/eigrpd/eigrp_siareply.c +++ b/eigrpd/eigrp_siareply.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_snmp.c b/eigrpd/eigrp_snmp.c index f18894bb81..4b8d1bb393 100644 --- a/eigrpd/eigrp_snmp.c +++ b/eigrpd/eigrp_snmp.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_snmp.h b/eigrpd/eigrp_snmp.h index ab14912c48..559852d58d 100644 --- a/eigrpd/eigrp_snmp.h +++ b/eigrpd/eigrp_snmp.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h index b891475c2c..4d307005c9 100644 --- a/eigrpd/eigrp_structs.h +++ b/eigrpd/eigrp_structs.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_STRUCTS_H_ diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index cab56c19db..d422b450ed 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_topology.h b/eigrpd/eigrp_topology.h index cb1ac793f0..4ddc71f6fe 100644 --- a/eigrpd/eigrp_topology.h +++ b/eigrpd/eigrp_topology.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_TOPOLOGY_H diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 463f3800fa..b0644535df 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index c3413992cd..5694ca49f9 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_vty.h b/eigrpd/eigrp_vty.h index 56a40263fa..f78a46f621 100644 --- a/eigrpd/eigrp_vty.h +++ b/eigrpd/eigrp_vty.h @@ -24,10 +24,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_EIGRP_VTY_H diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index befb39dba1..ba6ecf2452 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrp_zebra.h b/eigrpd/eigrp_zebra.h index 4cd6b1e957..0991d35aba 100644 --- a/eigrpd/eigrp_zebra.h +++ b/eigrpd/eigrp_zebra.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRP_ZEBRA_H_ diff --git a/eigrpd/eigrpd.c b/eigrpd/eigrpd.c index 6c0033481d..93a69b776b 100644 --- a/eigrpd/eigrpd.c +++ b/eigrpd/eigrpd.c @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/eigrpd/eigrpd.h b/eigrpd/eigrpd.h index 901d413c0c..b3f233c58b 100644 --- a/eigrpd/eigrpd.h +++ b/eigrpd/eigrpd.h @@ -20,10 +20,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EIGRPD_H diff --git a/fpm/fpm_pb.c b/fpm/fpm_pb.c index ba18627ea1..5cd03a4d59 100644 --- a/fpm/fpm_pb.c +++ b/fpm/fpm_pb.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/fpm/fpm_pb.h b/fpm/fpm_pb.h index 8f74ac06eb..2e5f3d0527 100644 --- a/fpm/fpm_pb.h +++ b/fpm/fpm_pb.h @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c index e3643868d3..1869346f89 100644 --- a/isisd/isis_adjacency.c +++ b/isisd/isis_adjacency.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_adjacency.h b/isisd/isis_adjacency.h index 4f89e30960..a81797bb1e 100644 --- a/isisd/isis_adjacency.h +++ b/isisd/isis_adjacency.h @@ -16,10 +16,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_ADJACENCY_H diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c index 0a1610b6f2..4ebaa4a1ee 100644 --- a/isisd/isis_bpf.c +++ b/isisd/isis_bpf.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index 190811bac4..bafc37a755 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 #ifdef GNU_LINUX diff --git a/isisd/isis_circuit.h b/isisd/isis_circuit.h index 16dfa6304c..82ca7ca0d9 100644 --- a/isisd/isis_circuit.h +++ b/isisd/isis_circuit.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISIS_CIRCUIT_H diff --git a/isisd/isis_common.h b/isisd/isis_common.h index d158961b99..6c827115b3 100644 --- a/isisd/isis_common.h +++ b/isisd/isis_common.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISIS_COMMON_H diff --git a/isisd/isis_constants.h b/isisd/isis_constants.h index ec0f6fb62c..b59d77bf3f 100644 --- a/isisd/isis_constants.h +++ b/isisd/isis_constants.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISIS_CONSTANTS_H diff --git a/isisd/isis_csm.c b/isisd/isis_csm.c index 0fbf47aea1..90272d68b2 100644 --- a/isisd/isis_csm.c +++ b/isisd/isis_csm.c @@ -15,9 +15,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 diff --git a/isisd/isis_csm.h b/isisd/isis_csm.h index d6b13ac695..a1e0f234f6 100644 --- a/isisd/isis_csm.h +++ b/isisd/isis_csm.h @@ -16,10 +16,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_CSM_H #define _ZEBRA_ISIS_CSM_H diff --git a/isisd/isis_dlpi.c b/isisd/isis_dlpi.c index 98b18ac38d..afd8a14f94 100644 --- a/isisd/isis_dlpi.c +++ b/isisd/isis_dlpi.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_dr.c b/isisd/isis_dr.c index def6e3860e..96cf8488da 100644 --- a/isisd/isis_dr.c +++ b/isisd/isis_dr.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ diff --git a/isisd/isis_dr.h b/isisd/isis_dr.h index bad6836141..801cd0e472 100644 --- a/isisd/isis_dr.h +++ b/isisd/isis_dr.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_DR_H diff --git a/isisd/isis_dynhn.c b/isisd/isis_dynhn.c index 541bfe4a5c..0c702e6729 100644 --- a/isisd/isis_dynhn.c +++ b/isisd/isis_dynhn.c @@ -15,9 +15,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 diff --git a/isisd/isis_dynhn.h b/isisd/isis_dynhn.h index f06a067be1..c36d9a0093 100644 --- a/isisd/isis_dynhn.h +++ b/isisd/isis_dynhn.h @@ -16,9 +16,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ISIS_DYNHN_H #define _ZEBRA_ISIS_DYNHN_H diff --git a/isisd/isis_events.c b/isisd/isis_events.c index 32415092a4..8011d2db9c 100644 --- a/isisd/isis_events.c +++ b/isisd/isis_events.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_events.h b/isisd/isis_events.h index e7cfa3509e..e9aa05db77 100644 --- a/isisd/isis_events.h +++ b/isisd/isis_events.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_EVENTS_H #define _ZEBRA_ISIS_EVENTS_H diff --git a/isisd/isis_flags.c b/isisd/isis_flags.c index ec0eaa4f82..6c88cfeda5 100644 --- a/isisd/isis_flags.c +++ b/isisd/isis_flags.c @@ -16,9 +16,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 diff --git a/isisd/isis_flags.h b/isisd/isis_flags.h index e2e42adcc9..ba11cf42b5 100644 --- a/isisd/isis_flags.h +++ b/isisd/isis_flags.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_FLAGS_H diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index b7e66d13a1..29e5280ce3 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -16,10 +16,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_lsp.h b/isisd/isis_lsp.h index 6f697df62c..0d1dd6740f 100644 --- a/isisd/isis_lsp.h +++ b/isisd/isis_lsp.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_LSP_H diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 644b652d44..6b761d6452 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_memory.c b/isisd/isis_memory.c index f3ecc6cd7a..101fdcc69c 100644 --- a/isisd/isis_memory.c +++ b/isisd/isis_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/isisd/isis_memory.h b/isisd/isis_memory.h index 9345229daa..7729ebac33 100644 --- a/isisd/isis_memory.h +++ b/isisd/isis_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_ISIS_MEMORY_H diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index f19b44155a..3869159a02 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_misc.h b/isisd/isis_misc.h index 37eaea1549..a71edd8e69 100644 --- a/isisd/isis_misc.h +++ b/isisd/isis_misc.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_MISC_H diff --git a/isisd/isis_mt.c b/isisd/isis_mt.c index d15da1d27a..269802e9f8 100644 --- a/isisd/isis_mt.c +++ b/isisd/isis_mt.c @@ -15,10 +15,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include "isisd/isisd.h" diff --git a/isisd/isis_mt.h b/isisd/isis_mt.h index d4dc4c6f2a..e90f1756ff 100644 --- a/isisd/isis_mt.h +++ b/isisd/isis_mt.h @@ -15,10 +15,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef ISIS_MT_H #define ISIS_MT_H diff --git a/isisd/isis_network.h b/isisd/isis_network.h index e1e10dfdb8..41788e69fa 100644 --- a/isisd/isis_network.h +++ b/isisd/isis_network.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index bca3f91d4e..69beade477 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_pdu.h b/isisd/isis_pdu.h index 3eca731938..e512b6b1b9 100644 --- a/isisd/isis_pdu.h +++ b/isisd/isis_pdu.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_PDU_H diff --git a/isisd/isis_pfpacket.c b/isisd/isis_pfpacket.c index 5c434b90d1..c5985dcd8d 100644 --- a/isisd/isis_pfpacket.c +++ b/isisd/isis_pfpacket.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index bdf90aaa1e..b0c065bdf1 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -12,10 +12,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_redist.h b/isisd/isis_redist.h index cc9c2e6345..11b3c31e24 100644 --- a/isisd/isis_redist.h +++ b/isisd/isis_redist.h @@ -12,10 +12,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISIS_REDIST_H diff --git a/isisd/isis_route.c b/isisd/isis_route.c index e3256f2d02..bceb70ce03 100644 --- a/isisd/isis_route.c +++ b/isisd/isis_route.c @@ -16,10 +16,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_route.h b/isisd/isis_route.h index de23070aa8..24bd786fa7 100644 --- a/isisd/isis_route.h +++ b/isisd/isis_route.h @@ -17,10 +17,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_ROUTE_H #define _ZEBRA_ISIS_ROUTE_H diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index 61f3315f08..cf4562dbcd 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -12,10 +12,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_routemap.h b/isisd/isis_routemap.h index 1cb063feec..b0ff559ac1 100644 --- a/isisd/isis_routemap.h +++ b/isisd/isis_routemap.h @@ -12,10 +12,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISIS_ROUTEMAP_H #define ISIS_ROUTEMAP_H diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 1eb2586147..ca268cec7e 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -16,10 +16,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_spf.h b/isisd/isis_spf.h index 9f06dbb602..8c72f45c52 100644 --- a/isisd/isis_spf.h +++ b/isisd/isis_spf.h @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_SPF_H diff --git a/isisd/isis_te.c b/isisd/isis_te.c index b04d0db3ca..1f9c2b9637 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -18,10 +18,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/isisd/isis_te.h b/isisd/isis_te.h index 1578d37706..3c99c90855 100644 --- a/isisd/isis_te.h +++ b/isisd/isis_te.h @@ -18,10 +18,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ISIS_MPLS_TE_H diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c index b033e35a2e..7ffa7509c3 100644 --- a/isisd/isis_tlv.c +++ b/isisd/isis_tlv.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_tlv.h b/isisd/isis_tlv.h index 2135f5071f..e55e81bce1 100644 --- a/isisd/isis_tlv.h +++ b/isisd/isis_tlv.h @@ -16,9 +16,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ISIS_TLV_H diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index 9cae5f9a5c..4d758315e2 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index 3b128a689d..4dd7ec5c3e 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isis_zebra.h b/isisd/isis_zebra.h index 217e3d48cd..aeead3c3b2 100644 --- a/isisd/isis_zebra.h +++ b/isisd/isis_zebra.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ISIS_ZEBRA_H #define _ZEBRA_ISIS_ZEBRA_H diff --git a/isisd/isisd.c b/isisd/isisd.c index fedac084e3..c1968918ed 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/isisd.h b/isisd/isisd.h index a8cf3673fc..9b6281866c 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -14,10 +14,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef ISISD_H diff --git a/isisd/iso_checksum.c b/isisd/iso_checksum.c index 294fe9942d..d036c0ba76 100644 --- a/isisd/iso_checksum.c +++ b/isisd/iso_checksum.c @@ -15,10 +15,10 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * 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 diff --git a/isisd/iso_checksum.h b/isisd/iso_checksum.h index 5f8d41f9e4..cca6ee24a4 100644 --- a/isisd/iso_checksum.h +++ b/isisd/iso_checksum.h @@ -16,9 +16,9 @@ * 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; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ISO_CSUM_H #define _ZEBRA_ISO_CSUM_H diff --git a/ldpd/ldp_debug.c b/ldpd/ldp_debug.c index 86b679d8aa..4419f853b4 100644 --- a/ldpd/ldp_debug.c +++ b/ldpd/ldp_debug.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ldpd/ldp_debug.h b/ldpd/ldp_debug.h index f944851b6e..6366d3f6ac 100644 --- a/ldpd/ldp_debug.h +++ b/ldpd/ldp_debug.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _LDP_DEBUG_H_ diff --git a/ldpd/ldp_vty.h b/ldpd/ldp_vty.h index 8510a394ec..21a486ff65 100644 --- a/ldpd/ldp_vty.h +++ b/ldpd/ldp_vty.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _LDP_VTY_H_ diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index 6943e8edc6..37288f4c00 100644 --- a/ldpd/ldp_vty_conf.c +++ b/ldpd/ldp_vty_conf.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c index ffd20abb4a..3463fb6c63 100644 --- a/ldpd/ldp_vty_exec.c +++ b/ldpd/ldp_vty_exec.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c index 3320238a05..1a93f5a86f 100644 --- a/ldpd/ldp_zebra.c +++ b/ldpd/ldp_zebra.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/agentx.c b/lib/agentx.c index 5deb8f1e06..fda634bb86 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/bfd.c b/lib/bfd.c index b651a05a09..217fc09722 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/bfd.h b/lib/bfd.h index e636e4426f..f23ff3bd8e 100644 --- a/lib/bfd.h +++ b/lib/bfd.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_BFD_H diff --git a/lib/bitfield.h b/lib/bitfield.h index 7062796a99..4ff9c7fb2e 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /** * A simple bit array implementation to allocate and free IDs. An example diff --git a/lib/buffer.c b/lib/buffer.c index 1dfcdb4732..649677fc93 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -8,16 +8,15 @@ * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your * option) any later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/buffer.h b/lib/buffer.h index 6c3dc76a1b..67ac71cad8 100644 --- a/lib/buffer.h +++ b/lib/buffer.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_BUFFER_H diff --git a/lib/command.c b/lib/command.c index cc597952e4..c64d38f22d 100644 --- a/lib/command.c +++ b/lib/command.c @@ -19,10 +19,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/command.h b/lib/command.h index 1aca8b4ae1..35fb20f8b0 100644 --- a/lib/command.h +++ b/lib/command.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_COMMAND_H diff --git a/lib/command_graph.c b/lib/command_graph.c index 62d0610e18..6b6c0369f0 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -17,9 +17,9 @@ * 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; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA + * 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 diff --git a/lib/command_graph.h b/lib/command_graph.h index 595508d5ce..a7a34a0598 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -17,9 +17,9 @@ * 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; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA + * 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 */ #ifndef _FRR_COMMAND_GRAPH_H diff --git a/lib/command_match.c b/lib/command_match.c index d1f9ef1cb1..75d8fdc3d3 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/command_match.h b/lib/command_match.h index 9e18b8d905..a04f60f0d8 100644 --- a/lib/command_match.h +++ b/lib/command_match.h @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_COMMAND_MATCH_H diff --git a/lib/csv.c b/lib/csv.c index d614ac3066..bfe712bade 100644 --- a/lib/csv.c +++ b/lib/csv.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include diff --git a/lib/csv.h b/lib/csv.h index 3fb4453761..3ee568578c 100644 --- a/lib/csv.h +++ b/lib/csv.h @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __CSV_H__ diff --git a/lib/distribute.c b/lib/distribute.c index f85994c9a8..7b7d49d1d6 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/distribute.h b/lib/distribute.h index e9625a3548..23d7cac577 100644 --- a/lib/distribute.h +++ b/lib/distribute.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_DISTRIBUTE_H diff --git a/lib/event_counter.c b/lib/event_counter.c index e94aa4c0f6..0acd0a1f7a 100644 --- a/lib/event_counter.c +++ b/lib/event_counter.c @@ -35,10 +35,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/event_counter.h b/lib/event_counter.h index f40c6cde63..8c11e10287 100644 --- a/lib/event_counter.h +++ b/lib/event_counter.h @@ -35,10 +35,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_EVENT_COUNTER_H diff --git a/lib/fifo.h b/lib/fifo.h index 6be75b7611..631556e78e 100644 --- a/lib/fifo.h +++ b/lib/fifo.h @@ -1,22 +1,22 @@ /* FIFO common header. - Copyright (C) 2015 Kunihiro Ishiguro - -This file is part of Quagga. - -Quagga is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -Quagga 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2015 Kunihiro Ishiguro + * + * This file is part of Quagga. + * + * Quagga is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * Quagga 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 + */ #ifndef __LIB_FIFO_H__ #define __LIB_FIFO_H__ diff --git a/lib/filter.c b/lib/filter.c index fd73d4de73..93aac31b4f 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/filter.h b/lib/filter.h index 6b5ccb52ec..2c70018112 100644 --- a/lib/filter.h +++ b/lib/filter.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_FILTER_H diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index 0408bca096..17bc82f5da 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -1,21 +1,20 @@ /* - Utilities and interfaces for managing POSIX threads - Copyright (C) 2017 Cumulus Networks - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 + * Utilities and interfaces for managing POSIX threads + * Copyright (C) 2017 Cumulus Networks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h index b4954367f4..1a390b1e45 100644 --- a/lib/frr_pthread.h +++ b/lib/frr_pthread.h @@ -1,21 +1,20 @@ /* - Utilities and interfaces for managing POSIX threads - Copyright (C) 2017 Cumulus Networks - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 + * Utilities and interfaces for managing POSIX threads + * Copyright (C) 2017 Cumulus Networks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 */ #ifndef _FRR_PTHREAD_H diff --git a/lib/getopt.c b/lib/getopt.c index 7a58a8a8cc..d0ee43510b 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -1,28 +1,28 @@ /* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! - - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 - Free Software Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + * NOTE: getopt is now part of the C library, so if you don't know what + * "Keep this file name-space clean" means, talk to drepper@gnu.org + * before changing it! + * + * Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 + * Free Software Foundation, Inc. + * + * NOTE: The canonical source of this file is maintained with the GNU C Library. + * Bugs can be reported to bug-glibc@gnu.org. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, 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 + */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ diff --git a/lib/getopt.h b/lib/getopt.h index b359a47beb..cc38a45c23 100644 --- a/lib/getopt.h +++ b/lib/getopt.h @@ -1,23 +1,23 @@ /* Declarations for getopt. - Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + * Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. + * + * NOTE: The canonical source of this file is maintained with the GNU C Library. + * Bugs can be reported to bug-glibc@gnu.org. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, 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 + */ #ifndef _GETOPT_H #define _GETOPT_H 1 diff --git a/lib/getopt1.c b/lib/getopt1.c index bd3099e799..1873a197e1 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -1,24 +1,24 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 - Free Software Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@gnu.org. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + * Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 + * Free Software Foundation, Inc. + * + * NOTE: The canonical source of this file is maintained with the GNU C Library. + * Bugs can be reported to bug-glibc@gnu.org. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, 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 #include "getopt.h" diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 24bf20dac6..cfc3fb7982 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -18,10 +18,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 "command.h" diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c index 681d4da440..3bf0e268cf 100644 --- a/lib/grammar_sandbox_main.c +++ b/lib/grammar_sandbox_main.c @@ -19,8 +19,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 "command.h" diff --git a/lib/graph.c b/lib/graph.c index 0992059ef1..6173b2084b 100644 --- a/lib/graph.c +++ b/lib/graph.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include "graph.h" diff --git a/lib/graph.h b/lib/graph.h index 8d8aa3823b..d3973d4b02 100644 --- a/lib/graph.h +++ b/lib/graph.h @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_COMMAND_GRAPH_H diff --git a/lib/hash.c b/lib/hash.c index cb8531fccf..553a137eb6 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/hash.h b/lib/hash.h index 11ecf75ec9..bafb35a2a3 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -1,22 +1,22 @@ /* Hash routine. - Copyright (C) 1998 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2, or (at your -option) any later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 1998 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_HASH_H #define _ZEBRA_HASH_H diff --git a/lib/if.c b/lib/if.c index 3fbf2df6a0..dc417f8e3c 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1,10 +1,9 @@ - /* * Interface functions. * Copyright (C) 1997, 98 Kunihiro Ishiguro * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -15,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/if.h b/lib/if.h index e8e84ffc88..fa95901a58 100644 --- a/lib/if.h +++ b/lib/if.h @@ -1,22 +1,22 @@ /* Interface related header. - Copyright (C) 1997, 98, 99 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2, or (at your -option) any later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 1997, 98, 99 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_IF_H #define _ZEBRA_IF_H diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 2afb08c7ca..fa9b17f2ae 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/if_rmap.h b/lib/if_rmap.h index e6c2966ff8..e38b5f7f73 100644 --- a/lib/if_rmap.h +++ b/lib/if_rmap.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_IF_RMAP_H diff --git a/lib/json.c b/lib/json.c index ccbecb726a..186efc9f48 100644 --- a/lib/json.c +++ b/lib/json.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/json.h b/lib/json.h index 7e98614280..5faaaa841a 100644 --- a/lib/json.h +++ b/lib/json.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_JSON_H diff --git a/lib/keychain.c b/lib/keychain.c index 95a2c8e599..1aa6edb4bd 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -1,22 +1,22 @@ /* key-chain for authentication. - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2, or (at your -option) any later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * GNU Zebra 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 diff --git a/lib/keychain.h b/lib/keychain.h index d3f9168a0f..e6bdcc6f06 100644 --- a/lib/keychain.h +++ b/lib/keychain.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_KEYCHAIN_H diff --git a/lib/libfrr.c b/lib/libfrr.c index de83e14f0e..16681fe578 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -13,9 +13,9 @@ * 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; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA + * 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 diff --git a/lib/libfrr.h b/lib/libfrr.h index 0cc7ad564b..6bd92d8bea 100644 --- a/lib/libfrr.h +++ b/lib/libfrr.h @@ -13,9 +13,9 @@ * 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; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA + * 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 */ #ifndef _ZEBRA_FRR_H diff --git a/lib/libospf.h b/lib/libospf.h index a1ff9c24a2..c9483a4c65 100644 --- a/lib/libospf.h +++ b/lib/libospf.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _LIBOSPFD_H diff --git a/lib/linklist.c b/lib/linklist.c index 6fe91c75fc..0aee54d44c 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/linklist.h b/lib/linklist.h index cd6e2f13aa..37ba396a76 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_LINKLIST_H diff --git a/lib/log.c b/lib/log.c index 4460efca6e..111b98758d 100644 --- a/lib/log.c +++ b/lib/log.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #define FRR_DEFINE_DESC_TABLE diff --git a/lib/log.h b/lib/log.h index 5faf0103e2..f6c94ba604 100644 --- a/lib/log.h +++ b/lib/log.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_LOG_H diff --git a/lib/log_int.h b/lib/log_int.h index c21d723ac6..7c93381cbc 100644 --- a/lib/log_int.h +++ b/lib/log_int.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_LOG_PRIVATE_H diff --git a/lib/memory_vty.c b/lib/memory_vty.c index 6d63bc2d53..27254cfa5b 100644 --- a/lib/memory_vty.c +++ b/lib/memory_vty.c @@ -14,9 +14,9 @@ * 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; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA + * 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 diff --git a/lib/memory_vty.h b/lib/memory_vty.h index 565a75aa98..a47c5d51b8 100644 --- a/lib/memory_vty.h +++ b/lib/memory_vty.h @@ -1,22 +1,22 @@ /* Memory management routine - Copyright (C) 1998 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_MEMORY_VTY_H #define _ZEBRA_MEMORY_VTY_H diff --git a/lib/mpls.h b/lib/mpls.h index f4f360c957..6cf0142755 100644 --- a/lib/mpls.h +++ b/lib/mpls.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_MPLS_H diff --git a/lib/network.c b/lib/network.c index 2b6f2fbab5..3d2c63c89d 100644 --- a/lib/network.c +++ b/lib/network.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/network.h b/lib/network.h index a9126caf7f..a6b8ed1e17 100644 --- a/lib/network.h +++ b/lib/network.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_NETWORK_H diff --git a/lib/nexthop.c b/lib/nexthop.c index a6420fea33..725b52c052 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/nexthop.h b/lib/nexthop.h index 83c5b850b8..8c9c801c91 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _LIB_NEXTHOP_H diff --git a/lib/ns.c b/lib/ns.c index ae0a24668e..8c489d68fd 100644 --- a/lib/ns.c +++ b/lib/ns.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/ns.h b/lib/ns.h index 2a7be1ef8a..98fd3fa18c 100644 --- a/lib/ns.h +++ b/lib/ns.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_NS_H diff --git a/lib/pid_output.c b/lib/pid_output.c index ba1f37476e..7369e23c20 100644 --- a/lib/pid_output.c +++ b/lib/pid_output.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/plist.c b/lib/plist.c index 8f59c0c058..8091429e31 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/plist.h b/lib/plist.h index 89d9a874f0..0f397ff01a 100644 --- a/lib/plist.h +++ b/lib/plist.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_PLIST_H diff --git a/lib/plist_int.h b/lib/plist_int.h index e6e5901dbf..e711d12564 100644 --- a/lib/plist_int.h +++ b/lib/plist_int.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_PLIST_INT_H diff --git a/lib/pqueue.c b/lib/pqueue.c index fa502b462a..2d9127b88e 100644 --- a/lib/pqueue.c +++ b/lib/pqueue.c @@ -1,22 +1,22 @@ /* Priority queue functions. - Copyright (C) 2003 Yasuhiro Ohara - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2, or (at your -option) any later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 2003 Yasuhiro Ohara + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * GNU Zebra 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 diff --git a/lib/pqueue.h b/lib/pqueue.h index b39fb92ee9..d87d91fdc5 100644 --- a/lib/pqueue.h +++ b/lib/pqueue.h @@ -1,22 +1,22 @@ /* Priority queue functions. - Copyright (C) 2003 Yasuhiro Ohara - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2, or (at your -option) any later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + * Copyright (C) 2003 Yasuhiro Ohara + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_PQUEUE_H #define _ZEBRA_PQUEUE_H diff --git a/lib/prefix.c b/lib/prefix.c index 28af2833e0..9c228cf954 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/prefix.h b/lib/prefix.h index 786c2bf7ea..09cb0cab87 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_PREFIX_H diff --git a/lib/privs.c b/lib/privs.c index 767ab667e7..3a66382191 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include "log.h" diff --git a/lib/privs.h b/lib/privs.h index 46d614e008..9a5eb3bd6c 100644 --- a/lib/privs.h +++ b/lib/privs.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_PRIVS_H diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c index a93d7b8476..7181e2d89d 100644 --- a/lib/ptm_lib.c +++ b/lib/ptm_lib.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include diff --git a/lib/ptm_lib.h b/lib/ptm_lib.h index be4170bb37..747ce349ad 100644 --- a/lib/ptm_lib.h +++ b/lib/ptm_lib.h @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __PTM_LIB_H__ #define __PTM_LIB_H__ diff --git a/lib/qobj.c b/lib/qobj.c index 8a386d2486..fd7b4c8c5b 100644 --- a/lib/qobj.c +++ b/lib/qobj.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/routemap.c b/lib/routemap.c index 482155987d..44b3c2bf9f 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1,22 +1,22 @@ /* Route map function. - Copyright (C) 1998, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1998, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/lib/routemap.h b/lib/routemap.h index b378c64eae..f1937ac403 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ROUTEMAP_H diff --git a/lib/sigevent.c b/lib/sigevent.c index a34fd4946e..e8c722b987 100644 --- a/lib/sigevent.c +++ b/lib/sigevent.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/sigevent.h b/lib/sigevent.h index 248fa2c058..08eb1ca412 100644 --- a/lib/sigevent.h +++ b/lib/sigevent.h @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_SIGNAL_H diff --git a/lib/smux.c b/lib/smux.c index 6e53061d45..032801f6df 100644 --- a/lib/smux.c +++ b/lib/smux.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/smux.h b/lib/smux.h index dc91cac71a..e94a7a9cc9 100644 --- a/lib/smux.h +++ b/lib/smux.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_SNMP_H diff --git a/lib/snmp.c b/lib/snmp.c index 1cbd41c720..7eb86e9412 100644 --- a/lib/snmp.c +++ b/lib/snmp.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/sockopt.c b/lib/sockopt.c index 2a9f907cb3..83ea574833 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/sockopt.h b/lib/sockopt.h index 1b7be1e49f..d31fcaa411 100644 --- a/lib/sockopt.h +++ b/lib/sockopt.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_SOCKOPT_H diff --git a/lib/sockunion.c b/lib/sockunion.c index 9ba2ce82f6..423ad20441 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/sockunion.h b/lib/sockunion.h index bed68e1ee1..98c3e0adef 100644 --- a/lib/sockunion.h +++ b/lib/sockunion.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_SOCKUNION_H diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index 9a9af8db20..7e34947344 100644 --- a/lib/spf_backoff.c +++ b/lib/spf_backoff.c @@ -19,10 +19,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/spf_backoff.h b/lib/spf_backoff.h index 552ca4ae41..92bd46506a 100644 --- a/lib/spf_backoff.h +++ b/lib/spf_backoff.h @@ -19,10 +19,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_SPF_BACKOFF_H #define _ZEBRA_SPF_BACKOFF_H diff --git a/lib/srcdest_table.c b/lib/srcdest_table.c index 04c9eff79a..383cf00d4f 100644 --- a/lib/srcdest_table.c +++ b/lib/srcdest_table.c @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/srcdest_table.h b/lib/srcdest_table.h index 207f5d121d..0d858d11ab 100644 --- a/lib/srcdest_table.h +++ b/lib/srcdest_table.h @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_SRC_DEST_TABLE_H diff --git a/lib/stream.c b/lib/stream.c index 32dde1ca0c..e8320a8fa1 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -1,4 +1,4 @@ - /* +/* * Packet interface * Copyright (C) 1999 Kunihiro Ishiguro * @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/stream.h b/lib/stream.h index b7bf31bf7f..dd6aae677d 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_STREAM_H diff --git a/lib/strlcat.c b/lib/strlcat.c index 1d04b43d95..6fdb2a4a37 100644 --- a/lib/strlcat.c +++ b/lib/strlcat.c @@ -1,20 +1,21 @@ /* Append a null-terminated string to another string, with length checking. - Copyright (C) 2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ + * Copyright (C) 2016 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, see + * . + */ /* adapted for Quagga from glibc patch submission originally from * Florian Weimer , 2016-05-18 */ diff --git a/lib/strlcpy.c b/lib/strlcpy.c index 41bab97ea7..112c8180b9 100644 --- a/lib/strlcpy.c +++ b/lib/strlcpy.c @@ -1,20 +1,21 @@ /* Copy a null-terminated string to a fixed-size buffer, with length checking. - Copyright (C) 2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ + * Copyright (C) 2016 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, see + * . + */ /* adapted for Quagga from glibc patch submission originally from * Florian Weimer , 2016-05-18 */ diff --git a/lib/systemd.c b/lib/systemd.c index e2329af93a..341de9eabe 100644 --- a/lib/systemd.c +++ b/lib/systemd.c @@ -1,23 +1,23 @@ /* lib/systemd Code - Copyright (C) 2016 Cumulus Networks, Inc. - Donald Sharp - -This file is part of Quagga. - -Quagga is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -Quagga 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 Quagga; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 Cumulus Networks, Inc. + * Donald Sharp + * + * This file is part of Quagga. + * + * Quagga is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * Quagga 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 diff --git a/lib/systemd.h b/lib/systemd.h index 685f3d9a77..c048797cf2 100644 --- a/lib/systemd.h +++ b/lib/systemd.h @@ -1,23 +1,23 @@ /* lib/systemd Code - Copyright (C) 2016 Cumulus Networks, Inc. - Donald Sharp - -This file is part of Quagga. - -Quagga is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -Quagga 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 Quagga; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2016 Cumulus Networks, Inc. + * Donald Sharp + * + * This file is part of Quagga. + * + * Quagga is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * Quagga 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 + */ /* * Wrapper functions to systemd calls. diff --git a/lib/table.c b/lib/table.c index 7f789dd3cd..1461bb81a4 100644 --- a/lib/table.c +++ b/lib/table.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/table.h b/lib/table.h index 1691a8e20a..00131b29c6 100644 --- a/lib/table.h +++ b/lib/table.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_TABLE_H diff --git a/lib/thread.c b/lib/thread.c index aef9ac5cf9..072fcc65d7 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* #define DEBUG */ diff --git a/lib/thread.h b/lib/thread.h index 3eaae8883b..bc65b4fdc9 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_THREAD_H diff --git a/lib/vector.c b/lib/vector.c index e16fcf5315..110cd2915c 100644 --- a/lib/vector.c +++ b/lib/vector.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/vector.h b/lib/vector.h index f57f28bbd0..ab1d1e6aac 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_VECTOR_H diff --git a/lib/vrf.c b/lib/vrf.c index ce57bb6e7a..2569d9069c 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/lib/vrf.h b/lib/vrf.h index f8bb07ef48..fe6f01dcb4 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_VRF_H diff --git a/lib/vty.c b/lib/vty.c index e490d30a8a..45d475d7eb 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/vty.h b/lib/vty.h index 0ac73d95be..77edc7173a 100644 --- a/lib/vty.h +++ b/lib/vty.h @@ -1,22 +1,22 @@ /* Virtual terminal [aka TeletYpe] interface routine - Copyright (C) 1997 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1997 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_VTY_H #define _ZEBRA_VTY_H diff --git a/lib/wheel.c b/lib/wheel.c index 9bcb1b8743..f273a29262 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -13,10 +13,9 @@ * 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 + * 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" #include "linklist.h" diff --git a/lib/wheel.h b/lib/wheel.h index 79d21e124b..07be79bf26 100644 --- a/lib/wheel.h +++ b/lib/wheel.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef __WHEEL_H__ #define __WHEEL_H__ diff --git a/lib/workqueue.c b/lib/workqueue.c index e997e61b32..f992588399 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/lib/workqueue.h b/lib/workqueue.h index 548f96d8b0..45f02afc63 100644 --- a/lib/workqueue.h +++ b/lib/workqueue.h @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_WORK_QUEUE_H diff --git a/lib/zassert.h b/lib/zassert.h index bf0a851ba8..082ad67897 100644 --- a/lib/zassert.h +++ b/lib/zassert.h @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_ASSERT_H diff --git a/lib/zclient.c b/lib/zclient.c index 1d3c93d85d..650a375035 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * 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 diff --git a/lib/zclient.h b/lib/zclient.h index a54bf420d3..847ac3b671 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -7,16 +7,15 @@ * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * + * 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 */ #ifndef _ZEBRA_ZCLIENT_H diff --git a/lib/zebra.h b/lib/zebra.h index 0cc81bdb70..0a61c433d9 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -1,22 +1,22 @@ /* Zebra common header. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 + */ #ifndef _ZEBRA_H #define _ZEBRA_H diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 2e31535d24..7ef7fdd94a 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_abr.h b/ospf6d/ospf6_abr.h index 5bc2469e10..55d657cfc6 100644 --- a/ospf6d/ospf6_abr.h +++ b/ospf6d/ospf6_abr.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_ABR_H diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 198526a0eb..7c66cbdc7f 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h index 3b752d948c..8e2368b166 100644 --- a/ospf6d/ospf6_area.h +++ b/ospf6d/ospf6_area.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF_AREA_H diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index da90e2f966..302d8c9865 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_asbr.h b/ospf6d/ospf6_asbr.h index da6bbdd9c3..aaa3c72a44 100644 --- a/ospf6d/ospf6_asbr.h +++ b/ospf6d/ospf6_asbr.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_ASBR_H diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index 3bc55441c8..7d9abe2331 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_bfd.h b/ospf6d/ospf6_bfd.h index 9c3b57aa24..913f7dcf44 100644 --- a/ospf6d/ospf6_bfd.h +++ b/ospf6d/ospf6_bfd.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef OSPF6_BFD_H diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index eb51e353c5..8a8dcfcd20 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_flood.h b/ospf6d/ospf6_flood.h index ba7fd25f93..72482cadf3 100644 --- a/ospf6d/ospf6_flood.h +++ b/ospf6d/ospf6_flood.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_FLOOD_H diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 758688c601..111ca3f3d2 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index 846cde4191..0408fc69d6 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_INTERFACE_H diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 6461963856..92db9cd117 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index 9975bbd627..1147848354 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_INTRA_H diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 38229541ac..36c3d825c5 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index a95891ac5a..36cf559868 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_LSA_H diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c index 1d4b557cd5..cb522226ac 100644 --- a/ospf6d/ospf6_lsdb.c +++ b/ospf6d/ospf6_lsdb.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_lsdb.h b/ospf6d/ospf6_lsdb.h index b21d9ee282..866868080a 100644 --- a/ospf6d/ospf6_lsdb.h +++ b/ospf6d/ospf6_lsdb.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_LSDB_H diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 54ae4645ad..baecf79817 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_memory.c b/ospf6d/ospf6_memory.c index 7f2fbbf0b7..35d03f7e44 100644 --- a/ospf6d/ospf6_memory.c +++ b/ospf6d/ospf6_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/ospf6d/ospf6_memory.h b/ospf6d/ospf6_memory.h index 3ff5de4c31..324065c3a1 100644 --- a/ospf6d/ospf6_memory.h +++ b/ospf6d/ospf6_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_OSPF6_MEMORY_H diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 6746b8104f..87c905af3f 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h index 4a9e0c7a66..b0107dffff 100644 --- a/ospf6d/ospf6_message.h +++ b/ospf6d/ospf6_message.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_MESSAGE_H diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 09d3a523a3..c58922b0ea 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h index c275ff830e..3ff341933a 100644 --- a/ospf6d/ospf6_neighbor.h +++ b/ospf6d/ospf6_neighbor.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_NEIGHBOR_H diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 0217d66038..9e7dd06bd8 100644 --- a/ospf6d/ospf6_network.c +++ b/ospf6d/ospf6_network.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h index 4fa2839519..690901ca04 100644 --- a/ospf6d/ospf6_network.h +++ b/ospf6d/ospf6_network.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_NETWORK_H diff --git a/ospf6d/ospf6_proto.c b/ospf6d/ospf6_proto.c index d011601f07..1538c891ca 100644 --- a/ospf6d/ospf6_proto.c +++ b/ospf6d/ospf6_proto.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_proto.h b/ospf6d/ospf6_proto.h index af60eb922e..e4f29aa3e8 100644 --- a/ospf6d/ospf6_proto.h +++ b/ospf6d/ospf6_proto.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_PROTO_H diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index b8e5ca6196..117f7af6ee 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index 8b973d28ff..7cf69a26e7 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_ROUTE_H diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c index 96f1e3dd21..b30d3efb06 100644 --- a/ospf6d/ospf6_snmp.c +++ b/ospf6d/ospf6_snmp.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 6a10ba7ad5..e7cfd3fc9a 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ /* Shortest Path First calculation for OSPFv3 */ diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h index 7bf525d6fe..87a86c0ac8 100644 --- a/ospf6d/ospf6_spf.h +++ b/ospf6d/ospf6_spf.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_SPF_H diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 85f7e0ce3a..bafe86bff4 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h index 42a4d12483..5e101520d7 100644 --- a/ospf6d/ospf6_top.h +++ b/ospf6d/ospf6_top.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_TOP_H diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index d0c9e4f042..fdf2f299cb 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h index 83032b64b1..f7f808c866 100644 --- a/ospf6d/ospf6_zebra.h +++ b/ospf6d/ospf6_zebra.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6_ZEBRA_H diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 7933975707..1ccf7ce7a9 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index f0bc022749..6595e70455 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef OSPF6D_H diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c index c545d537fc..0ebae087e3 100644 --- a/ospfclient/ospf_apiclient.c +++ b/ospfclient/ospf_apiclient.c @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002, 2003 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfclient/ospf_apiclient.h b/ospfclient/ospf_apiclient.h index 5a1de3b136..5882ac3496 100644 --- a/ospfclient/ospf_apiclient.h +++ b/ospfclient/ospf_apiclient.h @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002, 2003 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _OSPF_APICLIENT_H diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c index 1c2ec7d1cc..195fd5b5a0 100644 --- a/ospfclient/ospfclient.c +++ b/ospfclient/ospfclient.c @@ -10,10 +10,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index ee90ceccf9..53f6f3ce64 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -8,16 +8,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * + * 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 */ diff --git a/ospfd/ospf_abr.h b/ospfd/ospf_abr.h index 2a728936d3..71eb71bdce 100644 --- a/ospfd/ospf_abr.h +++ b/ospfd/ospf_abr.h @@ -3,21 +3,20 @@ * Copyright (C) 1999 Alex Zinin * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ABR_H diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c index 9f90f671ce..69d61b12eb 100644 --- a/ospfd/ospf_api.c +++ b/ospfd/ospf_api.c @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_api.h b/ospfd/ospf_api.h index eb5ad0aae5..ee18c89346 100644 --- a/ospfd/ospf_api.h +++ b/ospfd/ospf_api.h @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index 633b22346d..40ff0c7a07 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_apiserver.h b/ospfd/ospf_apiserver.h index b60f56b4fc..2fd8e7a373 100644 --- a/ospfd/ospf_apiserver.h +++ b/ospfd/ospf_apiserver.h @@ -3,7 +3,7 @@ * Copyright (C) 2001, 2002 Ralph Keller * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _OSPF_APISERVER_H diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index 284c564688..2ba3b55335 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h index e2fa367455..2fd570d1b8 100644 --- a/ospfd/ospf_asbr.h +++ b/ospfd/ospf_asbr.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ASBR_H diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c index a30df19937..b7cba7fd7b 100644 --- a/ospfd/ospf_ase.c +++ b/ospfd/ospf_ase.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_ase.h b/ospfd/ospf_ase.h index e6a1b2fb7a..d73322fcac 100644 --- a/ospfd/ospf_ase.h +++ b/ospfd/ospf_ase.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ASE_H diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index 74bc38220b..05265171a1 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_bfd.h b/ospfd/ospf_bfd.h index 793962dae3..75b8e11f48 100644 --- a/ospfd/ospf_bfd.h +++ b/ospfd/ospf_bfd.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_BFD_H diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 21b2855499..469b661059 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h index 9bed853eed..94918c2656 100644 --- a/ospfd/ospf_dump.h +++ b/ospfd/ospf_dump.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_DUMP_H diff --git a/ospfd/ospf_dump_api.c b/ospfd/ospf_dump_api.c index 5ef262ce54..54cc7fb666 100644 --- a/ospfd/ospf_dump_api.c +++ b/ospfd/ospf_dump_api.c @@ -14,8 +14,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_dump_api.h b/ospfd/ospf_dump_api.h index 1cd8257f0c..836d234551 100644 --- a/ospfd/ospf_dump_api.h +++ b/ospfd/ospf_dump_api.h @@ -14,8 +14,8 @@ * details. * * You should have received a copy of the GNU General Public License along - * with FRR; see the file COPYING. If not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_DUMP_API_H diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 4cc28f7486..00004a1efd 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -3,7 +3,7 @@ * Copyright (C) 1999, 2000 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_flood.h b/ospfd/ospf_flood.h index 1ab11b88b1..b083857546 100644 --- a/ospfd/ospf_flood.h +++ b/ospfd/ospf_flood.h @@ -3,7 +3,7 @@ * Copyright (C) 1999, 2000 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_FLOOD_H diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index b2d0faeb79..ebd267ded9 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ diff --git a/ospfd/ospf_ia.h b/ospfd/ospf_ia.h index b65b938642..f102545f80 100644 --- a/ospfd/ospf_ia.h +++ b/ospfd/ospf_ia.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_IA_H diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index aeb12a59fa..08f3bec479 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -3,7 +3,7 @@ * Copyright (C) 1999, 2000 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 39202f777a..e6e7ddf80a 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -3,7 +3,7 @@ * Copyright (C) 1999 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_INTERFACE_H diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c index 717c99c21f..2a1f7bb32d 100644 --- a/ospfd/ospf_ism.c +++ b/ospfd/ospf_ism.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h index 180000ae97..f099fe8759 100644 --- a/ospfd/ospf_ism.h +++ b/ospfd/ospf_ism.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ISM_H diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 9067acb7f5..acbb2bb079 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h index 8b9a0d4c49..b6f2526c90 100644 --- a/ospfd/ospf_lsa.h +++ b/ospfd/ospf_lsa.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_LSA_H diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c index b92e7494ad..ac22f5bbe4 100644 --- a/ospfd/ospf_lsdb.c +++ b/ospfd/ospf_lsdb.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_lsdb.h b/ospfd/ospf_lsdb.h index 51ae45bf5b..ee31cda659 100644 --- a/ospfd/ospf_lsdb.h +++ b/ospfd/ospf_lsdb.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_LSDB_H diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 38718b35d5..a56272356b 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_memory.c b/ospfd/ospf_memory.c index 0181e1e1fe..5639c0f607 100644 --- a/ospfd/ospf_memory.c +++ b/ospfd/ospf_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/ospfd/ospf_memory.h b/ospfd/ospf_memory.h index b082c95031..5f5960eec7 100644 --- a/ospfd/ospf_memory.h +++ b/ospfd/ospf_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_OSPF_MEMORY_H diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c index a573936c18..fc86cd09f4 100644 --- a/ospfd/ospf_neighbor.c +++ b/ospfd/ospf_neighbor.c @@ -3,7 +3,7 @@ * Copyright (C) 1999, 2000 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_neighbor.h b/ospfd/ospf_neighbor.h index d62de44b5e..70e3832d9f 100644 --- a/ospfd/ospf_neighbor.h +++ b/ospfd/ospf_neighbor.h @@ -3,7 +3,7 @@ * Copyright (C) 1999, 2000 Toshiaki Takada * * This file is part of GNU Zebra. - * + * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_NEIGHBOR_H diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index d7ec256214..0f5785966f 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_network.h b/ospfd/ospf_network.h index bc01a84325..506a419058 100644 --- a/ospfd/ospf_network.h +++ b/ospfd/ospf_network.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_NETWORK_H diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 97f3f6a382..b3888dd832 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_nsm.h b/ospfd/ospf_nsm.h index 2bd8f065cf..4f363b4e66 100644 --- a/ospfd/ospf_nsm.h +++ b/ospfd/ospf_nsm.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_NSM_H diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index af22d0f29a..fa87434a14 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -9,16 +9,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index 2ac9b41efc..69cbb07663 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -9,16 +9,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_OPAQUE_H diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 8446ebcea7..11434071ad 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_packet.h b/ospfd/ospf_packet.h index 60761322df..ebc5d892dd 100644 --- a/ospfd/ospf_packet.h +++ b/ospfd/ospf_packet.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_PACKET_H diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 883ea7cad9..4723f4a919 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -19,10 +19,9 @@ * 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 GNU Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_ri.h b/ospfd/ospf_ri.h index 3f898ac598..c9ed3c56a5 100644 --- a/ospfd/ospf_ri.h +++ b/ospfd/ospf_ri.h @@ -19,10 +19,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ROUTER_INFO_H diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index 175850c318..fcd5f18a7f 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h index 6b6d9f1fab..16c6b0000c 100644 --- a/ospfd/ospf_route.h +++ b/ospfd/ospf_route.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ROUTE_H diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index db51abca23..e2656e5169 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 32449d5597..e952df4eb3 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 3d8d7f8e03..e0fa23f35f 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1,22 +1,22 @@ /* OSPF SPF calculation. - Copyright (C) 1999, 2000 Kunihiro Ishiguro, Toshiaki Takada - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999, 2000 Kunihiro Ishiguro, Toshiaki Takada + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h index e33b3e5f53..349f461c9b 100644 --- a/ospfd/ospf_spf.h +++ b/ospfd/ospf_spf.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_OSPF_SPF_H diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index a89d67c6bb..804b1fb652 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -12,16 +12,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* Add support of RFC7471 */ diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h index 36f2d8241c..885180bc1d 100644 --- a/ospfd/ospf_te.h +++ b/ospfd/ospf_te.h @@ -12,16 +12,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* Add support of RFC7471 */ diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4a7dbb9541..e989f8123a 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_vty.h b/ospfd/ospf_vty.h index 429ac318f7..57090e9b15 100644 --- a/ospfd/ospf_vty.h +++ b/ospfd/ospf_vty.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_OSPF_VTY_H diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index c22793a098..4df49db9b2 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/ospfd/ospf_zebra.h b/ospfd/ospf_zebra.h index 22c71a49e1..c0b99a95ae 100644 --- a/ospfd/ospf_zebra.h +++ b/ospfd/ospf_zebra.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPF_ZEBRA_H diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 0c3230d367..0c98c428f5 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -1,22 +1,22 @@ /* OSPF version 2 daemon program. - Copyright (C) 1999, 2000 Toshiaki Takada - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1999, 2000 Toshiaki Takada + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index c5b0324b86..7cc629196b 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -8,16 +8,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. - * + * * GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_OSPFD_H diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c index a11cce9433..37515cee59 100644 --- a/pimd/pim_assert.c +++ b/pimd/pim_assert.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_assert.h b/pimd/pim_assert.h index ec18cab85e..b2fc115231 100644 --- a/pimd/pim_assert.h +++ b/pimd/pim_assert.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_ASSERT_H #define PIM_ASSERT_H diff --git a/pimd/pim_br.c b/pimd/pim_br.c index 3f84de79c8..19a0293c46 100644 --- a/pimd/pim_br.c +++ b/pimd/pim_br.c @@ -13,10 +13,9 @@ * 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 + * 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 diff --git a/pimd/pim_br.h b/pimd/pim_br.h index 8e4f719ed0..345dd011e8 100644 --- a/pimd/pim_br.h +++ b/pimd/pim_br.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef PIM_BR_H #define PIM_BR_H diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index c6e9ae0c37..3d816dd37e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_cmd.h b/pimd/pim_cmd.h index e08cefb29b..64751d8682 100644 --- a/pimd/pim_cmd.h +++ b/pimd/pim_cmd.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_CMD_H #define PIM_CMD_H diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c index ee9433d797..0c08cfa46d 100644 --- a/pimd/pim_hello.c +++ b/pimd/pim_hello.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_hello.h b/pimd/pim_hello.h index 1f8b348bd7..ff799b20f8 100644 --- a/pimd/pim_hello.h +++ b/pimd/pim_hello.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_HELLO_H #define PIM_HELLO_H diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 48a59344eb..84bbedad4b 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1,21 +1,20 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h index 3c353b0497..fa623d45b4 100644 --- a/pimd/pim_iface.h +++ b/pimd/pim_iface.h @@ -1,21 +1,20 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 */ #ifndef PIM_IFACE_H diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 9f98631335..77ff2aaa4e 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_ifchannel.h b/pimd/pim_ifchannel.h index 3ffb9190fb..e8c2ddd072 100644 --- a/pimd/pim_ifchannel.h +++ b/pimd/pim_ifchannel.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_IFCHANNEL_H #define PIM_IFCHANNEL_H diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index af0ddef232..66dfc069c9 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_igmp.h b/pimd/pim_igmp.h index 9c569bbd20..2f36094bd3 100644 --- a/pimd/pim_igmp.h +++ b/pimd/pim_igmp.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_IGMP_H #define PIM_IGMP_H diff --git a/pimd/pim_igmp_join.h b/pimd/pim_igmp_join.h index 228d30c5c4..31fc1b0471 100644 --- a/pimd/pim_igmp_join.h +++ b/pimd/pim_igmp_join.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_IGMP_JOIN_H #define PIM_IGMP_JOIN_H diff --git a/pimd/pim_igmpv2.c b/pimd/pim_igmpv2.c index ee4aa7bd9d..d4b3010d3c 100644 --- a/pimd/pim_igmpv2.c +++ b/pimd/pim_igmpv2.c @@ -13,10 +13,9 @@ * 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 + * 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" diff --git a/pimd/pim_igmpv2.h b/pimd/pim_igmpv2.h index 10a2477724..fa8d163944 100644 --- a/pimd/pim_igmpv2.h +++ b/pimd/pim_igmpv2.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef PIM_IGMPV2_H diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index e0b1d3fc2a..51db9ac3b7 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 #include "log.h" diff --git a/pimd/pim_igmpv3.h b/pimd/pim_igmpv3.h index 3a4a81d97e..99f7b84b81 100644 --- a/pimd/pim_igmpv3.h +++ b/pimd/pim_igmpv3.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_IGMPV3_H #define PIM_IGMPV3_H diff --git a/pimd/pim_int.c b/pimd/pim_int.c index 44b8386a3d..577bf15c6a 100644 --- a/pimd/pim_int.c +++ b/pimd/pim_int.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_int.h b/pimd/pim_int.h index a6349b5b3d..54623ed218 100644 --- a/pimd/pim_int.h +++ b/pimd/pim_int.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_INT_H #define PIM_INT_H diff --git a/pimd/pim_join.c b/pimd/pim_join.c index ae7fedc62b..5462dba61d 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_join.h b/pimd/pim_join.h index adedde3cf8..6dc1b3e8f1 100644 --- a/pimd/pim_join.h +++ b/pimd/pim_join.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_JOIN_H #define PIM_JOIN_H diff --git a/pimd/pim_jp_agg.c b/pimd/pim_jp_agg.c index 46c6cbc690..25530f40b9 100644 --- a/pimd/pim_jp_agg.c +++ b/pimd/pim_jp_agg.c @@ -13,10 +13,9 @@ * 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 + * 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 diff --git a/pimd/pim_jp_agg.h b/pimd/pim_jp_agg.h index ad014d9520..c3955f32f4 100644 --- a/pimd/pim_jp_agg.h +++ b/pimd/pim_jp_agg.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef __PIM_JP_AGG_H__ #define __PIM_JP_AGG_H__ diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c index 127e0f6252..1f3b29554f 100644 --- a/pimd/pim_macro.c +++ b/pimd/pim_macro.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_macro.h b/pimd/pim_macro.h index 3079ca80cc..e07b2ece94 100644 --- a/pimd/pim_macro.h +++ b/pimd/pim_macro.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_MACRO_H #define PIM_MACRO_H diff --git a/pimd/pim_main.c b/pimd/pim_main.c index d814af6b2c..19dcd3aa9a 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_memory.c b/pimd/pim_memory.c index ab92665b97..d18b7f0c8e 100644 --- a/pimd/pim_memory.c +++ b/pimd/pim_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/pimd/pim_memory.h b/pimd/pim_memory.h index e366377c87..01189aca76 100644 --- a/pimd/pim_memory.h +++ b/pimd/pim_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_PIM_MEMORY_H diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 76851fa810..c3d68e24d4 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 #include "log.h" diff --git a/pimd/pim_mroute.h b/pimd/pim_mroute.h index 3c15c800da..36dce8e610 100644 --- a/pimd/pim_mroute.h +++ b/pimd/pim_mroute.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_MROUTE_H #define PIM_MROUTE_H diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 06cc24ddba..001e080d5d 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -12,10 +12,9 @@ * 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 + * 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 diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h index 57a7c22440..308b437a63 100644 --- a/pimd/pim_msdp.h +++ b/pimd/pim_msdp.h @@ -12,10 +12,9 @@ * 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 + * 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 */ #ifndef PIM_MSDP_H #define PIM_MSDP_H diff --git a/pimd/pim_msdp_packet.c b/pimd/pim_msdp_packet.c index fbf34cd91c..0a8679336a 100644 --- a/pimd/pim_msdp_packet.c +++ b/pimd/pim_msdp_packet.c @@ -12,10 +12,9 @@ * 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 + * 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 diff --git a/pimd/pim_msdp_packet.h b/pimd/pim_msdp_packet.h index f6fcfee6bb..aa42bbfe4b 100644 --- a/pimd/pim_msdp_packet.h +++ b/pimd/pim_msdp_packet.h @@ -12,10 +12,9 @@ * 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 + * 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 */ #ifndef PIM_MSDP_PACKET_H #define PIM_MSDP_PACKET_H diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c index 8ceddfa39d..9662f054e8 100644 --- a/pimd/pim_msdp_socket.c +++ b/pimd/pim_msdp_socket.c @@ -12,10 +12,9 @@ * 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 + * 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 diff --git a/pimd/pim_msdp_socket.h b/pimd/pim_msdp_socket.h index bf3d12ad2c..0abcd57da0 100644 --- a/pimd/pim_msdp_socket.h +++ b/pimd/pim_msdp_socket.h @@ -12,10 +12,9 @@ * 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 + * 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 */ #ifndef PIM_MSDP_SOCKET_H #define PIM_MSDP_SOCKET_H diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index a9e0130905..e077a85168 100644 --- a/pimd/pim_msg.c +++ b/pimd/pim_msg.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_msg.h b/pimd/pim_msg.h index e5676289b7..38ffaf6a7d 100644 --- a/pimd/pim_msg.h +++ b/pimd/pim_msg.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_MSG_H #define PIM_MSG_H diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 5dccc3cfb7..00190bd830 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_neighbor.h b/pimd/pim_neighbor.h index e27920fdd8..a3d39d2622 100644 --- a/pimd/pim_neighbor.h +++ b/pimd/pim_neighbor.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_NEIGHBOR_H #define PIM_NEIGHBOR_H diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index c5f8d1d826..f69165ef7f 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -13,10 +13,9 @@ * 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 + * 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 #include "network.h" diff --git a/pimd/pim_nht.h b/pimd/pim_nht.h index 0ccc5399c3..6bd2249928 100644 --- a/pimd/pim_nht.h +++ b/pimd/pim_nht.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef PIM_NHT_H #define PIM_NHT_H diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index 7f5f3970ae..71ca576d93 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_oil.h b/pimd/pim_oil.h index a7bb23cd0e..02c7e740ef 100644 --- a/pimd/pim_oil.h +++ b/pimd/pim_oil.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_OIL_H #define PIM_OIL_H diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 57b9e6c793..2a2f3060ab 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_pim.h b/pimd/pim_pim.h index 690b6c05cd..7e2872184a 100644 --- a/pimd/pim_pim.h +++ b/pimd/pim_pim.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_PIM_H #define PIM_PIM_H diff --git a/pimd/pim_register.c b/pimd/pim_register.c index f23993625d..f631632484 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -13,10 +13,9 @@ * 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 + * 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 diff --git a/pimd/pim_register.h b/pimd/pim_register.h index 210a904ae9..adb703c611 100644 --- a/pimd/pim_register.h +++ b/pimd/pim_register.h @@ -13,10 +13,9 @@ * 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 + * 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 */ #ifndef PIM_REGISTER_H #define PIM_REGISTER_H diff --git a/pimd/pim_routemap.c b/pimd/pim_routemap.c index a8525b690e..20c716c3e9 100644 --- a/pimd/pim_routemap.c +++ b/pimd/pim_routemap.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index cdc760e92d..d3d9beb053 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -12,11 +12,10 @@ * 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 + * + * 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 diff --git a/pimd/pim_rp.h b/pimd/pim_rp.h index df18c998d6..319fe573ca 100644 --- a/pimd/pim_rp.h +++ b/pimd/pim_rp.h @@ -12,11 +12,10 @@ * 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 + * + * 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 */ #ifndef PIM_RP_H #define PIM_RP_H diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c index f46ebfb979..3e72d8df21 100644 --- a/pimd/pim_rpf.c +++ b/pimd/pim_rpf.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_rpf.h b/pimd/pim_rpf.h index 85fb1ed897..bb7ee365b1 100644 --- a/pimd/pim_rpf.h +++ b/pimd/pim_rpf.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_RPF_H #define PIM_RPF_H diff --git a/pimd/pim_signals.c b/pimd/pim_signals.c index 053ef6a67b..ef492d0d83 100644 --- a/pimd/pim_signals.c +++ b/pimd/pim_signals.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_signals.h b/pimd/pim_signals.h index d7a4926d4d..a82915691b 100644 --- a/pimd/pim_signals.h +++ b/pimd/pim_signals.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_SIGNALS_H #define PIM_SIGNALS_H diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 07b137bb51..ba70cf2e11 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_sock.h b/pimd/pim_sock.h index b4ce901d10..9fb64677c8 100644 --- a/pimd/pim_sock.h +++ b/pimd/pim_sock.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_SOCK_H #define PIM_SOCK_H diff --git a/pimd/pim_ssm.c b/pimd/pim_ssm.c index 41bf1e5668..d4f88ec2c1 100644 --- a/pimd/pim_ssm.c +++ b/pimd/pim_ssm.c @@ -12,10 +12,9 @@ * 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 + * 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 diff --git a/pimd/pim_ssm.h b/pimd/pim_ssm.h index ca82d334f1..fe337be8f1 100644 --- a/pimd/pim_ssm.h +++ b/pimd/pim_ssm.h @@ -12,10 +12,9 @@ * 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 + * 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 */ #ifndef PIM_SSM_H #define PIM_SSM_H diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index eda044f184..1249e0ee57 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_ssmpingd.h b/pimd/pim_ssmpingd.h index 54f787e2a3..02aa6271ca 100644 --- a/pimd/pim_ssmpingd.h +++ b/pimd/pim_ssmpingd.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_SSMPINGD_H #define PIM_SSMPINGD_H diff --git a/pimd/pim_static.c b/pimd/pim_static.c index daaa95ab57..63762ef327 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -1,22 +1,21 @@ /* - PIM for Quagga: add the ability to configure multicast static routes - Copyright (C) 2014 Nathan Bahr, ATCorp - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga: add the ability to configure multicast static routes + * Copyright (C) 2014 Nathan Bahr, ATCorp + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_static.h b/pimd/pim_static.h index c288aa7ff4..4b5ef7921d 100644 --- a/pimd/pim_static.h +++ b/pimd/pim_static.h @@ -1,22 +1,21 @@ /* - PIM for Quagga: add the ability to configure multicast static routes - Copyright (C) 2014 Nathan Bahr, ATCorp - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga: add the ability to configure multicast static routes + * Copyright (C) 2014 Nathan Bahr, ATCorp + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_STATIC_H_ #define PIM_STATIC_H_ diff --git a/pimd/pim_str.c b/pimd/pim_str.c index 83f2a635b3..d1219a8681 100644 --- a/pimd/pim_str.c +++ b/pimd/pim_str.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_str.h b/pimd/pim_str.h index 97263e6a37..0ca517102a 100644 --- a/pimd/pim_str.h +++ b/pimd/pim_str.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_STR_H #define PIM_STR_H diff --git a/pimd/pim_time.c b/pimd/pim_time.c index 348793cd0b..406fec58d3 100644 --- a/pimd/pim_time.c +++ b/pimd/pim_time.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_time.h b/pimd/pim_time.h index de304a9f71..5d02d6efc4 100644 --- a/pimd/pim_time.h +++ b/pimd/pim_time.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_TIME_H #define PIM_TIME_H diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c index 259ed44c71..550fdde8eb 100644 --- a/pimd/pim_tlv.c +++ b/pimd/pim_tlv.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_tlv.h b/pimd/pim_tlv.h index 7e0a8a147f..f80e1fba27 100644 --- a/pimd/pim_tlv.h +++ b/pimd/pim_tlv.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_TLV_H #define PIM_TLV_H diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 88b6694147..c139c91a8c 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index f1c8df35b1..1de8adcc02 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_UPSTREAM_H #define PIM_UPSTREAM_H diff --git a/pimd/pim_util.c b/pimd/pim_util.c index 1125db00a9..139c0e3fb1 100644 --- a/pimd/pim_util.c +++ b/pimd/pim_util.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_util.h b/pimd/pim_util.h index 94635466d9..4788005206 100644 --- a/pimd/pim_util.h +++ b/pimd/pim_util.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_UTIL_H #define PIM_UTIL_H diff --git a/pimd/pim_version.c b/pimd/pim_version.c index a43c27d5b5..1da4b9663f 100644 --- a/pimd/pim_version.c +++ b/pimd/pim_version.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_version.h b/pimd/pim_version.h index 64e07862d6..589c6f68a5 100644 --- a/pimd/pim_version.h +++ b/pimd/pim_version.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_VERSION_H #define PIM_VERSION_H diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 2d502d9aa9..daea6152c2 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_vty.h b/pimd/pim_vty.h index 18a632e016..54bab623dc 100644 --- a/pimd/pim_vty.h +++ b/pimd/pim_vty.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_VTY_H #define PIM_VTY_H diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 62be3a69dd..4506e8cdb5 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pim_zebra.h b/pimd/pim_zebra.h index 2ed463efaa..37024073ea 100644 --- a/pimd/pim_zebra.h +++ b/pimd/pim_zebra.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_ZEBRA_H #define PIM_ZEBRA_H diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 16dbb3ef56..9c26745e77 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 #include "zebra/rib.h" diff --git a/pimd/pim_zlookup.h b/pimd/pim_zlookup.h index 34b1434c66..08c8768d14 100644 --- a/pimd/pim_zlookup.h +++ b/pimd/pim_zlookup.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIM_ZLOOKUP_H #define PIM_ZLOOKUP_H diff --git a/pimd/pimd.c b/pimd/pimd.c index fc6663776b..8b6fa6714d 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/pimd/pimd.h b/pimd/pimd.h index e10155c209..ec98c5bfd1 100644 --- a/pimd/pimd.h +++ b/pimd/pimd.h @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ #ifndef PIMD_H #define PIMD_H diff --git a/pimd/test_igmpv3_join.c b/pimd/test_igmpv3_join.c index 29143f362e..f363152ad4 100644 --- a/pimd/test_igmpv3_join.c +++ b/pimd/test_igmpv3_join.c @@ -1,22 +1,21 @@ /* - PIM for Quagga - Copyright (C) 2008 Everton da Silva Marques - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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 -*/ + * PIM for Quagga + * Copyright (C) 2008 Everton da Silva Marques + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/qpb/linear_allocator.h b/qpb/linear_allocator.h index e3ebbc64f3..273bc7369d 100644 --- a/qpb/linear_allocator.h +++ b/qpb/linear_allocator.h @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/qpb/qpb.c b/qpb/qpb.c index 1b2b47fce5..9c47a80d28 100644 --- a/qpb/qpb.c +++ b/qpb/qpb.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/qpb/qpb.h b/qpb/qpb.h index ad5bdc8b8e..f5d00900f7 100644 --- a/qpb/qpb.h +++ b/qpb/qpb.h @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/qpb/qpb_allocator.c b/qpb/qpb_allocator.c index 4b4830a476..ae48d55891 100644 --- a/qpb/qpb_allocator.c +++ b/qpb/qpb_allocator.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 "linear_allocator.h" diff --git a/qpb/qpb_allocator.h b/qpb/qpb_allocator.h index bb7dcf38f3..bdf2dc0e7f 100644 --- a/qpb/qpb_allocator.h +++ b/qpb/qpb_allocator.h @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index fbf2262b8c..35d5d9b825 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_debug.h b/ripd/rip_debug.h index 990ec908a8..e1dcd2fa7a 100644 --- a/ripd/rip_debug.h +++ b/ripd/rip_debug.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIP_DEBUG_H diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 57c49c6313..fce5d97dc2 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_interface.h b/ripd/rip_interface.h index d9dfbb7cc3..9513bafc22 100644 --- a/ripd/rip_interface.h +++ b/ripd/rip_interface.h @@ -12,10 +12,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_RIP_INTERFACE_H diff --git a/ripd/rip_main.c b/ripd/rip_main.c index 62ea6dd078..0958800d89 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_memory.c b/ripd/rip_memory.c index d2a958064f..662a6ccedd 100644 --- a/ripd/rip_memory.c +++ b/ripd/rip_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/ripd/rip_memory.h b/ripd/rip_memory.h index 7aec219305..57abedd3aa 100644 --- a/ripd/rip_memory.h +++ b/ripd/rip_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_RIP_MEMORY_H diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c index 5e0e71579a..76f3cec66d 100644 --- a/ripd/rip_offset.c +++ b/ripd/rip_offset.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index 2477740b9b..464c3f4dd3 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index baba9592e0..3f1495c0f0 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index 06cd3cef6c..6a4ae11ae1 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 578c513c78..3b3fc9494c 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/ripd.c b/ripd/ripd.c index 4a42aff78f..58c8aed130 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripd/ripd.h b/ripd/ripd.h index aad0c2f112..d52df0d992 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIP_H diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 16c8b3400d..372ab85e67 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripng_debug.h b/ripngd/ripng_debug.h index 674345c0b9..b4e1455ad7 100644 --- a/ripngd/ripng_debug.h +++ b/ripngd/ripng_debug.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIPNG_DEBUG_H diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index dbffa1a88a..81b68ad9d7 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index 9d97df5c41..ef4ab85520 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripng_memory.c b/ripngd/ripng_memory.c index 1d2320ee26..60fb1751d7 100644 --- a/ripngd/ripng_memory.c +++ b/ripngd/ripng_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/ripngd/ripng_memory.h b/ripngd/ripng_memory.h index 76b830afb4..a4102086c7 100644 --- a/ripngd/ripng_memory.h +++ b/ripngd/ripng_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_RIPNG_MEMORY_H diff --git a/ripngd/ripng_nexthop.c b/ripngd/ripng_nexthop.c index b966af001e..0af636efcb 100644 --- a/ripngd/ripng_nexthop.c +++ b/ripngd/ripng_nexthop.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* This file is required in order to support properly the RIPng nexthop diff --git a/ripngd/ripng_nexthop.h b/ripngd/ripng_nexthop.h index 19bd32b503..76873f80eb 100644 --- a/ripngd/ripng_nexthop.h +++ b/ripngd/ripng_nexthop.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIPNG_RIPNG_NEXTHOP_H diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c index dcddf96ebf..adb3182a5b 100644 --- a/ripngd/ripng_offset.c +++ b/ripngd/ripng_offset.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* RIPng support by Vincent Jardin diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c index 69af4f214f..461ee98bb7 100644 --- a/ripngd/ripng_peer.c +++ b/ripngd/ripng_peer.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* RIPng support added by Vincent Jardin diff --git a/ripngd/ripng_route.c b/ripngd/ripng_route.c index 8538b07a98..f7d3ef89f4 100644 --- a/ripngd/ripng_route.c +++ b/ripngd/ripng_route.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripng_route.h b/ripngd/ripng_route.h index 9ff90aa8d0..90dae04700 100644 --- a/ripngd/ripng_route.h +++ b/ripngd/ripng_route.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIPNG_ROUTE_H diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index ad8dbc92f3..69ff84b220 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 964af81d1f..e7f1e9e157 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 399435fb24..a58b7c250d 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h index e40fd17b56..62b7b073f8 100644 --- a/ripngd/ripngd.h +++ b/ripngd/ripngd.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIPNG_RIPNGD_H diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c index e5ff6a1377..2d83fe6828 100644 --- a/tests/bgpd/test_aspath.c +++ b/tests/bgpd/test_aspath.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index c3de6a16e8..395001bc6f 100644 --- a/tests/bgpd/test_capability.c +++ b/tests/bgpd/test_capability.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/bgpd/test_ecommunity.c b/tests/bgpd/test_ecommunity.c index 9174191cb3..564d471296 100644 --- a/tests/bgpd/test_ecommunity.c +++ b/tests/bgpd/test_ecommunity.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/bgpd/test_mp_attr.c b/tests/bgpd/test_mp_attr.c index 6824c11fea..1995c17025 100644 --- a/tests/bgpd/test_mp_attr.c +++ b/tests/bgpd/test_mp_attr.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c index a2fd66528c..79e607f49b 100644 --- a/tests/bgpd/test_mpath.c +++ b/tests/bgpd/test_mpath.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c index e422c7e621..b0e80fb674 100644 --- a/tests/helpers/c/main.c +++ b/tests/helpers/c/main.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/helpers/c/prng.c b/tests/helpers/c/prng.c index bdcfb07af1..4b9fd57159 100644 --- a/tests/helpers/c/prng.c +++ b/tests/helpers/c/prng.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/helpers/c/prng.h b/tests/helpers/c/prng.h index cf0bacc5f8..6cc6289a1e 100644 --- a/tests/helpers/c/prng.h +++ b/tests/helpers/c/prng.h @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _PRNG_H #define _PRNG_H diff --git a/tests/helpers/c/tests.h b/tests/helpers/c/tests.h index a528e55f05..aaf35c27d2 100644 --- a/tests/helpers/c/tests.h +++ b/tests/helpers/c/tests.h @@ -16,10 +16,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_TESTS_H diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c index 56db460438..7825564e54 100644 --- a/tests/lib/cli/common_cli.c +++ b/tests/lib/cli/common_cli.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/cli/common_cli.h b/tests/lib/cli/common_cli.h index 9e7fe99830..9a0ef47c83 100644 --- a/tests/lib/cli/common_cli.h +++ b/tests/lib/cli/common_cli.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _COMMON_CLI_H diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c index 54b34bc799..ba1218120c 100644 --- a/tests/lib/cli/test_cli.c +++ b/tests/lib/cli/test_cli.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c index 272e3d12b7..249a6f760e 100644 --- a/tests/lib/cli/test_commands.c +++ b/tests/lib/cli/test_commands.c @@ -21,10 +21,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #define REALLY_NEED_PLAIN_GETOPT 1 diff --git a/tests/lib/test_buffer.c b/tests/lib/test_buffer.c index 67e4035806..b9f5fd7252 100644 --- a/tests/lib/test_buffer.c +++ b/tests/lib/test_buffer.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_checksum.c b/tests/lib/test_checksum.c index 53ab260e26..267a057ccf 100644 --- a/tests/lib/test_checksum.c +++ b/tests/lib/test_checksum.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_heavy.c b/tests/lib/test_heavy.c index 6ba8d9aa6d..1ba7b9a204 100644 --- a/tests/lib/test_heavy.c +++ b/tests/lib/test_heavy.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* This programme shows the effects of 'heavy' long-running functions diff --git a/tests/lib/test_heavy_thread.c b/tests/lib/test_heavy_thread.c index 57f0a6070a..3b85619d3a 100644 --- a/tests/lib/test_heavy_thread.c +++ b/tests/lib/test_heavy_thread.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* This programme shows the effects of 'heavy' long-running functions diff --git a/tests/lib/test_heavy_wq.c b/tests/lib/test_heavy_wq.c index 97371face1..57e206931b 100644 --- a/tests/lib/test_heavy_wq.c +++ b/tests/lib/test_heavy_wq.c @@ -11,10 +11,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* This programme shows the effects of 'heavy' long-running functions diff --git a/tests/lib/test_memory.c b/tests/lib/test_memory.c index 6849b9dceb..633ee0d562 100644 --- a/tests/lib/test_memory.c +++ b/tests/lib/test_memory.c @@ -11,10 +11,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_nexthop_iter.c b/tests/lib/test_nexthop_iter.c index 250379329b..77515386c7 100644 --- a/tests/lib/test_nexthop_iter.c +++ b/tests/lib/test_nexthop_iter.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_privs.c b/tests/lib/test_privs.c index c6ccc28e7a..26f3b5f693 100644 --- a/tests/lib/test_privs.c +++ b/tests/lib/test_privs.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_segv.c b/tests/lib/test_segv.c index dfc9d5f482..c43431622d 100644 --- a/tests/lib/test_segv.c +++ b/tests/lib/test_segv.c @@ -18,10 +18,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_sig.c b/tests/lib/test_sig.c index 10bce2303e..a04c9f4206 100644 --- a/tests/lib/test_sig.c +++ b/tests/lib/test_sig.c @@ -11,10 +11,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c index cfc2deb8d6..07f60668e7 100644 --- a/tests/lib/test_srcdest_table.c +++ b/tests/lib/test_srcdest_table.c @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_stream.c b/tests/lib/test_stream.c index 3ac45eb203..596b73afc3 100644 --- a/tests/lib/test_stream.c +++ b/tests/lib/test_stream.c @@ -1,5 +1,5 @@ /* Simple stream test. - * + * * Copyright (C) 2006 Sun Microsystems, Inc. * * This file is part of Quagga. @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_table.c b/tests/lib/test_table.c index 4042e1aaa2..8c98bc948c 100644 --- a/tests/lib/test_table.c +++ b/tests/lib/test_table.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_timer_correctness.c b/tests/lib/test_timer_correctness.c index b0643b907b..10461be1ef 100644 --- a/tests/lib/test_timer_correctness.c +++ b/tests/lib/test_timer_correctness.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/lib/test_timer_performance.c b/tests/lib/test_timer_performance.c index da0355f660..b67af19aea 100644 --- a/tests/lib/test_timer_performance.c +++ b/tests/lib/test_timer_performance.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/tests/test_lblmgr.c b/tests/test_lblmgr.c index 4a4aaa0014..d830094bad 100644 --- a/tests/test_lblmgr.c +++ b/tests/test_lblmgr.c @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 "lib/stream.h" diff --git a/tools/cocci.h b/tools/cocci.h index 3d877a7b4b..50199fa829 100644 --- a/tools/cocci.h +++ b/tools/cocci.h @@ -1,4 +1,5 @@ -/* some of this stuff doesn't seem to parse properly in coccinelle */ +/* some of this stuff doesn't seem to parse properly in coccinelle + */ #define DEFUN(funcname, cmdname, str, help) \ static int funcname \ diff --git a/tools/permutations.c b/tools/permutations.c index 72ce634f0c..fa1817a8e1 100644 --- a/tools/permutations.c +++ b/tools/permutations.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 "command.h" diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index fcae717374..face057d67 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 57151aceed..d3c7a4def9 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef VTYSH_H diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index aa003c7528..f25b5f26f7 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -1,22 +1,22 @@ /* Configuration generator. - Copyright (C) 2000 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 2000 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra 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 diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index bf62850e22..d2ac56c366 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/vtysh/vtysh_user.c b/vtysh/vtysh_user.c index cce797c932..97720e9fd6 100644 --- a/vtysh/vtysh_user.c +++ b/vtysh/vtysh_user.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/vtysh/vtysh_user.h b/vtysh/vtysh_user.h index 16fcdd03a5..9d8f4ae62c 100644 --- a/vtysh/vtysh_user.h +++ b/vtysh/vtysh_user.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _VTYSH_USER_H diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 4097cb4d66..0b19a2ad23 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -1,21 +1,21 @@ /* - Monitor status of frr daemons and restart if necessary. - - Copyright (C) 2004 Andrew J. Schorr - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Monitor status of frr daemons and restart if necessary. + * + * Copyright (C) 2004 Andrew J. Schorr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/watchfrr/watchfrr.h b/watchfrr/watchfrr.h index 719ad4dfd8..e7aba643d6 100644 --- a/watchfrr/watchfrr.h +++ b/watchfrr/watchfrr.h @@ -1,21 +1,21 @@ /* - Common definitions for watchfrr API socket. - - Copyright (C) 2016 David Lamparter for NetDEF, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Common definitions for watchfrr API socket. + * + * Copyright (C) 2016 David Lamparter for NetDEF, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 */ #ifndef FRR_WATCHFRR_H diff --git a/watchfrr/watchfrr_vty.c b/watchfrr/watchfrr_vty.c index 64af7d7f4a..3501dd57ea 100644 --- a/watchfrr/watchfrr_vty.c +++ b/watchfrr/watchfrr_vty.c @@ -1,21 +1,21 @@ /* - watchfrr CLI functions. - - Copyright (C) 2016 David Lamparter for NetDEF, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * watchfrr CLI functions. + * + * Copyright (C) 2016 David Lamparter for NetDEF, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 diff --git a/zebra/client_main.c b/zebra/client_main.c index 178184d463..cf423ad25f 100644 --- a/zebra/client_main.c +++ b/zebra/client_main.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/connected.c b/zebra/connected.c index 0ceaddc8e3..4d8fe9f6d6 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/connected.h b/zebra/connected.h index bdcf6085e4..3e37346853 100644 --- a/zebra/connected.h +++ b/zebra/connected.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_CONNECTED_H diff --git a/zebra/debug.c b/zebra/debug.c index cb1ed359a8..98770371d8 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/zebra/debug.h b/zebra/debug.h index f8ebf3d616..0a50da8176 100644 --- a/zebra/debug.h +++ b/zebra/debug.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_DEBUG_H diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c index 5333f0331e..73da049655 100644 --- a/zebra/if_ioctl.c +++ b/zebra/if_ioctl.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c index dbc4109913..08af2aa350 100644 --- a/zebra/if_ioctl_solaris.c +++ b/zebra/if_ioctl_solaris.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 006fcf16f4..f123dab963 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/if_netlink.h b/zebra/if_netlink.h index 6fa39ccab2..0c1b488fb1 100644 --- a/zebra/if_netlink.h +++ b/zebra/if_netlink.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_IF_NETLINK_H diff --git a/zebra/if_null.c b/zebra/if_null.c index 2ccea56c81..7cba0a4ee2 100644 --- a/zebra/if_null.c +++ b/zebra/if_null.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c index c62d9926a2..dbf5abd12b 100644 --- a/zebra/if_sysctl.c +++ b/zebra/if_sysctl.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/interface.c b/zebra/interface.c index 42e7c7bb18..7ff782f7cc 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/interface.h b/zebra/interface.h index 9f108760d6..b276edc353 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_INTERFACE_H diff --git a/zebra/ioctl.c b/zebra/ioctl.c index dfd69300f9..25aeea18f5 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/ioctl.h b/zebra/ioctl.h index 9e3fd5b3fb..b11a90f193 100644 --- a/zebra/ioctl.h +++ b/zebra/ioctl.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_IOCTL_H diff --git a/zebra/ioctl_null.c b/zebra/ioctl_null.c index c2060e90a1..9cc2daedbe 100644 --- a/zebra/ioctl_null.c +++ b/zebra/ioctl_null.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c index 78796a8a28..4bdbdaa584 100644 --- a/zebra/ioctl_solaris.c +++ b/zebra/ioctl_solaris.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/ioctl_solaris.h b/zebra/ioctl_solaris.h index 188986be16..dbf93bdcaa 100644 --- a/zebra/ioctl_solaris.h +++ b/zebra/ioctl_solaris.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_IF_IOCTL_SOLARIS_H diff --git a/zebra/ipforward.h b/zebra/ipforward.h index a75073cb36..5401ed08ad 100644 --- a/zebra/ipforward.h +++ b/zebra/ipforward.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_IPFORWARD_H diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c index 910fd61d06..200c50c0ad 100644 --- a/zebra/ipforward_proc.c +++ b/zebra/ipforward_proc.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/ipforward_solaris.c b/zebra/ipforward_solaris.c index 8eccfe133c..09f145e818 100644 --- a/zebra/ipforward_solaris.c +++ b/zebra/ipforward_solaris.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/ipforward_sysctl.c b/zebra/ipforward_sysctl.c index 28894f4e0a..a381eb2d72 100644 --- a/zebra/ipforward_sysctl.c +++ b/zebra/ipforward_sysctl.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/irdp.h b/zebra/irdp.h index 9ce55e5876..975e378b72 100644 --- a/zebra/irdp.h +++ b/zebra/irdp.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 21f8beadf2..d3c471e753 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c index 5c17570f05..8e4ebfda60 100644 --- a/zebra/irdp_main.c +++ b/zebra/irdp_main.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c index 269d4c0449..20982b31a1 100644 --- a/zebra/irdp_packet.c +++ b/zebra/irdp_packet.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 27beaf0c82..3efad44acb 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/kernel_netlink.h b/zebra/kernel_netlink.h index adbcf71f63..36ab5c3254 100644 --- a/zebra/kernel_netlink.h +++ b/zebra/kernel_netlink.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_KERNEL_NETLINK_H diff --git a/zebra/kernel_null.c b/zebra/kernel_null.c index fea79ffe8c..ad96ce41ca 100644 --- a/zebra/kernel_null.c +++ b/zebra/kernel_null.c @@ -1,6 +1,5 @@ -/* NULL kernel methods for testing. */ - -/* +/* + * NULL kernel methods for testing. * Copyright (C) 2006 Sun Microsystems, Inc. * * This file is part of Quagga. @@ -15,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 0e15153e1d..25c11e578b 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/kernel_socket.h b/zebra/kernel_socket.h index 04e3054312..26cd6127f8 100644 --- a/zebra/kernel_socket.h +++ b/zebra/kernel_socket.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __ZEBRA_KERNEL_SOCKET_H diff --git a/zebra/label_manager.c b/zebra/label_manager.c index e60f7a4a6a..cbb35631ac 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/label_manager.h b/zebra/label_manager.h index 0c6a5ebc7d..a68c301f16 100644 --- a/zebra/label_manager.h +++ b/zebra/label_manager.h @@ -16,10 +16,9 @@ * 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _LABEL_MANAGER_H diff --git a/zebra/main.c b/zebra/main.c index 459e6148d8..b136f8ae93 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/misc_null.c b/zebra/misc_null.c index 49cb92bd7d..b125becdc9 100644 --- a/zebra/misc_null.c +++ b/zebra/misc_null.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 23cce0a1b7..95e84ffc3c 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/redistribute.h b/zebra/redistribute.h index 06afc726d1..8a78574980 100644 --- a/zebra/redistribute.h +++ b/zebra/redistribute.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_REDISTRIBUTE_H diff --git a/zebra/redistribute_null.c b/zebra/redistribute_null.c index ffde8ed773..7f40c21782 100644 --- a/zebra/redistribute_null.c +++ b/zebra/redistribute_null.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rib.h b/zebra/rib.h index 8f6cff0d8a..7bcbf56bde 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RIB_H diff --git a/zebra/router-id.c b/zebra/router-id.c index b1e786d0c8..318986c1b7 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/router-id.h b/zebra/router-id.h index 46d300eeac..6b15159fdb 100644 --- a/zebra/router-id.h +++ b/zebra/router-id.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ROUTER_ID_H_ diff --git a/zebra/rt.h b/zebra/rt.h index 75d234ce83..5f2441a9ce 100644 --- a/zebra/rt.h +++ b/zebra/rt.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RT_H diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 77f03a2c67..3c4f3171ff 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h index af58a0f0d4..0e305beb37 100644 --- a/zebra/rt_netlink.h +++ b/zebra/rt_netlink.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RT_NETLINK_H diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index de8cc69a8e..3e4833016a 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 03b7ace9b3..7f46066a63 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rtadv.h b/zebra/rtadv.h index e4c2c6b36d..5f389b30a2 100644 --- a/zebra/rtadv.h +++ b/zebra/rtadv.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RTADV_H diff --git a/zebra/rtadv_null.c b/zebra/rtadv_null.c index ee6eda6bdd..ccb1a39e02 100644 --- a/zebra/rtadv_null.c +++ b/zebra/rtadv_null.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c index 4d491f3200..1fb2984ddf 100644 --- a/zebra/rtread_getmsg.c +++ b/zebra/rtread_getmsg.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rtread_netlink.c b/zebra/rtread_netlink.c index 1d41861bbd..d59883445d 100644 --- a/zebra/rtread_netlink.c +++ b/zebra/rtread_netlink.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c index b68e1cb74a..cabb1f7714 100644 --- a/zebra/rtread_sysctl.c +++ b/zebra/rtread_sysctl.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/test_main.c b/zebra/test_main.c index f3ef3df96a..83c1ebb178 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -11,10 +11,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c index cf8f78afe9..2a23ff1027 100644 --- a/zebra/zebra_fpm.c +++ b/zebra/zebra_fpm.c @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_fpm_dt.c b/zebra/zebra_fpm_dt.c index 7b4e1b90dc..db28b6f0e4 100644 --- a/zebra/zebra_fpm_dt.c +++ b/zebra/zebra_fpm_dt.c @@ -17,10 +17,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index 92ab5df2c3..4ca7b59726 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -17,10 +17,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_fpm_private.h b/zebra/zebra_fpm_private.h index 1c4fd4c22f..49650541e7 100644 --- a/zebra/zebra_fpm_private.h +++ b/zebra/zebra_fpm_private.h @@ -16,10 +16,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_FPM_PRIVATE_H diff --git a/zebra/zebra_fpm_protobuf.c b/zebra/zebra_fpm_protobuf.c index 11869d8a2b..312d4cd3ed 100644 --- a/zebra/zebra_fpm_protobuf.c +++ b/zebra/zebra_fpm_protobuf.c @@ -17,10 +17,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_memory.c b/zebra/zebra_memory.c index 728051c34b..51c240ae28 100644 --- a/zebra/zebra_memory.c +++ b/zebra/zebra_memory.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifdef HAVE_CONFIG_H diff --git a/zebra/zebra_memory.h b/zebra/zebra_memory.h index c1ac4fe955..35d70d81ee 100644 --- a/zebra/zebra_memory.h +++ b/zebra/zebra_memory.h @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _QUAGGA_ZEBRA_MEMORY_H diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 65e7f9ab95..d7589fda73 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index b5a8f3173e..1f17de67a3 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_MPLS_H diff --git a/zebra/zebra_mpls_netlink.c b/zebra/zebra_mpls_netlink.c index 045bee2b91..d0c4acb370 100644 --- a/zebra/zebra_mpls_netlink.c +++ b/zebra/zebra_mpls_netlink.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mpls_null.c b/zebra/zebra_mpls_null.c index 0333b6e6b4..c69b06085d 100644 --- a/zebra/zebra_mpls_null.c +++ b/zebra/zebra_mpls_null.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c index eaa80ac558..bca73898c5 100644 --- a/zebra/zebra_mpls_openbsd.c +++ b/zebra/zebra_mpls_openbsd.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index 7662cf4163..3010a3bd8a 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mroute.c b/zebra/zebra_mroute.c index 86356104bd..82c7f404b7 100644 --- a/zebra/zebra_mroute.c +++ b/zebra/zebra_mroute.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_mroute.h b/zebra/zebra_mroute.h index c0bac43a81..eeaf9caf1a 100644 --- a/zebra/zebra_mroute.h +++ b/zebra/zebra_mroute.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __ZEBRA_MROUTE_H__ diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c index 642d2700a4..a5869585d5 100644 --- a/zebra/zebra_ns.c +++ b/zebra/zebra_ns.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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" diff --git a/zebra/zebra_ns.h b/zebra/zebra_ns.h index c50f9249d2..721b6c818b 100644 --- a/zebra/zebra_ns.h +++ b/zebra/zebra_ns.h @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #if !defined(__ZEBRA_NS_H__) #define __ZEBRA_NS_H__ diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index 4141cdd907..68d2bff718 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_ptm.h b/zebra/zebra_ptm.h index 71c85d9094..28fe9c1de7 100644 --- a/zebra/zebra_ptm.h +++ b/zebra/zebra_ptm.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_PTM_H diff --git a/zebra/zebra_ptm_null.c b/zebra/zebra_ptm_null.c index 4afa2ce522..576ea17327 100644 --- a/zebra/zebra_ptm_null.c +++ b/zebra/zebra_ptm_null.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include "prefix.h" diff --git a/zebra/zebra_ptm_redistribute.c b/zebra/zebra_ptm_redistribute.c index 396857bc1f..efa29989e1 100644 --- a/zebra/zebra_ptm_redistribute.c +++ b/zebra/zebra_ptm_redistribute.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_ptm_redistribute.h b/zebra/zebra_ptm_redistribute.h index d5aa37d5f8..ac3873f248 100644 --- a/zebra/zebra_ptm_redistribute.h +++ b/zebra/zebra_ptm_redistribute.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 07b19155e2..12ee9961d5 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 67859fd46b..20b0c13a40 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h index 4394fde4f3..a75674d0cb 100644 --- a/zebra/zebra_rnh.h +++ b/zebra/zebra_rnh.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_RNH_H diff --git a/zebra/zebra_rnh_null.c b/zebra/zebra_rnh_null.c index 286290a52b..0a3620bbe8 100644 --- a/zebra/zebra_rnh_null.c +++ b/zebra/zebra_rnh_null.c @@ -13,10 +13,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 #include "vty.h" diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 1738b0b053..4a81cb635d 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_routemap.h b/zebra/zebra_routemap.h index bf418ccacc..94981a3cd6 100644 --- a/zebra/zebra_routemap.h +++ b/zebra/zebra_routemap.h @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __ZEBRA_ROUTEMAP_H__ diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index 8adb8873dc..7c2e6697ce 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ /* diff --git a/zebra/zebra_static.c b/zebra/zebra_static.c index 4628d11091..b218eb5210 100644 --- a/zebra/zebra_static.c +++ b/zebra/zebra_static.c @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_static.h b/zebra/zebra_static.h index adc2efff58..9f76ab5f55 100644 --- a/zebra/zebra_static.h +++ b/zebra/zebra_static.h @@ -15,10 +15,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef __ZEBRA_STATIC_H__ #define __ZEBRA_STATIC_H__ diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 6b36891056..28512c49f3 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -14,10 +14,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h index 74c2a52171..df25fad947 100644 --- a/zebra/zebra_vrf.h +++ b/zebra/zebra_vrf.h @@ -15,10 +15,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #if !defined(__ZEBRA_RIB_H__) #define __ZEBRA_RIB_H__ diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index c5c462c8da..6329722b18 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/zebra/zserv.c b/zebra/zserv.c index aa08ddc04b..a59ef3031d 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * 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 diff --git a/zebra/zserv.h b/zebra/zserv.h index cd1948373a..2fafd040cf 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -13,10 +13,9 @@ * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 */ #ifndef _ZEBRA_ZSERV_H diff --git a/zebra/zserv_null.c b/zebra/zserv_null.c index 4b52abb222..972caaeed4 100644 --- a/zebra/zserv_null.c +++ b/zebra/zserv_null.c @@ -14,10 +14,9 @@ * 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 Quagga; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * 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 From 7a38655aa0d8216a5bf352f94b65d035da210150 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 15 May 2017 16:55:30 +0200 Subject: [PATCH 047/193] lib: parser: remove forgotten line MTYPE_CMD_TOKEN_DATA isn't used anymore, I forgot to ditch the line. Signed-off-by: David Lamparter --- lib/command_graph.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/command_graph.c b/lib/command_graph.c index 62d0610e18..4dd72feeab 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -26,8 +26,6 @@ #include "command_graph.h" -DECLARE_MTYPE(CMD_TOKEN_DATA) - DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens") DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text") DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help") From 7ce9737dd7215ac6acb32daea9d78153e91de4d8 Mon Sep 17 00:00:00 2001 From: Jafar Al-Gharaibeh Date: Thu, 11 May 2017 16:52:27 -0500 Subject: [PATCH 048/193] snap: add vtysh as a "proper" command alias for frr.vtysh This allows direct access to vtysh without the "frr." prefix. The alias can be enabled by sudo snap frr vtysh Signed-off-by: Jafar Al-Gharaibeh --- snapcraft/README.snap_build.md | 15 ++++++++++++--- snapcraft/README.usage.md | 18 +++++++++++------- snapcraft/snapcraft.yaml.in | 1 + 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/snapcraft/README.snap_build.md b/snapcraft/README.snap_build.md index eeee6a17ad..7c42848451 100644 --- a/snapcraft/README.snap_build.md +++ b/snapcraft/README.snap_build.md @@ -94,7 +94,16 @@ All the commands are prefixed with frr. frr.zebra-debug vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your -path). If access as `vtysh` instead of `frr.vtysh` is needed, a symlink -can be created: +path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it +via a snap alias as follows: - sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh + sudo snap alias frr vtysh + +This will add the vtysh command to your /snap/bin for direct access. The output of + + sudo snap aliases + +should list vtysh command alias as enabled: + +App Alias Notes +frr.vtysh vtysh enabled diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md index 537147303a..1034790e00 100644 --- a/snapcraft/README.usage.md +++ b/snapcraft/README.usage.md @@ -109,13 +109,17 @@ FAQ `export VTYSH_PAGER=cat` to the end of your `.profile`) - ospfd / ospf6d are not running after installation - - Installing a new snap starts the daemons, but at this time they - may not have the required priviledged access. Make sure you - issue the `snap connect` command as given above (can be verified - with `snap interfaces`) and **THEN** restart the daemons (or - reboot the system). - This is a limitation of any snap package at this time which - requires priviledged interfaces (ie to manipulate routing tables) + - Installing a new snap starts the daemons, but at this time they + may not have the required priviledged access. Make sure you + issue the `snap connect` command as given above (can be verified + with `snap interfaces`) and **THEN** restart the daemons (or + reboot the system). + This is a limitation of any snap package at this time which + requires priviledged interfaces (ie to manipulate routing tables) + +- Can I run vtysh directly without the "frr." prefix? + - Yes, enable the vtysh alias in the frr snap package by: + sudo snap alias frr vtysh Sourcecode available ==================== diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in index eb61301953..17fabb16f8 100644 --- a/snapcraft/snapcraft.yaml.in +++ b/snapcraft/snapcraft.yaml.in @@ -16,6 +16,7 @@ apps: - network - network-bind - network-control + aliases: [vtysh] version: command: bin/show_version readme: From f8c7b8a495ebba47e72677d5ef9ead344f413b22 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 15 May 2017 12:24:17 -0400 Subject: [PATCH 049/193] snapcraft: fix minor typo Signed-off-by: Quentin Young --- snapcraft/README.usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md index 1034790e00..28d2395455 100644 --- a/snapcraft/README.usage.md +++ b/snapcraft/README.usage.md @@ -110,12 +110,12 @@ FAQ - ospfd / ospf6d are not running after installation - Installing a new snap starts the daemons, but at this time they - may not have the required priviledged access. Make sure you + may not have the required privileged access. Make sure you issue the `snap connect` command as given above (can be verified with `snap interfaces`) and **THEN** restart the daemons (or reboot the system). This is a limitation of any snap package at this time which - requires priviledged interfaces (ie to manipulate routing tables) + requires privileged interfaces (ie to manipulate routing tables) - Can I run vtysh directly without the "frr." prefix? - Yes, enable the vtysh alias in the frr snap package by: From eb15f4773acaadce78efeddb425030e14d014116 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Mon, 15 May 2017 17:03:10 +0000 Subject: [PATCH 050/193] bgpd: added bgp_nexthop_afi() Signed-off-by: Daniel Walton Added bgp_nexthop_afi() to have one place that determines what the Nexthop AFI is for bgp_packet_mpattr_start() --- bgpd/bgp_attr.c | 32 ++++++++++++++++++++++++-------- bgpd/bgp_attr.h | 2 ++ bgpd/bgp_updgrp_packet.c | 9 +++++---- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index d80b9f237b..5c444869b4 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2827,10 +2827,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, stream_putw (s, pkt_afi); /* AFI */ stream_putc (s, pkt_safi); /* SAFI */ - if (afi == AFI_L2VPN) - nh_afi = AFI_L2VPN; - else if (nh_afi == AFI_MAX) - nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); /* Nexthop */ switch (nh_afi) @@ -3099,6 +3095,27 @@ bgp_packet_mpattr_end (struct stream *s, size_t sizep) stream_putw_at (s, sizep, (stream_get_endp (s) - sizep) - 2); } + +/* Return the Nexthop AFI that should be used */ +afi_t +bgp_nexthop_afi (struct peer *peer, afi_t afi, safi_t safi, struct attr *attr) +{ + afi_t nh_afi; + + if (peer_cap_enhe(peer, afi, safi)) { + nh_afi = AFI_IP6; + } else { + if (afi == AFI_L2VPN) + nh_afi = AFI_L2VPN; + else if (safi == SAFI_LABELED_UNICAST) + nh_afi = afi; + else + nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); + } + + return nh_afi; +} + /* Make attribute packet. */ bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *peer, @@ -3115,6 +3132,7 @@ bgp_packet_attribute (struct bgp *bgp, struct peer *peer, int send_as4_path = 0; int send_as4_aggregator = 0; int use32bit = (CHECK_FLAG (peer->cap, PEER_CAP_AS4_RCV)) ? 1 : 0; + afi_t nh_afi; if (! bgp) bgp = peer->bgp; @@ -3127,10 +3145,8 @@ bgp_packet_attribute (struct bgp *bgp, struct peer *peer, { size_t mpattrlen_pos = 0; - mpattrlen_pos = bgp_packet_mpattr_start(s, afi, safi, - (peer_cap_enhe(peer, afi, safi) ? AFI_IP6 : - AFI_MAX), /* get from NH */ - vecarr, attr); + nh_afi = bgp_nexthop_afi(peer, afi, safi, attr); + mpattrlen_pos = bgp_packet_mpattr_start(s, afi, safi, nh_afi, vecarr, attr); bgp_packet_mpattr_prefix(s, afi, safi, p, prd, tag, addpath_encode, addpath_tx_id, attr); bgp_packet_mpattr_end(s, mpattrlen_pos); diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 1df1faf939..2931b2f2b6 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -249,6 +249,8 @@ extern struct attr *bgp_attr_default_set (struct attr *attr, u_char); extern struct attr *bgp_attr_aggregate_intern (struct bgp *, u_char, struct aspath *, struct community *, int as_set, u_char); +extern afi_t bgp_nexthop_afi (struct peer *peer, afi_t afi, safi_t safi, + struct attr *attr); extern bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *, struct stream *, struct attr *, struct bpacket_attr_vec_arr *vecarr, diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index f734763b70..8a4824f859 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -656,6 +656,7 @@ subgroup_update_packet (struct update_subgroup *subgrp) u_int32_t addpath_tx_id = 0; struct prefix_rd *prd = NULL; char label_buf[20]; + afi_t nh_afi; if (!subgrp) return NULL; @@ -767,11 +768,11 @@ subgroup_update_packet (struct update_subgroup *subgrp) if (bgp_labeled_safi(safi)) sprintf (label_buf, "label %u", label_pton(tag)); - if (stream_empty (snlri)) - mpattrlen_pos = bgp_packet_mpattr_start (snlri, afi, safi, - (peer_cap_enhe(peer, afi, safi) ? AFI_IP6 : - AFI_MAX), /* get from NH */ + if (stream_empty (snlri)) { + nh_afi = bgp_nexthop_afi(peer, afi, safi, adv->baa->attr); + mpattrlen_pos = bgp_packet_mpattr_start (snlri, afi, safi, nh_afi, &vecarr, adv->baa->attr); + } bgp_packet_mpattr_prefix (snlri, afi, safi, &rn->p, prd, tag, addpath_encode, addpath_tx_id, adv->baa->attr); From 057fad8dfb65167925c01237af31e1a4ecadabb3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 18:48:54 -0400 Subject: [PATCH 051/193] eigrpd: Cleanup a bunch SA warnings. 1) Cleanup SA warnings, more to come 2) Cleanup some non debug guarded zlog_info code Signed-off-by: Donald Sharp --- eigrpd/eigrp_dump.c | 11 +++-- eigrpd/eigrp_filter.c | 17 +------- eigrpd/eigrp_hello.c | 15 ++++--- eigrpd/eigrp_interface.c | 4 +- eigrpd/eigrp_packet.c | 14 ++++--- eigrpd/eigrp_query.c | 11 ++--- eigrpd/eigrp_reply.c | 37 ++++++++--------- eigrpd/eigrp_siaquery.c | 13 +++--- eigrpd/eigrp_siareply.c | 13 +++--- eigrpd/eigrp_update.c | 86 +++++++++++++--------------------------- 10 files changed, 95 insertions(+), 126 deletions(-) diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index 21bef48ecb..3de7a53c10 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -310,10 +310,15 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp) void show_ip_eigrp_prefix_entry (struct vty *vty, struct eigrp_prefix_entry *tn) { + struct list *successors = eigrp_topology_get_successor(tn); + vty_out (vty, "%-3c",(tn->state > 0) ? 'A' : 'P'); - vty_out (vty, "%s/%u, ",inet_ntoa (tn->destination_ipv4->prefix),tn->destination_ipv4->prefixlen); - vty_out (vty, "%u successors, ",eigrp_topology_get_successor(tn)->count); - vty_out (vty, "FD is %u, serno: %lu %s",tn->fdistance, tn->serno, VTY_NEWLINE); + vty_out (vty, "%s/%u, ", + inet_ntoa (tn->destination_ipv4->prefix), tn->destination_ipv4->prefixlen); + vty_out (vty, "%u successors, ", successors->count); + vty_out (vty, "FD is %u, serno: %lu %s", tn->fdistance, tn->serno, VTY_NEWLINE); + + list_delete(successors); } void diff --git a/eigrpd/eigrp_filter.c b/eigrpd/eigrp_filter.c index bfe51ae88d..7d628c8208 100644 --- a/eigrpd/eigrp_filter.c +++ b/eigrpd/eigrp_filter.c @@ -83,7 +83,6 @@ eigrp_distribute_update (struct distribute *dist) if (dist->list[DISTRIBUTE_V4_IN]) { alist = access_list_lookup (AFI_IP, dist->list[DISTRIBUTE_V4_IN]); - zlog_info("name); if (alist) e->list[EIGRP_FILTER_IN] = alist; else @@ -97,7 +96,6 @@ eigrp_distribute_update (struct distribute *dist) /* access list OUT for whole process */ if (dist->list[DISTRIBUTE_V4_OUT]) { - zlog_info("list[DISTRIBUTE_V4_OUT]); alist = access_list_lookup (AFI_IP, dist->list[DISTRIBUTE_V4_OUT]); if (alist) e->list[EIGRP_FILTER_OUT] = alist; @@ -112,7 +110,6 @@ eigrp_distribute_update (struct distribute *dist) /* PREFIX_LIST IN for process */ if (dist->prefix[DISTRIBUTE_V4_IN]) { - zlog_info("prefix[DISTRIBUTE_V4_IN]); plist = prefix_list_lookup (AFI_IP, dist->prefix[DISTRIBUTE_V4_IN]); if (plist) { @@ -126,7 +123,6 @@ eigrp_distribute_update (struct distribute *dist) /* PREFIX_LIST OUT for process */ if (dist->prefix[DISTRIBUTE_V4_OUT]) { - zlog_info("prefix[DISTRIBUTE_V4_OUT]); plist = prefix_list_lookup (AFI_IP, dist->prefix[DISTRIBUTE_V4_OUT]); if (plist) { @@ -192,8 +188,6 @@ eigrp_distribute_update (struct distribute *dist) if (ifp == NULL) return; - zlog_info("info; ei = info->eigrp_interface;*/ struct listnode *node, *nnode; @@ -207,15 +201,9 @@ eigrp_distribute_update (struct distribute *dist) } } - if(ei == NULL) - { - zlog_info("Not Found eigrp interface %s",ifp->name); - } - /* Access-list for interface in */ if (dist->list[DISTRIBUTE_V4_IN]) { - zlog_info("list[DISTRIBUTE_V4_IN]); if (alist){ ei->list[EIGRP_FILTER_IN] = alist; @@ -239,10 +227,7 @@ eigrp_distribute_update (struct distribute *dist) } else - { - ei->list[EIGRP_FILTER_OUT] = NULL; - zlog_info("list[EIGRP_FILTER_OUT] = NULL; /* Prefix-list for interface in */ if (dist->prefix[DISTRIBUTE_V4_IN]) diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c index 051836d7e8..624c355eb4 100644 --- a/eigrpd/eigrp_hello.c +++ b/eigrpd/eigrp_hello.c @@ -252,7 +252,8 @@ eigrp_peer_termination_decode (struct eigrp_neighbor *nbr, if(my_ip == received_ip) { zlog_info ("Neighbor %s (%s) is down: Peer Termination received", - inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); + inet_ntoa (nbr->src), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); /* set neighbor to DOWN */ nbr->state = EIGRP_NEIGHBOR_DOWN; /* delete neighbor */ @@ -364,14 +365,15 @@ eigrp_hello_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e case EIGRP_TLV_SW_VERSION: eigrp_sw_version_decode(nbr, tlv_header); break; - case EIGRP_TLV_NEXT_MCAST_SEQ: - break; + case EIGRP_TLV_NEXT_MCAST_SEQ: + break; case EIGRP_TLV_PEER_TERMINATION: eigrp_peer_termination_decode(nbr, tlv_header); + return; break; case EIGRP_TLV_PEER_MTRLIST: - case EIGRP_TLV_PEER_TIDLIST: - break; + case EIGRP_TLV_PEER_TIDLIST: + break; default: break; } @@ -388,7 +390,8 @@ eigrp_hello_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e { /* increment statistics. */ ei->hello_in++; - eigrp_nbr_state_update(nbr); + if (nbr) + eigrp_nbr_state_update(nbr); } diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 1ad5e88c22..5f3de8a921 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -304,7 +304,9 @@ eigrp_if_up (struct eigrp_interface *ei) { pe = eigrp_prefix_entry_new (); pe->serno = eigrp->serno; - pe->destination_ipv4 = dest_addr; + pe->destination_ipv4 = prefix_ipv4_new (); + prefix_copy ((struct prefix *)pe->destination_ipv4, + (struct prefix *)&dest_addr); pe->af = AF_INET; pe->nt = EIGRP_TOPOLOGY_TYPE_CONNECTED; diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index 635c1cf66b..6b529302d5 100644 --- a/eigrpd/eigrp_packet.c +++ b/eigrpd/eigrp_packet.c @@ -114,7 +114,10 @@ eigrp_make_md5_digest (struct eigrp_interface *ei, struct stream *s, u_char flag if(keychain) key = key_lookup_for_send(keychain); else - return EIGRP_AUTH_TYPE_NONE; + { + eigrp_authTLV_MD5_free(auth_TLV); + return EIGRP_AUTH_TYPE_NONE; + } memset(&ctx, 0, sizeof(ctx)); MD5Init(&ctx); @@ -235,8 +238,7 @@ eigrp_check_md5_digest (struct stream *s, } /* save neighbor's crypt_seqnum */ - if (nbr) - nbr->crypt_seqnum = authTLV->key_sequence; + nbr->crypt_seqnum = authTLV->key_sequence; return 1; } @@ -628,7 +630,7 @@ eigrp_read (struct thread *thread) struct eigrp_packet *ep; ep = eigrp_fifo_tail(nbr->retrans_queue); - if (ep != NULL) + if (ep) { if (ntohl(eigrph->ack) == ep->sequence_number) { @@ -642,7 +644,7 @@ eigrp_read (struct thread *thread) eigrp_update_send_EOT(nbr); } ep = eigrp_fifo_pop_tail(nbr->retrans_queue); - /*eigrp_packet_free(ep);*/ + eigrp_packet_free(ep); if (nbr->retrans_queue->count > 0) { eigrp_send_packet_reliably(nbr); @@ -650,7 +652,7 @@ eigrp_read (struct thread *thread) } } ep = eigrp_fifo_tail(nbr->multicast_queue); - if (ep != NULL) + if (ep) { if (ntohl(eigrph->ack) == ep->sequence_number) { diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 4488054e06..e52d4fa663 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -114,16 +114,17 @@ eigrp_query_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4(eigrp->topology_table, &dest_addr); /* If the destination exists (it should, but one never know)*/ if (dest != NULL) diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c index 0c5d9dd92e..e5470a48f0 100644 --- a/eigrpd/eigrp_reply.c +++ b/eigrpd/eigrp_reply.c @@ -146,6 +146,8 @@ eigrp_send_reply (struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe) { eigrp_send_packet_reliably(nbr); } + + XFREE(MTYPE_EIGRP_PREFIX_ENTRY, pe2); } /*EIGRP REPLY read function*/ @@ -180,16 +182,17 @@ eigrp_reply_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4 (eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4 (eigrp->topology_table, &dest_addr); /* * Destination must exists */ @@ -212,24 +215,18 @@ eigrp_reply_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e plist = e->prefix[EIGRP_FILTER_IN]; alist_i = ei->list[EIGRP_FILTER_IN]; plist_i = ei->prefix[EIGRP_FILTER_IN]; - zlog_info("REPLY Receive: Filtering"); - zlog_info("REPLY RECEIVE Prefix: %s", inet_ntoa(dest_addr->prefix)); /* Check if any list fits */ - if ((alist && access_list_apply (alist, - (struct prefix *) dest_addr) == FILTER_DENY)|| - (plist && prefix_list_apply (plist, - (struct prefix *) dest_addr) == PREFIX_DENY)|| - (alist_i && access_list_apply (alist_i, - (struct prefix *) dest_addr) == FILTER_DENY)|| - (plist_i && prefix_list_apply (plist_i, - (struct prefix *) dest_addr) == PREFIX_DENY)) + if ((alist && + access_list_apply (alist, (struct prefix *)&dest_addr) == FILTER_DENY) || + (plist && + prefix_list_apply (plist, (struct prefix *)&dest_addr) == PREFIX_DENY) || + (alist_i && + access_list_apply (alist_i, (struct prefix *)&dest_addr) == FILTER_DENY) || + (plist_i && + prefix_list_apply (plist_i, (struct prefix *)&dest_addr) == PREFIX_DENY)) { - zlog_info("REPLY RECEIVE: Setting metric to max"); tlv->metric.delay = EIGRP_MAX_METRIC; - zlog_info("REPLY RECEIVE Prefix: %s", inet_ntoa(dest_addr->prefix)); - } else { - zlog_info("REPLY RECEIVE: Not setting metric"); - } + } /* * End of filtering */ diff --git a/eigrpd/eigrp_siaquery.c b/eigrpd/eigrp_siaquery.c index b041300764..38033a4fa2 100644 --- a/eigrpd/eigrp_siaquery.c +++ b/eigrpd/eigrp_siaquery.c @@ -81,16 +81,17 @@ eigrp_siaquery_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4(eigrp->topology_table, &dest_addr); /* If the destination exists (it should, but one never know)*/ if (dest != NULL) @@ -162,4 +163,6 @@ eigrp_send_siaquery (struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe) eigrp_send_packet_reliably(nbr); } } + else + eigrp_packet_free(ep); } diff --git a/eigrpd/eigrp_siareply.c b/eigrpd/eigrp_siareply.c index 4c4793f864..e99f4ed957 100644 --- a/eigrpd/eigrp_siareply.c +++ b/eigrpd/eigrp_siareply.c @@ -80,16 +80,17 @@ eigrp_siareply_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4(eigrp->topology_table, &dest_addr); /* If the destination exists (it should, but one never know)*/ if (dest != NULL) @@ -161,6 +162,8 @@ eigrp_send_siareply (struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe) eigrp_send_packet_reliably(nbr); } } + else + eigrp_packet_free(ep); } diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 5c942bd4d5..9bb772decf 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -291,17 +291,18 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); /*searching if destination exists */ - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4(eigrp->topology_table, &dest_addr); /*if exists it comes to DUAL*/ if (dest != NULL) @@ -331,7 +332,9 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * /*Here comes topology information save*/ pe = eigrp_prefix_entry_new(); pe->serno = eigrp->serno; - pe->destination_ipv4 = dest_addr; + pe->destination_ipv4 = prefix_ipv4_new(); + prefix_copy((struct prefix *)pe->destination_ipv4, + (struct prefix *)&dest_addr); pe->af = AF_INET; pe->state = EIGRP_FSM_STATE_PASSIVE; pe->nt = EIGRP_TOPOLOGY_TYPE_REMOTE; @@ -353,93 +356,52 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * */ alist = ei->list[EIGRP_FILTER_IN]; - if (alist) { - zlog_info ("ALIST PROC IN: %s", alist->name); - } else { - zlog_info("ALIST je prazdny"); - } - /* Check if access-list fits */ - if (alist && access_list_apply (alist, - (struct prefix *) dest_addr) == FILTER_DENY) + if (alist && + access_list_apply (alist, (struct prefix *)&dest_addr) == FILTER_DENY) { /* If yes, set reported metric to Max */ - zlog_info("PROC IN: Nastavujem metriku na MAX"); ne->reported_metric.delay = EIGRP_MAX_METRIC; - zlog_info("PROC IN Prefix: %s", inet_ntoa(dest_addr->prefix)); } else { - zlog_info("PROC IN: NENastavujem metriku "); ne->distance = eigrp_calculate_total_metrics(eigrp, ne); } plist = e->prefix[EIGRP_FILTER_IN]; - if (plist) { - zlog_info ("PLIST PROC IN: %s", plist->name); - } else { - zlog_info("PLIST PROC IN je prazdny"); - } - /* Check if prefix-list fits */ - if (plist && prefix_list_apply (plist, - (struct prefix *) dest_addr) == PREFIX_DENY) + if (plist && + prefix_list_apply (plist, (struct prefix *)&dest_addr) == PREFIX_DENY) { /* If yes, set reported metric to Max */ - zlog_info("PLIST PROC IN: Nastavujem metriku na MAX"); ne->reported_metric.delay = EIGRP_MAX_METRIC; - zlog_info("PLIST PROC IN Prefix: %s", inet_ntoa(dest_addr->prefix)); - } else { - zlog_info("PLIST PROC IN: NENastavujem metriku "); - } + } /*Get access-list from current interface */ - zlog_info("Checking access_list on interface: %s",ei->ifp->name); alist = ei->list[EIGRP_FILTER_IN]; - if (alist) { - zlog_info ("ALIST INT IN: %s", alist->name); - } else { - zlog_info("ALIST INT IN je prazdny"); - } /* Check if access-list fits */ - if (alist && access_list_apply (alist, (struct prefix *) dest_addr) == FILTER_DENY) + if (alist && + access_list_apply (alist, (struct prefix *)&dest_addr) == FILTER_DENY) { /* If yes, set reported metric to Max */ - zlog_info("INT IN: Nastavujem metriku na MAX"); ne->reported_metric.delay = EIGRP_MAX_METRIC; - zlog_info("INT IN Prefix: %s", inet_ntoa(dest_addr->prefix)); - } else { - zlog_info("INT IN: NENastavujem metriku "); - } + } plist = ei->prefix[EIGRP_FILTER_IN]; - if (plist) { - zlog_info ("PLIST INT IN: %s", plist->name); - } else { - zlog_info("PLIST INT IN je prazdny"); - } - /* Check if prefix-list fits */ - if (plist && prefix_list_apply (plist, - (struct prefix *) dest_addr) == PREFIX_DENY) + if (plist && + prefix_list_apply (plist, (struct prefix *)&dest_addr) == PREFIX_DENY) { /* If yes, set reported metric to Max */ - zlog_info("PLIST INT IN: Nastavujem metriku na MAX"); ne->reported_metric.delay = EIGRP_MAX_METRIC; - zlog_info("PLIST INT IN Prefix: %s", inet_ntoa(dest_addr->prefix)); - } else { - zlog_info("PLIST INT IN: NENastavujem metriku "); - } + } /* * End of filtering */ ne->distance = eigrp_calculate_total_metrics(eigrp, ne); - zlog_info("distance); - zlog_info("total_metric.delay); - pe->fdistance = pe->distance = pe->rdistance = ne->distance; ne->prefix = pe; @@ -669,6 +631,7 @@ eigrp_update_send (struct eigrp_interface *ei) struct prefix_list *plist_i; struct eigrp *e; struct prefix_ipv4 *dest_addr; + bool packet_sent = false; u_int16_t length = EIGRP_HEADER_LEN; @@ -740,7 +703,8 @@ eigrp_update_send (struct eigrp_interface *ei) return; } - if((IF_DEF_PARAMS (ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) && (IF_DEF_PARAMS (ei->ifp)->auth_keychain != NULL)) + if((IF_DEF_PARAMS (ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) + && (IF_DEF_PARAMS (ei->ifp)->auth_keychain != NULL)) { eigrp_make_md5_digest(ei,ep->s, EIGRP_AUTH_UPDATE_FLAG); } @@ -762,6 +726,7 @@ eigrp_update_send (struct eigrp_interface *ei) { if (nbr->state == EIGRP_NEIGHBOR_UP) { + packet_sent = true; /*Put packet to retransmission queue*/ eigrp_fifo_push_head(nbr->retrans_queue, ep); @@ -771,6 +736,9 @@ eigrp_update_send (struct eigrp_interface *ei) } } } + + if (!packet_sent) + eigrp_packet_free(ep); } void From 7922fc65ae0bf5ec211064d8610d4122ddbb4e20 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 19:02:34 -0400 Subject: [PATCH 052/193] lib, zebra: Cleanup vrf api some Segregate the vrf enable/disable functionality from other vrf code. This is to ensure that people are not actually using the functions when they should not be. Also document the why of it properly in the new vrf_int.h header. Signed-off-by: Donald Sharp --- lib/vrf.c | 1 + lib/vrf.h | 2 -- lib/vrf_int.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++ lib/zclient.c | 2 ++ zebra/if_netlink.c | 1 + 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 lib/vrf_int.h diff --git a/lib/vrf.c b/lib/vrf.c index ce57bb6e7a..4fde134e44 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -24,6 +24,7 @@ #include "if.h" #include "vrf.h" +#include "vrf_int.h" #include "prefix.h" #include "table.h" #include "log.h" diff --git a/lib/vrf.h b/lib/vrf.h index f8bb07ef48..418d891a35 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -111,8 +111,6 @@ extern void vrf_add_hook (int, int (*)(struct vrf *)); extern struct vrf *vrf_lookup_by_id (vrf_id_t); extern struct vrf *vrf_lookup_by_name (const char *); extern struct vrf *vrf_get (vrf_id_t, const char *); -extern void vrf_delete (struct vrf *); -extern int vrf_enable (struct vrf *); extern vrf_id_t vrf_name_to_id (const char *); #define VRF_GET_ID(V,NAME) \ diff --git a/lib/vrf_int.h b/lib/vrf_int.h new file mode 100644 index 0000000000..f0301b7670 --- /dev/null +++ b/lib/vrf_int.h @@ -0,0 +1,56 @@ +/* + * VRF Internal Header + * Copyright (C) 2017 Cumulus Networks, Inc. + * Donald Sharp + * + * This file is part of FRR. + * + * FRR is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * FRR 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 FRR; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ +#ifndef __LIB_VRF_PRIVATE_H__ +#define __LIB_VRF_PRIVATE_H__ + +#include "vrf.h" + +/* + * These functions should only be called by: + * zebra/if_netlink.c -> The interface from OS into Zebra + * lib/zclient.c -> The interface from Zebra to each daemon + * + * Why you ask? Well because these are the turn on/off + * functions and the only place we can really turn a + * vrf on properly is in the call up from the os -> zebra + * and the pass through of this informatoin from zebra -> protocols + */ + +/* + * vrf_enable + * + * Given a newly running vrf enable it to be used + * by interested routing protocols + */ +extern int vrf_enable (struct vrf *); + +/* + * vrf_delete + * + * Given a vrf that is being deleted, delete it + * from interested parties + */ +extern void vrf_delete (struct vrf *); + +#endif + diff --git a/lib/zclient.c b/lib/zclient.c index 1d3c93d85d..5d1ca00c92 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -26,6 +26,8 @@ #include "stream.h" #include "buffer.h" #include "network.h" +#include "vrf.h" +#include "vrf_int.h" #include "if.h" #include "log.h" #include "thread.h" diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 006fcf16f4..256f4d6567 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -38,6 +38,7 @@ #include "privs.h" #include "nexthop.h" #include "vrf.h" +#include "vrf_int.h" #include "mpls.h" #include "vty.h" From 759927a1b9e1a0a820e05dbb6ce12fb16c8f9b34 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 19:11:20 -0400 Subject: [PATCH 053/193] *: Remove some unneeded functions vrf_iflist_create -> By the time this is called in enable, the vrf's iflist is already created. Additionally this code should be a properly of the vrf to init/destroy not someone else. vrf_iflist_terminate -> This function should be a property of vrf deletion and does not need to be exposed. Signed-off-by: Donald Sharp --- bgpd/bgpd.c | 19 +------------------ lib/vrf.c | 18 ------------------ lib/vrf.h | 6 ++---- pimd/pim_iface.c | 1 - 4 files changed, 3 insertions(+), 41 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 2c04f79478..9af48eafb8 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -94,7 +94,6 @@ struct community_list_handler *bgp_clist; unsigned int multipath_num = MULTIPATH_NUM; -static void bgp_if_init (struct bgp *bgp); static void bgp_if_finish (struct bgp *bgp); extern struct zclient *zclient; @@ -3115,10 +3114,7 @@ bgp_get (struct bgp **bgp_val, as_t *as, const char *name, vrf = bgp_vrf_lookup_by_instance_type (bgp); if (vrf) - { - bgp_vrf_link (bgp, vrf); - bgp_if_init (bgp); - } + bgp_vrf_link (bgp, vrf); } /* Register with Zebra, if needed */ @@ -7654,19 +7650,6 @@ bgp_master_init (struct thread_master *master) QOBJ_REG (bm, bgp_master); } -/* - * Initialize interface list for instance, if needed. Invoked upon - * instance create. - */ -static void -bgp_if_init (struct bgp *bgp) -{ - if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) - return; - - vrf_iflist_create (bgp->vrf_id); -} - /* * Free up connected routes and interfaces for a BGP instance. Invoked upon * instance delete (non-default only) or BGP exit. diff --git a/lib/vrf.c b/lib/vrf.c index 4fde134e44..41b6a05b3a 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -310,24 +310,6 @@ vrf_iflist_get (vrf_id_t vrf_id) return vrf->iflist; } -/* Create the interface list for the specified VRF, if needed. */ -void -vrf_iflist_create (vrf_id_t vrf_id) -{ - struct vrf * vrf = vrf_lookup_by_id (vrf_id); - if (vrf && !vrf->iflist) - if_init (&vrf->iflist); -} - -/* Free the interface list of the specified VRF. */ -void -vrf_iflist_terminate (vrf_id_t vrf_id) -{ - struct vrf * vrf = vrf_lookup_by_id (vrf_id); - if (vrf && vrf->iflist) - if_terminate (&vrf->iflist); -} - /* * VRF bit-map */ diff --git a/lib/vrf.h b/lib/vrf.h index 418d891a35..053be89684 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -108,6 +108,8 @@ extern struct vrf_name_head vrfs_by_name; */ extern void vrf_add_hook (int, int (*)(struct vrf *)); +int (*vrf_callback)(struct vrf *); + extern struct vrf *vrf_lookup_by_id (vrf_id_t); extern struct vrf *vrf_lookup_by_name (const char *); extern struct vrf *vrf_get (vrf_id_t, const char *); @@ -146,10 +148,6 @@ extern void *vrf_info_lookup (vrf_id_t); extern struct list *vrf_iflist (vrf_id_t); /* Get the interface list of the specified VRF. Create one if not find. */ extern struct list *vrf_iflist_get (vrf_id_t); -/* Create the interface list for the specified VRF, if needed. */ -extern void vrf_iflist_create (vrf_id_t vrf_id); -/* Free the interface list of the specified VRF. */ -extern void vrf_iflist_terminate (vrf_id_t vrf_id); /* * VRF bit-map: maintaining flags, one bit per VRF ID diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 48a59344eb..2cbf63e7d5 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -61,7 +61,6 @@ pim_if_init (void) for (i = 0; i < MAXVIFS; i++) pim_iface_vif_index[i] = 0; - vrf_iflist_create(VRF_DEFAULT); pim_ifchannel_list = list_new(); pim_ifchannel_list->cmp = (int (*)(void *, void *))pim_ifchannel_compare; } From 6df853648784baf44c55d026bd8e4f0976bd1607 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 19:31:27 -0400 Subject: [PATCH 054/193] *: Consolidate vrf_hooks into vrf_init We only needed to add/change the vrf callbacks when we initialize the vrf subsystem. As such it is not necessary to handle the callbacks in any other way than through the init function. Signed-off-by: Donald Sharp --- bgpd/bgp_main.c | 15 ++++----------- eigrpd/eigrp_main.c | 2 +- isisd/isis_main.c | 2 +- ldpd/ldpd.c | 2 +- lib/vrf.c | 37 +++++++++---------------------------- lib/vrf.h | 26 ++++---------------------- nhrpd/nhrp_main.c | 2 +- ospf6d/ospf6_main.c | 2 +- ospfd/ospf_main.c | 2 +- pimd/pimd.c | 15 ++++----------- ripd/rip_main.c | 2 +- ripngd/ripng_main.c | 2 +- zebra/zebra_vrf.c | 9 ++++----- 13 files changed, 33 insertions(+), 85 deletions(-) diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 3b844cf70e..644a091c31 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -327,22 +327,15 @@ bgp_vrf_disable (struct vrf *vrf) static void bgp_vrf_init (void) { - vrf_add_hook (VRF_NEW_HOOK, bgp_vrf_new); - vrf_add_hook (VRF_ENABLE_HOOK, bgp_vrf_enable); - vrf_add_hook (VRF_DISABLE_HOOK, bgp_vrf_disable); - vrf_add_hook (VRF_DELETE_HOOK, bgp_vrf_delete); - - vrf_init (); + vrf_init (bgp_vrf_new, + bgp_vrf_enable, + bgp_vrf_disable, + bgp_vrf_delete); } static void bgp_vrf_terminate (void) { - vrf_add_hook (VRF_NEW_HOOK, NULL); - vrf_add_hook (VRF_ENABLE_HOOK, NULL); - vrf_add_hook (VRF_DISABLE_HOOK, NULL); - vrf_add_hook (VRF_DELETE_HOOK, NULL); - vrf_terminate (); } diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c index 6a5e3b1a04..e71464fdbb 100644 --- a/eigrpd/eigrp_main.c +++ b/eigrpd/eigrp_main.c @@ -182,7 +182,7 @@ main (int argc, char **argv, char **envp) eigrp_om->master = frr_init(); master = eigrp_om->master; - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); /*EIGRPd init*/ eigrp_if_init (); diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 644b652d44..b895f61dce 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -206,7 +206,7 @@ main (int argc, char **argv, char **envp) * initializations */ access_list_init(); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); prefix_list_init(); isis_init (); isis_circuit_init (); diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index a0b021dfd9..710dcd15f4 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -329,7 +329,7 @@ main(int argc, char *argv[]) cmd_init(1); vty_config_lockless(); vty_init(master); - vrf_init(); + vrf_init(NULL, NULL, NULL, NULL); access_list_init(); ldp_vty_init(); ldp_zebra_init(master); diff --git a/lib/vrf.c b/lib/vrf.c index 41b6a05b3a..7d8a118763 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -238,33 +238,6 @@ vrf_disable (struct vrf *vrf) (*vrf_master.vrf_disable_hook) (vrf); } - -/* Add a VRF hook. Please add hooks before calling vrf_init(). */ -void -vrf_add_hook (int type, int (*func)(struct vrf *)) -{ - if (debug_vrf) - zlog_debug ("%s: Add Hook %d to function %p", __PRETTY_FUNCTION__, - type, func); - - switch (type) { - case VRF_NEW_HOOK: - vrf_master.vrf_new_hook = func; - break; - case VRF_DELETE_HOOK: - vrf_master.vrf_delete_hook = func; - break; - case VRF_ENABLE_HOOK: - vrf_master.vrf_enable_hook = func; - break; - case VRF_DISABLE_HOOK: - vrf_master.vrf_disable_hook = func; - break; - default: - break; - } -} - vrf_id_t vrf_name_to_id (const char *name) { @@ -407,13 +380,21 @@ vrf_bitmap_check (vrf_bitmap_t bmap, vrf_id_t vrf_id) /* Initialize VRF module. */ void -vrf_init (void) +vrf_init (int (*create)(struct vrf *), + int (*enable)(struct vrf *), + int (*disable)(struct vrf *), + int (*delete)(struct vrf *)) { struct vrf *default_vrf; if (debug_vrf) zlog_debug ("%s: Initializing VRF subsystem", __PRETTY_FUNCTION__); + vrf_master.vrf_new_hook = create; + vrf_master.vrf_enable_hook = enable; + vrf_master.vrf_disable_hook = disable; + vrf_master.vrf_delete_hook = delete; + /* The default VRF always exists. */ default_vrf = vrf_get (VRF_DEFAULT, VRF_DEFAULT_NAME); if (!default_vrf) diff --git a/lib/vrf.h b/lib/vrf.h index 053be89684..a08258a929 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -57,15 +57,6 @@ enum { #define VRF_CMD_HELP_STR "Specify the VRF\nThe VRF name\n" #define VRF_ALL_CMD_HELP_STR "Specify the VRF\nAll VRFs\n" -/* - * VRF hooks - */ - -#define VRF_NEW_HOOK 0 /* a new VRF is just created */ -#define VRF_DELETE_HOOK 1 /* a VRF is to be deleted */ -#define VRF_ENABLE_HOOK 2 /* a VRF is ready to use */ -#define VRF_DISABLE_HOOK 3 /* a VRF is to be unusable */ - struct vrf { RB_ENTRY(vrf) id_entry, name_entry; @@ -98,18 +89,6 @@ DECLARE_QOBJ_TYPE(vrf) extern struct vrf_id_head vrfs_by_id; extern struct vrf_name_head vrfs_by_name; -/* - * Add a specific hook to VRF module. - * @param1: hook type - * @param2: the callback function - * - param 1: the VRF ID - * - param 2: the address of the user data pointer (the user data - * can be stored in or freed from there) - */ -extern void vrf_add_hook (int, int (*)(struct vrf *)); - -int (*vrf_callback)(struct vrf *); - extern struct vrf *vrf_lookup_by_id (vrf_id_t); extern struct vrf *vrf_lookup_by_name (const char *); extern struct vrf *vrf_get (vrf_id_t, const char *); @@ -166,7 +145,10 @@ extern int vrf_bitmap_check (vrf_bitmap_t, vrf_id_t); * VRF initializer/destructor */ /* Please add hooks before calling vrf_init(). */ -extern void vrf_init (void); +extern void vrf_init (int (*create)(struct vrf *), + int (*enable)(struct vrf *), + int (*disable)(struct vrf *), + int (*delete)(struct vrf *)); extern void vrf_terminate (void); extern void vrf_cmd_init (int (*writefunc)(struct vty *vty)); diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c index a44ce35bb8..7c5d80336c 100644 --- a/nhrpd/nhrp_main.c +++ b/nhrpd/nhrp_main.c @@ -129,7 +129,7 @@ int main(int argc, char **argv) /* Library inits. */ master = frr_init(); nhrp_interface_init(); - vrf_init(); + vrf_init(NULL, NULL, NULL, NULL); resolver_init(); /* Run with elevated capabilities, as for all netlink activity diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 54ae4645ad..198a881106 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -222,7 +222,7 @@ main (int argc, char *argv[], char *envp[]) /* thread master */ master = frr_init (); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); access_list_init (); prefix_list_init (); diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 38718b35d5..a5f430e051 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -207,7 +207,7 @@ main (int argc, char **argv) /* Library inits. */ debug_init (); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); access_list_init (); prefix_list_init (); diff --git a/pimd/pimd.c b/pimd/pimd.c index fc6663776b..6b75a93914 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -141,22 +141,15 @@ pim_vrf_disable (struct vrf *vrf) void pim_vrf_init (void) { - vrf_add_hook (VRF_NEW_HOOK, pim_vrf_new); - vrf_add_hook (VRF_ENABLE_HOOK, pim_vrf_enable); - vrf_add_hook (VRF_DISABLE_HOOK, pim_vrf_disable); - vrf_add_hook (VRF_DELETE_HOOK, pim_vrf_delete); - - vrf_init (); + vrf_init (pim_vrf_new, + pim_vrf_enable, + pim_vrf_disable, + pim_vrf_delete); } static void pim_vrf_terminate (void) { - vrf_add_hook (VRF_NEW_HOOK, NULL); - vrf_add_hook (VRF_ENABLE_HOOK, NULL); - vrf_add_hook (VRF_DISABLE_HOOK, NULL); - vrf_add_hook (VRF_DELETE_HOOK, NULL); - vrf_terminate (); } diff --git a/ripd/rip_main.c b/ripd/rip_main.c index 62ea6dd078..a4509cc064 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -178,7 +178,7 @@ main (int argc, char **argv) /* Library initialization. */ keychain_init (); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); /* RIP related initialization. */ rip_init (); diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index 9d97df5c41..5767b08636 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -178,7 +178,7 @@ main (int argc, char **argv) master = frr_init (); /* Library inits. */ - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); /* RIPngd inits. */ ripng_init (); diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 6b36891056..1e6142038d 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -536,11 +536,10 @@ vrf_config_write (struct vty *vty) void zebra_vrf_init (void) { - vrf_add_hook (VRF_NEW_HOOK, zebra_vrf_new); - vrf_add_hook (VRF_ENABLE_HOOK, zebra_vrf_enable); - vrf_add_hook (VRF_DISABLE_HOOK, zebra_vrf_disable); - vrf_add_hook (VRF_DELETE_HOOK, zebra_vrf_delete); + vrf_init (zebra_vrf_new, + zebra_vrf_enable, + zebra_vrf_disable, + zebra_vrf_delete); - vrf_init (); vrf_cmd_init (vrf_config_write); } From 97b1a80cbb7ca5582972d700dbed6e011cbd9f83 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 19:37:16 -0400 Subject: [PATCH 055/193] lib: Add some more documentation to vrf.h Signed-off-by: Donald Sharp --- lib/vrf.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/vrf.h b/lib/vrf.h index a08258a929..14917eec02 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -143,12 +143,31 @@ extern int vrf_bitmap_check (vrf_bitmap_t, vrf_id_t); /* * VRF initializer/destructor + * + * create -> Called back when a new VRF is created. This + * can be either through these 3 options: + * 1) CLI mentions a vrf before OS knows about it + * 2) OS calls zebra and we create the vrf from OS + * callback + * 3) zebra calls individual protocols to notify + * about the new vrf + * + * enable -> Called back when a VRF is actually usable from + * an OS perspective ( 2 and 3 above ) + * + * disable -> Called back when a VRF is being deleted from + * the system ( 2 and 3 ) above + * + * delete -> Called back when a vrf is being deleted from + * the system ( 2 and 3 ) above. */ -/* Please add hooks before calling vrf_init(). */ extern void vrf_init (int (*create)(struct vrf *), int (*enable)(struct vrf *), int (*disable)(struct vrf *), int (*delete)(struct vrf *)); +/* + * Call vrf_terminate when the protocol is being shutdown + */ extern void vrf_terminate (void); extern void vrf_cmd_init (int (*writefunc)(struct vty *vty)); From 7298b8ccd59827de1f0777ed97532f5e29f01904 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 20:46:06 -0400 Subject: [PATCH 056/193] eigrpd: Fix arm compile issue with some gcc's Signed-off-by: Donald Sharp --- eigrpd/eigrp_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index 97ef37d8a9..010f201cd5 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -313,7 +313,7 @@ show_ip_eigrp_prefix_entry (struct vty *vty, struct eigrp_prefix_entry *tn) vty_out (vty, "%-3c",(tn->state > 0) ? 'A' : 'P'); vty_out (vty, "%s/%u, ",inet_ntoa (tn->destination_ipv4->prefix),tn->destination_ipv4->prefixlen); vty_out (vty, "%u successors, ",eigrp_topology_get_successor(tn)->count); - vty_out (vty, "FD is %u, serno: %lu %s",tn->fdistance, tn->serno, VTY_NEWLINE); + vty_out (vty, "FD is %u, serno: %" PRIu64 " %s",tn->fdistance, tn->serno, VTY_NEWLINE); } void From 291ca371e2974a55799174e2a5447928cab57802 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 20:55:33 -0400 Subject: [PATCH 057/193] lib: Improve error message for the developer I keep getting people asking me about what to do when this error is generated when they are programming new cli. Maybe this is a bit better bread-crumb? Signed-off-by: Donald Sharp --- lib/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/command.c b/lib/command.c index cc597952e4..8ef9fae832 100644 --- a/lib/command.c +++ b/lib/command.c @@ -324,6 +324,7 @@ install_element (enum node_type ntype, struct cmd_element *cmd) { fprintf (stderr, "Command node %d doesn't exist, please check it\n", ntype); + fprintf (stderr, "Have you called install_node before this install_element?\n"); exit (EXIT_FAILURE); } @@ -371,6 +372,7 @@ uninstall_element (enum node_type ntype, struct cmd_element *cmd) { fprintf (stderr, "Command node %d doesn't exist, please check it\n", ntype); + fprintf (stderr, "Have you called install_node before this install_element?\n"); exit (EXIT_FAILURE); } From cc629aef4a1a4bb08123ca72312be5e9b28f27c5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 22:00:28 -0400 Subject: [PATCH 058/193] tests: Fix vrf_init to have correct call Signed-off-by: Donald Sharp --- tests/bgpd/test_capability.c | 2 +- tests/bgpd/test_mp_attr.c | 2 +- tests/bgpd/test_mpath.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index c3de6a16e8..787a398f3c 100644 --- a/tests/bgpd/test_capability.c +++ b/tests/bgpd/test_capability.c @@ -651,7 +651,7 @@ main (void) qobj_init (); master = thread_master_create (); bgp_master_init (master); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); bgp_option_set (BGP_OPT_NO_LISTEN); if (fileno (stdout) >= 0) diff --git a/tests/bgpd/test_mp_attr.c b/tests/bgpd/test_mp_attr.c index 6824c11fea..7c1200b32b 100644 --- a/tests/bgpd/test_mp_attr.c +++ b/tests/bgpd/test_mp_attr.c @@ -751,7 +751,7 @@ main (void) qobj_init (); master = thread_master_create (); bgp_master_init (master); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); bgp_option_set (BGP_OPT_NO_LISTEN); bgp_attr_init (); diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c index a2fd66528c..9e406c397b 100644 --- a/tests/bgpd/test_mpath.c +++ b/tests/bgpd/test_mpath.c @@ -380,7 +380,7 @@ global_test_init (void) master = thread_master_create (); zclient = zclient_new(master); bgp_master_init (master); - vrf_init (); + vrf_init (NULL, NULL, NULL, NULL); bgp_option_set (BGP_OPT_NO_LISTEN); if (fileno (stdout) >= 0) From b84ccd40895bfc9660b1cb36821192d2910ae984 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 22:29:10 -0400 Subject: [PATCH 059/193] bgpd: Revert incorrect handling of data data is actually allowed to be NULL. So allow pass in. Signed-off-by: Donald Sharp --- bgpd/bgp_packet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index ca211589f7..0800dd74ba 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -603,8 +603,6 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code, struct stream *s; int length; - assert (data); - /* Allocate new stream. */ s = stream_new (BGP_MAX_PACKET_SIZE); @@ -616,7 +614,8 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code, stream_putc (s, sub_code); /* BGP notify sub_code */ /* If notify data is present. */ - stream_write (s, data, datalen); + if (data) + stream_write (s, data, datalen); /* Set BGP packet length. */ length = bgp_packet_set_size (s); From 21a15acdde0f428fa2e9926d69a8a484249228d0 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 16 May 2017 07:49:46 -0400 Subject: [PATCH 060/193] lib: Fix missing vrf_int.h from `make distribute` Signed-off-by: Donald Sharp --- lib/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Makefile.am b/lib/Makefile.am index 6e3c6d680d..e3e58fedf6 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -78,6 +78,7 @@ pkginclude_HEADERS = \ libfrr.h \ sha256.h \ frr_pthread.h \ + vrf_int.h \ # end noinst_HEADERS = \ From 439aa9fa39bc14628726a664bce6d163de132b60 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 2 May 2017 22:48:32 -0400 Subject: [PATCH 061/193] ospf6d: Fix 'no area .. range...' command The cli uplift had confused some parameters. Signed-off-by: Donald Sharp --- ospf6d/ospf6_area.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 198526a0eb..2b25585e6c 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -523,6 +523,7 @@ DEFUN (no_area_range, "Advertised metric for this range\n") { int idx_ipv4 = 2; + int idx_ipv6 = 4; int ret; struct ospf6_area *oa; struct prefix prefix; @@ -530,17 +531,17 @@ DEFUN (no_area_range, OSPF6_CMD_AREA_GET (argv[idx_ipv4]->arg, oa); - ret = str2prefix (argv[idx_ipv4]->arg, &prefix); + ret = str2prefix (argv[idx_ipv6]->arg, &prefix); if (ret != 1 || prefix.family != AF_INET6) { - vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv4]->arg, VNL); + vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv6]->arg, VNL); return CMD_SUCCESS; } range = ospf6_route_lookup (&prefix, oa->range_table); if (range == NULL) { - vty_out (vty, "Range %s does not exists.%s", argv[idx_ipv4]->arg, VNL); + vty_out (vty, "Range %s does not exists.%s", argv[idx_ipv6]->arg, VNL); return CMD_SUCCESS; } @@ -562,9 +563,6 @@ DEFUN (no_area_range, return CMD_SUCCESS; } - - - void ospf6_area_config_write (struct vty *vty) { From 1a5ce38b9f894f81f757da1fba6efa2b3698b31e Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 5 May 2017 07:33:17 -0400 Subject: [PATCH 062/193] ospfd: Actually fix ospf redistribute. This is the final time I swear! Signed-off-by: Donald Sharp --- ospfd/ospf_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index f5880ca9e3..44bf1b8667 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -7160,7 +7160,7 @@ DEFUN (no_ospf_redistribute_source, DEFUN (ospf_redistribute_instance_source, ospf_redistribute_instance_source_cmd, - "redistribute (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}", + "redistribute (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]", REDIST_STR "Open Shortest Path First\n" "Non-main Kernel Routing Table\n" @@ -7231,7 +7231,7 @@ DEFUN (ospf_redistribute_instance_source, DEFUN (no_ospf_redistribute_instance_source, no_ospf_redistribute_instance_source_cmd, - "no redistribute (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}", + "no redistribute (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]", NO_STR REDIST_STR "Open Shortest Path First\n" From 604bbacbcf9e3dbee2c72d2454d20c54a3f9803f Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 16 May 2017 09:48:18 -0400 Subject: [PATCH 063/193] bgpd: resolve issue with sending vpn labels Found issue where sending labels using "address-family ipv4 vpn" was broken by the labeled-unicast changes. Signed-off-by: Don Slice --- bgpd/bgp_updgrp_packet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index f734763b70..87a9cfdcfa 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -763,7 +763,13 @@ subgroup_update_packet (struct update_subgroup *subgrp) if (rn->prn) prd = (struct prefix_rd *) &rn->prn->p; - tag = bgp_adv_label(rn, binfo, peer, afi, safi); + + if (safi == SAFI_LABELED_UNICAST) + tag = bgp_adv_label(rn, binfo, peer, afi, safi); + else + if (binfo && binfo->extra) + tag = binfo->extra->tag; + if (bgp_labeled_safi(safi)) sprintf (label_buf, "label %u", label_pton(tag)); From 56a94b366832f022db1f6dbd403dbdd82ac6eee9 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 16 May 2017 15:46:41 +0000 Subject: [PATCH 064/193] lib: return thread pointer from thread_add* Allow some more flexibility in case callers wish to manage their own thread pointers and don't require or don't want the thread to keep a back reference to its holding pointer. Signed-off-by: Quentin Young --- lib/thread.c | 38 ++++++++++++++++++++++---------------- lib/thread.h | 12 ++++++------ 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index aef9ac5cf9..efc0dfb2a4 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -777,7 +777,7 @@ fd_clear_read_write (struct thread *thread) } /* Add new read thread. */ -void +struct thread * funcname_thread_add_read_write (int dir, struct thread_master *m, int (*func) (struct thread *), void *arg, int fd, struct thread **t_ptr, debugargdef) @@ -789,7 +789,7 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, if (t_ptr && *t_ptr) // thread is already scheduled; don't reschedule { pthread_mutex_unlock (&m->mtx); - return; + return NULL; } #if defined (HAVE_POLL_CALL) @@ -839,9 +839,11 @@ funcname_thread_add_read_write (int dir, struct thread_master *m, } } pthread_mutex_unlock (&m->mtx); + + return thread; } -static void +static struct thread * funcname_thread_add_timer_timeval (struct thread_master *m, int (*func) (struct thread *), int type, void *arg, struct timeval *time_relative, struct thread **t_ptr, debugargdef) @@ -859,7 +861,7 @@ funcname_thread_add_timer_timeval (struct thread_master *m, if (t_ptr && *t_ptr) // thread is already scheduled; don't reschedule { pthread_mutex_unlock (&m->mtx); - return; + return NULL; } queue = ((type == THREAD_TIMER) ? m->timer : m->background); @@ -879,11 +881,13 @@ funcname_thread_add_timer_timeval (struct thread_master *m, pthread_mutex_unlock (&thread->mtx); } pthread_mutex_unlock (&m->mtx); + + return thread; } /* Add timer event thread. */ -void +struct thread * funcname_thread_add_timer (struct thread_master *m, int (*func) (struct thread *), void *arg, long timer, struct thread **t_ptr, debugargdef) @@ -900,7 +904,7 @@ funcname_thread_add_timer (struct thread_master *m, } /* Add timer event thread with "millisecond" resolution */ -void +struct thread * funcname_thread_add_timer_msec (struct thread_master *m, int (*func) (struct thread *), void *arg, long timer, struct thread **t_ptr, debugargdef) @@ -912,22 +916,22 @@ funcname_thread_add_timer_msec (struct thread_master *m, trel.tv_sec = timer / 1000; trel.tv_usec = 1000*(timer % 1000); - funcname_thread_add_timer_timeval (m, func, THREAD_TIMER, arg, &trel, - t_ptr, debugargpass); + return funcname_thread_add_timer_timeval (m, func, THREAD_TIMER, arg, &trel, + t_ptr, debugargpass); } /* Add timer event thread with "millisecond" resolution */ -void +struct thread * funcname_thread_add_timer_tv (struct thread_master *m, int (*func) (struct thread *), void *arg, struct timeval *tv, struct thread **t_ptr, debugargdef) { - funcname_thread_add_timer_timeval (m, func, THREAD_TIMER, arg, tv, t_ptr, - debugargpass); + return funcname_thread_add_timer_timeval (m, func, THREAD_TIMER, arg, tv, + t_ptr, debugargpass); } /* Add a background thread, with an optional millisec delay */ -void +struct thread * funcname_thread_add_background (struct thread_master *m, int (*func) (struct thread *), void *arg, long delay, struct thread **t_ptr, debugargdef) @@ -947,12 +951,12 @@ funcname_thread_add_background (struct thread_master *m, trel.tv_usec = 0; } - funcname_thread_add_timer_timeval (m, func, THREAD_BACKGROUND, arg, &trel, - t_ptr, debugargpass); + return funcname_thread_add_timer_timeval (m, func, THREAD_BACKGROUND, arg, &trel, + t_ptr, debugargpass); } /* Add simple event thread. */ -void +struct thread * funcname_thread_add_event (struct thread_master *m, int (*func) (struct thread *), void *arg, int val, struct thread **t_ptr, debugargdef) @@ -966,7 +970,7 @@ funcname_thread_add_event (struct thread_master *m, if (t_ptr && *t_ptr) // thread is already scheduled; don't reschedule { pthread_mutex_unlock (&m->mtx); - return; + return NULL; } thread = thread_get (m, THREAD_EVENT, func, arg, debugargpass); @@ -984,6 +988,8 @@ funcname_thread_add_event (struct thread_master *m, } } pthread_mutex_unlock (&m->mtx); + + return thread; } static void diff --git a/lib/thread.h b/lib/thread.h index 3eaae8883b..fa2d2e0387 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -185,22 +185,22 @@ extern struct thread_master *thread_master_create (void); extern void thread_master_free (struct thread_master *); extern void thread_master_free_unused(struct thread_master *); -extern void funcname_thread_add_read_write (int dir, struct thread_master *, +extern struct thread * funcname_thread_add_read_write (int dir, struct thread_master *, int (*)(struct thread *), void *, int, struct thread **, debugargdef); -extern void funcname_thread_add_timer (struct thread_master *, +extern struct thread * funcname_thread_add_timer (struct thread_master *, int (*)(struct thread *), void *, long, struct thread **, debugargdef); -extern void funcname_thread_add_timer_msec (struct thread_master *, +extern struct thread * funcname_thread_add_timer_msec (struct thread_master *, int (*)(struct thread *), void *, long, struct thread **, debugargdef); -extern void funcname_thread_add_timer_tv (struct thread_master *, +extern struct thread * funcname_thread_add_timer_tv (struct thread_master *, int (*)(struct thread *), void *, struct timeval *, struct thread **, debugargdef); -extern void funcname_thread_add_event (struct thread_master *, +extern struct thread * funcname_thread_add_event (struct thread_master *, int (*)(struct thread *), void *, int, struct thread **, debugargdef); -extern void funcname_thread_add_background (struct thread_master *, +extern struct thread * funcname_thread_add_background (struct thread_master *, int (*)(struct thread *), void *, long, struct thread **, debugargdef); extern void funcname_thread_execute (struct thread_master *, From d818259863dea568aaf6a275b9dfdd3755f9f2a2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 16 May 2017 15:51:30 +0000 Subject: [PATCH 065/193] lib: let vty.c manage its own pointers vty.c doesn't require back refs for a couple threads Signed-off-by: Quentin Young --- lib/vty.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/vty.c b/lib/vty.c index e490d30a8a..56ec707282 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2633,18 +2633,18 @@ static struct thread_master *vty_master; static void vty_event (enum event event, int sock, struct vty *vty) { + struct thread *vty_serv_thread = NULL; + switch (event) { case VTY_SERV: - vector_set_index (Vvty_serv_thread, sock, NULL); - thread_add_read(vty_master, vty_accept, vty, sock, - (struct thread **) &Vvty_serv_thread->index[sock]); + vty_serv_thread = thread_add_read(vty_master, vty_accept, vty, sock, NULL); + vector_set_index (Vvty_serv_thread, sock, vty_serv_thread); break; #ifdef VTYSH case VTYSH_SERV: - vector_set_index (Vvty_serv_thread, sock, NULL); - thread_add_read(vty_master, vtysh_accept, vty, sock, - (struct thread **) &Vvty_serv_thread->index[sock]); + vty_serv_thread = thread_add_read(vty_master, vtysh_accept, vty, sock, NULL); + vector_set_index (Vvty_serv_thread, sock, vty_serv_thread); break; case VTYSH_READ: vty->t_read = NULL; From 76ca2fbaa2b8810b7015ee03aafcab25e385fa48 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 8 Mar 2017 10:27:21 -0500 Subject: [PATCH 066/193] pimd: Fix core from json static mroute show When we have no normal mroutes and only static mroutes there exists a code path where we attempted to dereference c_oil when we were showing static mroutes. Looks like a cut-n-paste error, we should be using s_route->c_oil there Ticket: CM-15013 Signed-off-by: Donald Sharp --- pimd/pim_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 1224bc5fc8..d5dbe4f7ab 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3274,7 +3274,7 @@ static void show_mroute(struct vty *vty, u_char uj) json_object_string_add(json_ifp_out, "group", grp_str); json_object_boolean_true_add(json_ifp_out, "protocolStatic"); json_object_string_add(json_ifp_out, "inboundInterface", in_ifname); - json_object_int_add(json_ifp_out, "iVifI", c_oil->oil.mfcc_parent); + json_object_int_add(json_ifp_out, "iVifI", s_route->c_oil.oil.mfcc_parent); json_object_string_add(json_ifp_out, "outboundInterface", out_ifname); json_object_int_add(json_ifp_out, "oVifI", oif_vif_index); json_object_int_add(json_ifp_out, "ttl", ttl); From 5578590086b49586c7967ad75da0e58e28dcf368 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 9 May 2017 11:30:43 -0700 Subject: [PATCH 067/193] pimd: Avoid deleting SGRpt entry from PP->P state -Upon Receving SGRpt Prune message, transitioning from Prune Pending state to NOINFO state, ifchannel entry was getting deleted in prune pending timer expiry. This can result in SGRpt ifhchannel deleted and recreated upon receving triggered or periodic SGRpt received from downstream. The automation test failed as it expected (check) SGRpt entry at RP after it triggers SPT switchover. - While transitioning from Prune-Pending state to NOINFO(Pruned) state, Trigger SGRpt message towards RP. - Add/del some of the debug traces Ticket:CM-16057 Reviewed By:CCR-6198 Testing Done: Rerun test08 multiple times and observed passing it. Pim-smoke with hardnode Ran 95 tests in 11219.420s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah --- pimd/pim_ifchannel.c | 49 +++++++++++++++++------ pimd/pim_nht.c | 6 +-- pimd/pim_upstream.c | 95 +++++++++++++++++++++++++------------------- pimd/pim_upstream.h | 2 +- 4 files changed, 96 insertions(+), 56 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index f4fe609605..04f8a22c6b 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -148,7 +148,6 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) /* SGRpt entry could have empty oil */ if (ch->upstream->channel_oil) pim_channel_del_oif (ch->upstream->channel_oil, ch->interface, mask); - pim_channel_del_oif (ch->upstream->channel_oil, ch->interface, mask); /* * Do we have any S,G's that are inheriting? * Nuke from on high too. @@ -179,6 +178,10 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) pim_upstream_update_join_desired(ch->upstream); } + /* upstream is common across ifchannels, check if upstream's + ifchannel list is empty before deleting upstream_del + ref count will take care of it. + */ pim_upstream_del(ch->upstream, __PRETTY_FUNCTION__); ch->upstream = NULL; @@ -200,6 +203,9 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) hash_release(pim_ifp->pim_ifchannel_hash, ch); listnode_delete(pim_ifchannel_list, ch); + if (PIM_DEBUG_PIM_TRACE) + zlog_debug ("%s: ifchannel entry %s is deleted ", __PRETTY_FUNCTION__, ch->sg_str); + pim_ifchannel_free(ch); } @@ -571,14 +577,18 @@ pim_ifchannel_add(struct interface *ifp, listnode_add_sort(up->ifchannels, ch); + if (PIM_DEBUG_PIM_TRACE) + zlog_debug ("%s: ifchannel %s is created ", __PRETTY_FUNCTION__, ch->sg_str); + return ch; } -static void ifjoin_to_noinfo(struct pim_ifchannel *ch) +static void ifjoin_to_noinfo(struct pim_ifchannel *ch, uint8_t ch_del) { pim_forward_stop(ch); pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch, PIM_IFJOIN_NOINFO); - delete_on_noinfo(ch); + if (ch_del) + delete_on_noinfo(ch); } static int on_ifjoin_expiry_timer(struct thread *t) @@ -589,7 +599,7 @@ static int on_ifjoin_expiry_timer(struct thread *t) ch->t_ifjoin_expiry_timer = NULL; - ifjoin_to_noinfo(ch); + ifjoin_to_noinfo(ch, 1); /* ch may have been deleted */ return 0; @@ -613,10 +623,6 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) pim_ifp = ifp->info; send_prune_echo = (listcount(pim_ifp->pim_neighbor_list) > 1); - //ch->ifjoin_state transition to NOINFO - ifjoin_to_noinfo(ch); - /* from here ch may have been deleted */ - if (send_prune_echo) { struct pim_rpf rpf; @@ -625,6 +631,23 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) rpf.rpf_addr.u.prefix4 = pim_ifp->primary_address; pim_jp_agg_single_upstream_send(&rpf, ch->upstream, 0); } + /* If SGRpt flag is set on ifchannel, Trigger SGRpt + message on RP path upon prune timer expiry. + */ + if (PIM_IF_FLAG_TEST_S_G_RPT (ch->flags)) + { + if (ch->upstream) + pim_upstream_update_join_desired(ch->upstream); + /* + ch->ifjoin_state transition to NOINFO state + ch_del is set to 0 for not deleteing from here. + Holdtime expiry (ch_del set to 1) delete the entry. + */ + ifjoin_to_noinfo(ch, 0); + } + else + ifjoin_to_noinfo(ch, 1); + /* from here ch may have been deleted */ } else { @@ -801,7 +824,7 @@ void pim_ifchannel_join_add(struct interface *ifp, (ch->upstream->parent->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP) && !(ch->upstream->flags & PIM_UPSTREAM_FLAG_MASK_SRC_LHR)) { - pim_upstream_ref (ch->upstream, PIM_UPSTREAM_FLAG_MASK_SRC_LHR); + pim_upstream_ref (ch->upstream, PIM_UPSTREAM_FLAG_MASK_SRC_LHR, __PRETTY_FUNCTION__); pim_upstream_keep_alive_timer_start (ch->upstream, qpim_keep_alive_time); } break; @@ -895,8 +918,10 @@ void pim_ifchannel_prune(struct interface *ifp, case PIM_IFJOIN_NOINFO: if (source_flags & PIM_ENCODE_RPT_BIT) { - PIM_IF_FLAG_SET_S_G_RPT(ch->flags); - ch->ifjoin_state = PIM_IFJOIN_PRUNE_PENDING; + if (!(source_flags & PIM_ENCODE_WC_BIT)) + PIM_IF_FLAG_SET_S_G_RPT(ch->flags); + + ch->ifjoin_state = PIM_IFJOIN_PRUNE_PENDING; if (listcount(pim_ifp->pim_neighbor_list) > 1) jp_override_interval_msec = pim_if_jp_override_interval_msec(ifp); else @@ -1306,7 +1331,7 @@ pim_ifchannel_set_star_g_join_state (struct pim_ifchannel *ch, int eom, uint8_t if (up) { if (PIM_DEBUG_TRACE) - zlog_debug ("%s: del inherit oif from up %s", __PRETTY_FUNCTION__, up->sg_str); + zlog_debug ("%s: SGRpt Set, del inherit oif from up %s", __PRETTY_FUNCTION__, up->sg_str); pim_channel_del_oif (up->channel_oil, ch->interface, PIM_OIF_FLAG_PROTO_STAR); } } diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index c5f8d1d826..9165bef566 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -567,7 +567,7 @@ pim_ecmp_nexthop_search (struct pim_nexthop_cache *pnc, //PIM ECMP flag is enable then choose ECMP path. hash_val = pim_compute_ecmp_hash (src, grp); mod_val = hash_val % pnc->nexthop_num; - if (PIM_DEBUG_TRACE) + if (PIM_DEBUG_PIM_TRACE_DETAIL) zlog_debug ("%s: hash_val %u mod_val %u ", __PRETTY_FUNCTION__, hash_val, mod_val); } @@ -914,7 +914,7 @@ pim_ecmp_nexthop_lookup (struct pim_nexthop *nexthop, struct in_addr addr, { hash_val = pim_compute_ecmp_hash (src, grp); mod_val = hash_val % num_ifindex; - if (PIM_DEBUG_TRACE) + if (PIM_DEBUG_PIM_TRACE_DETAIL) zlog_debug ("%s: hash_val %u mod_val %u", __PRETTY_FUNCTION__, hash_val, mod_val); } @@ -1037,7 +1037,7 @@ int pim_ecmp_fib_lookup_if_vif_index(struct in_addr addr, { hash_val = pim_compute_ecmp_hash (src, grp); mod_val = hash_val % num_ifindex; - if (PIM_DEBUG_TRACE) + if (PIM_DEBUG_PIM_TRACE_DETAIL) zlog_debug ("%s: hash_val %u mod_val %u", __PRETTY_FUNCTION__, hash_val, mod_val); } diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index dd6eab9cfe..6fadfc2f29 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -78,9 +78,17 @@ pim_upstream_remove_children (struct pim_upstream *up) while (!list_isempty (up->sources)) { child = listnode_head (up->sources); - child->parent = NULL; listnode_delete (up->sources, child); + if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(child->flags)) + { + PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(child->flags); + child = pim_upstream_del(child, __PRETTY_FUNCTION__); + } + if (child) + child->parent = NULL; } + list_delete(up->sources); + up->sources = NULL; } /* @@ -149,10 +157,14 @@ void pim_upstream_free(struct pim_upstream *up) static void upstream_channel_oil_detach(struct pim_upstream *up) { - if (up->channel_oil) { - pim_channel_oil_del(up->channel_oil); - up->channel_oil = NULL; - } + if (up->channel_oil) + { + /* Detaching from channel_oil, channel_oil may exist post del, + but upstream would not keep reference of it + */ + pim_channel_oil_del(up->channel_oil); + up->channel_oil = NULL; + } } struct pim_upstream * @@ -163,7 +175,7 @@ pim_upstream_del(struct pim_upstream *up, const char *name) if (PIM_DEBUG_TRACE) zlog_debug ("%s(%s): Delete %s ref count: %d , flags: %d c_oil ref count %d (Pre decrement)", - __PRETTY_FUNCTION__, name, up->sg_str, up->ref_count, up->flags, + __PRETTY_FUNCTION__, name, up->sg_str, up->ref_count, up->flags, up->channel_oil->oil_ref_count); --up->ref_count; @@ -195,26 +207,12 @@ pim_upstream_del(struct pim_upstream *up, const char *name) } pim_upstream_remove_children (up); + if (up->sources) + list_delete (up->sources); + up->sources = NULL; pim_mroute_del (up->channel_oil, __PRETTY_FUNCTION__); upstream_channel_oil_detach(up); - if (up->sources) - { - struct listnode *node, *nnode; - struct pim_upstream *child; - for (ALL_LIST_ELEMENTS (up->sources, node, nnode, child)) - { - if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(child->flags)) - { - PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(child->flags); - pim_upstream_del(child, __PRETTY_FUNCTION__); - } - } - - list_delete (up->sources); - } - up->sources = NULL; - list_delete (up->ifchannels); up->ifchannels = NULL; @@ -223,11 +221,10 @@ pim_upstream_del(struct pim_upstream *up, const char *name) into pim_upstream_free() because the later is called by list_delete_all_node() */ - if (up->parent) - { - listnode_delete (up->parent->sources, up); - up->parent = NULL; - } + if (up->parent && up->parent->sources) + listnode_delete (up->parent->sources, up); + up->parent = NULL; + listnode_delete (pim_upstream_list, up); hash_release (pim_upstream_hash, up); @@ -538,13 +535,14 @@ pim_upstream_switch(struct pim_upstream *up, { enum pim_upstream_state old_state = up->join_state; - if (PIM_DEBUG_PIM_EVENTS) { - zlog_debug("%s: PIM_UPSTREAM_%s: (S,G) old: %s new: %s", + if (PIM_DEBUG_PIM_EVENTS) + { + zlog_debug ("%s: PIM_UPSTREAM_%s: (S,G) old: %s new: %s", __PRETTY_FUNCTION__, up->sg_str, pim_upstream_state2str (up->join_state), pim_upstream_state2str (new_state)); - } + } up->join_state = new_state; if (old_state != new_state) @@ -584,7 +582,17 @@ pim_upstream_switch(struct pim_upstream *up, if (old_state == PIM_UPSTREAM_JOINED) pim_msdp_up_join_state_changed(up); - pim_jp_agg_single_upstream_send(&up->rpf, up, 0 /* prune */); + /* IHR, Trigger SGRpt on *,G IIF to prune S,G from RPT */ + if (pim_upstream_is_sg_rpt(up) && up->parent) + { + if (PIM_DEBUG_PIM_TRACE_DETAIL) + zlog_debug ("%s: *,G IIF %s S,G IIF %s ", __PRETTY_FUNCTION__, + up->parent->rpf.source_nexthop.interface->name, + up->rpf.source_nexthop.interface->name); + pim_jp_agg_single_upstream_send(&up->parent->rpf, up->parent, 1 /* (W,G) Join */); + } + else + pim_jp_agg_single_upstream_send(&up->rpf, up, 0 /* prune */); join_timer_stop(up); } } @@ -717,9 +725,9 @@ pim_upstream_new (struct prefix_sg *sg, if (PIM_DEBUG_TRACE) { - zlog_debug ("%s: Created Upstream %s upstream_addr %s", + zlog_debug ("%s: Created Upstream %s upstream_addr %s ref count %d increment", __PRETTY_FUNCTION__, up->sg_str, - inet_ntoa (up->upstream_addr)); + inet_ntoa (up->upstream_addr), up->ref_count); } return up; @@ -750,6 +758,9 @@ pim_upstream_find_or_add(struct prefix_sg *sg, { up->flags |= flags; up->ref_count++; + if (PIM_DEBUG_TRACE) + zlog_debug ("%s(%s): upstream %s ref count %d increment", + __PRETTY_FUNCTION__, name, up->sg_str, up->ref_count); } } else @@ -759,10 +770,13 @@ pim_upstream_find_or_add(struct prefix_sg *sg, } void -pim_upstream_ref(struct pim_upstream *up, int flags) +pim_upstream_ref(struct pim_upstream *up, int flags, const char *name) { up->flags |= flags; ++up->ref_count; + if (PIM_DEBUG_TRACE) + zlog_debug ("%s(%s): upstream %s ref count %d increment", + __PRETTY_FUNCTION__, name, up->sg_str, up->ref_count); } struct pim_upstream *pim_upstream_add(struct prefix_sg *sg, @@ -773,7 +787,7 @@ struct pim_upstream *pim_upstream_add(struct prefix_sg *sg, int found = 0; up = pim_upstream_find(sg); if (up) { - pim_upstream_ref(up, flags); + pim_upstream_ref(up, flags, name); found = 1; } else { @@ -786,10 +800,11 @@ struct pim_upstream *pim_upstream_add(struct prefix_sg *sg, { char buf[PREFIX2STR_BUFFER]; prefix2str (&up->rpf.rpf_addr, buf, sizeof (buf)); - zlog_debug("%s(%s): %s, iif %s found: %d: ref_count: %d", + zlog_debug("%s(%s): %s, iif %s (%s) found: %d: ref_count: %d", __PRETTY_FUNCTION__, name, - up->sg_str, buf, found, - up->ref_count); + up->sg_str, buf, up->rpf.source_nexthop.interface ? + up->rpf.source_nexthop.interface->name : "NIL" , + found, up->ref_count); } else zlog_debug("%s(%s): (%s) failure to create", @@ -1660,7 +1675,7 @@ pim_upstream_sg_running (void *arg) if (PIM_DEBUG_TRACE) zlog_debug ("source reference created on kat restart %s", up->sg_str); - pim_upstream_ref(up, PIM_UPSTREAM_FLAG_MASK_SRC_STREAM); + pim_upstream_ref(up, PIM_UPSTREAM_FLAG_MASK_SRC_STREAM, __PRETTY_FUNCTION__); PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags); pim_upstream_fhr_kat_start(up); } diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index f1c8df35b1..d728c6c01f 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -145,7 +145,7 @@ struct pim_upstream *pim_upstream_find_or_add (struct prefix_sg *sg, struct pim_upstream *pim_upstream_add (struct prefix_sg *sg, struct interface *ifp, int flags, const char *name); -void pim_upstream_ref (struct pim_upstream *up, int flags); +void pim_upstream_ref (struct pim_upstream *up, int flags, const char *name); struct pim_upstream *pim_upstream_del(struct pim_upstream *up, const char *name); int pim_upstream_evaluate_join_desired(struct pim_upstream *up); From a91ec03e11c779bb8dcd21882bcecb0a7a8a68e5 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Sat, 6 May 2017 11:18:24 -0700 Subject: [PATCH 068/193] pimd: IGMP Query Tx when Oth. Querier exp Send IGMP General Query and Get Gen. Query timer, once Other Querier timer expired. Ticket:CM-13152 Reviewed By:CCR-6189 Testing Done: tor-4# show ip igmp interface Interface State Address V Querier Query Timer Uptime swp2 up 70.1.1.2 3 other --:--:-- 00:06:45 swp3 up 80.1.1.2 3 local 00:00:35 00:22:52 Upon disabling IGMP on remote igmp interface, after other querier expiry sends a query and elects as Querier tor-4# show ip igmp interface Interface State Address V Querier Query Timer Uptime swp2 up 70.1.1.2 3 local 00:01:29 00:10:16 swp3 up 80.1.1.2 3 local 00:01:14 00:26:23 Signed-off-by: Chirag Shah --- pimd/pim_igmp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index ee88e7d8ea..dd5f7e77e9 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -39,6 +39,7 @@ #include "pim_zebra.h" static void group_timer_off(struct igmp_group *group); +static int pim_igmp_general_query(struct thread *t); /* This socket is used for TXing IGMP packets only, IGMP RX happens * in pim_mroute_msg() @@ -172,8 +173,11 @@ static int pim_igmp_other_querier_expire(struct thread *t) /* We are the current querier, then re-start sending general queries. + RFC 2236 - sec 7 Other Querier + present timer expired (Send General + Query, Set Gen. Query. timer) */ - pim_igmp_general_query_on(igmp); + pim_igmp_general_query(t); return 0; } @@ -497,8 +501,6 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len) return -1; } -static int pim_igmp_general_query(struct thread *t); - void pim_igmp_general_query_on(struct igmp_sock *igmp) { struct pim_interface *pim_ifp; From 2b26882d28fb6c28930c97c4ad53d0bc3e1f29d3 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 17:28:12 +0000 Subject: [PATCH 069/193] bgpd: fix nh_afi in bgp_packet_mpattr_start() Signed-off-by: Daniel Walton --- bgpd/bgp_attr.c | 39 +++++++++++++++------------------------ bgpd/bgp_attr.h | 4 ++-- bgpd/bgp_updgrp_packet.c | 7 ++----- 3 files changed, 19 insertions(+), 31 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 5c444869b4..0eb84bda02 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2807,13 +2807,26 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size, } size_t -bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, +bgp_packet_mpattr_start (struct stream *s, struct peer *peer, + afi_t afi, safi_t safi, struct bpacket_attr_vec_arr *vecarr, struct attr *attr) { size_t sizep; iana_afi_t pkt_afi; safi_t pkt_safi; + afi_t nh_afi; + + if (peer_cap_enhe(peer, afi, safi)) { + nh_afi = AFI_IP6; + } else { + if (afi == AFI_L2VPN) + nh_afi = AFI_L2VPN; + else if (safi == SAFI_LABELED_UNICAST) + nh_afi = afi; + else + nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); + } /* Set extended bit always to encode the attribute length as 2 bytes */ stream_putc (s, BGP_ATTR_FLAG_OPTIONAL|BGP_ATTR_FLAG_EXTLEN); @@ -3096,26 +3109,6 @@ bgp_packet_mpattr_end (struct stream *s, size_t sizep) } -/* Return the Nexthop AFI that should be used */ -afi_t -bgp_nexthop_afi (struct peer *peer, afi_t afi, safi_t safi, struct attr *attr) -{ - afi_t nh_afi; - - if (peer_cap_enhe(peer, afi, safi)) { - nh_afi = AFI_IP6; - } else { - if (afi == AFI_L2VPN) - nh_afi = AFI_L2VPN; - else if (safi == SAFI_LABELED_UNICAST) - nh_afi = afi; - else - nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); - } - - return nh_afi; -} - /* Make attribute packet. */ bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *peer, @@ -3132,7 +3125,6 @@ bgp_packet_attribute (struct bgp *bgp, struct peer *peer, int send_as4_path = 0; int send_as4_aggregator = 0; int use32bit = (CHECK_FLAG (peer->cap, PEER_CAP_AS4_RCV)) ? 1 : 0; - afi_t nh_afi; if (! bgp) bgp = peer->bgp; @@ -3145,8 +3137,7 @@ bgp_packet_attribute (struct bgp *bgp, struct peer *peer, { size_t mpattrlen_pos = 0; - nh_afi = bgp_nexthop_afi(peer, afi, safi, attr); - mpattrlen_pos = bgp_packet_mpattr_start(s, afi, safi, nh_afi, vecarr, attr); + mpattrlen_pos = bgp_packet_mpattr_start(s, peer, afi, safi, vecarr, attr); bgp_packet_mpattr_prefix(s, afi, safi, p, prd, tag, addpath_encode, addpath_tx_id, attr); bgp_packet_mpattr_end(s, mpattrlen_pos); diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 2931b2f2b6..e7f3e25c41 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -299,8 +299,8 @@ bgp_attr_flush_encap(struct attr *attr); * one for each NLRI that needs to be encoded into the UPDATE message, and * finally the _end() function. */ -extern size_t bgp_packet_mpattr_start(struct stream *s, afi_t afi, safi_t safi, - afi_t nh_afi, +extern size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, + afi_t afi, safi_t safi, struct bpacket_attr_vec_arr *vecarr, struct attr *attr); extern void bgp_packet_mpattr_prefix(struct stream *s, afi_t afi, safi_t safi, diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 8a4824f859..2408a8ca30 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -656,7 +656,6 @@ subgroup_update_packet (struct update_subgroup *subgrp) u_int32_t addpath_tx_id = 0; struct prefix_rd *prd = NULL; char label_buf[20]; - afi_t nh_afi; if (!subgrp) return NULL; @@ -768,11 +767,9 @@ subgroup_update_packet (struct update_subgroup *subgrp) if (bgp_labeled_safi(safi)) sprintf (label_buf, "label %u", label_pton(tag)); - if (stream_empty (snlri)) { - nh_afi = bgp_nexthop_afi(peer, afi, safi, adv->baa->attr); - mpattrlen_pos = bgp_packet_mpattr_start (snlri, afi, safi, nh_afi, + if (stream_empty (snlri)) + mpattrlen_pos = bgp_packet_mpattr_start (snlri, peer, afi, safi, &vecarr, adv->baa->attr); - } bgp_packet_mpattr_prefix (snlri, afi, safi, &rn->p, prd, tag, addpath_encode, addpath_tx_id, adv->baa->attr); From a080e8fbcbbfe05287ad4f7935c81a3816965e00 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 18:05:45 +0000 Subject: [PATCH 070/193] bgpd: fix nh_afi in bgp_packet_mpattr_start() Signed-off-by: Daniel Walton --- bgpd/bgp_attr.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 0eb84bda02..f21194149f 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2817,17 +2817,6 @@ bgp_packet_mpattr_start (struct stream *s, struct peer *peer, safi_t pkt_safi; afi_t nh_afi; - if (peer_cap_enhe(peer, afi, safi)) { - nh_afi = AFI_IP6; - } else { - if (afi == AFI_L2VPN) - nh_afi = AFI_L2VPN; - else if (safi == SAFI_LABELED_UNICAST) - nh_afi = afi; - else - nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); - } - /* Set extended bit always to encode the attribute length as 2 bytes */ stream_putc (s, BGP_ATTR_FLAG_OPTIONAL|BGP_ATTR_FLAG_EXTLEN); stream_putc (s, BGP_ATTR_MP_REACH_NLRI); @@ -2841,6 +2830,18 @@ bgp_packet_mpattr_start (struct stream *s, struct peer *peer, stream_putw (s, pkt_afi); /* AFI */ stream_putc (s, pkt_safi); /* SAFI */ + /* Nexthop AFI */ + if (peer_cap_enhe(peer, afi, safi)) { + nh_afi = AFI_IP6; + } else { + if (afi == AFI_L2VPN) + nh_afi = AFI_L2VPN; + else if (safi == SAFI_LABELED_UNICAST) + nh_afi = afi; + else + nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); + } + /* Nexthop */ switch (nh_afi) { @@ -3108,7 +3109,6 @@ bgp_packet_mpattr_end (struct stream *s, size_t sizep) stream_putw_at (s, sizep, (stream_get_endp (s) - sizep) - 2); } - /* Make attribute packet. */ bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *peer, From 6ccdc60d96c6d1666b495d8338846f6fdda95a64 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 16 May 2017 18:17:23 +0000 Subject: [PATCH 071/193] lib: correctly handle EOF when using poll() Descriptor owner should handle EOF, not thread.c Signed-off-by: Quentin Young --- lib/thread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index aef9ac5cf9..6de4d24bfa 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1211,14 +1211,13 @@ check_pollfds(struct thread_master *m, fd_set *readfd, int num) ready++; /* POLLIN / POLLOUT process event */ - if (m->handler.pfds[i].revents & POLLIN) + if (m->handler.pfds[i].revents & (POLLIN | POLLHUP)) thread_process_fds_helper(m, m->read[m->handler.pfds[i].fd], NULL, POLLIN, i); if (m->handler.pfds[i].revents & POLLOUT) thread_process_fds_helper(m, m->write[m->handler.pfds[i].fd], NULL, POLLOUT, i); /* remove fd from list on POLLNVAL */ - if (m->handler.pfds[i].revents & POLLNVAL || - m->handler.pfds[i].revents & POLLHUP) + if (m->handler.pfds[i].revents & POLLNVAL) { memmove(m->handler.pfds+i, m->handler.pfds+i+1, From 7780aaaa7230eb077c3cd27a988b44fc102a23d7 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 18:57:20 +0000 Subject: [PATCH 072/193] lib: Remove the "This command currently does nothing" message Signed-off-by: Daniel Walton This breaks the "vtysh -m" output which causes problems for frr-reload.py --- lib/command.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/command.c b/lib/command.c index cc597952e4..f9566f8154 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1371,11 +1371,6 @@ DEFUN (frr_version_defaults, "set of configuration defaults used\n" "version string\n") { - if (vty->type == VTY_TERM || vty->type == VTY_SHELL) - /* only print this when the user tries to do run it */ - vty_out (vty, "%% NOTE: This command currently does nothing.%s" - "%% It is written to the configuration for future reference.%s", - VTY_NEWLINE, VTY_NEWLINE); return CMD_SUCCESS; } From c358f112a6733d3507ad8cdc16fb54235dd065f9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Nov 2016 09:39:35 -0500 Subject: [PATCH 073/193] bgpd: Fix occassional turn off of extended-nexthop for an if Sometimes, like once every 400 iterations, when you restart Quagga, extended-nexthop has been turned off for interface based config( for 5549 ). Examining the code, there is only 1 real path to setting the PEER_FLAG_CAPABILITITY_ENHE and that is through peer_conf_interface_get. Modify this code path to always set the PEER_FLAG_CAPABILITY_ENHE if it is not already set. In addition, fix a possible pointer dereference. Ticket: CM-12929 Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 347d026aff..4187654244 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2882,7 +2882,10 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, peer = peer_create (NULL, conf_if, bgp, bgp->as, as, as_type, afi, safi, NULL); - if (peer && v6only) + if (!peer) + return CMD_WARNING; + + if (v6only) SET_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY); /* Request zebra to initiate IPv6 RAs on this interface. We do this @@ -2891,10 +2894,7 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, * gets deleted later etc.) */ if (peer->ifp) - { - bgp_zebra_initiate_radv (bgp, peer); - } - peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); + bgp_zebra_initiate_radv (bgp, peer); } else if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) || (!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY))) @@ -2915,8 +2915,8 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, bgp_session_reset(peer); } - if (!peer) - return CMD_WARNING; + if (!CHECK_FLAG (peer->flags, PEER_FLAG_CAPABILITY_ENHE)) + peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); if (peer_group_name) { From c22767d89ea4ca34d7054dbe39cac4d254974ff5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Nov 2016 10:16:52 -0500 Subject: [PATCH 074/193] bgpd: Fix ADJCHANGE message to include more info When bgp logs ADJCHANGE messages include the hostname and vrf that this change is being made in. Ticket: CM-10922 Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index e669b4f9b7..f20bd3bf26 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1021,8 +1021,14 @@ bgp_stop (struct peer *peer) /* bgp log-neighbor-changes of neighbor Down */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Down %s", peer->host, - peer_down_str [(int) peer->last_reset]); + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default", + peer_down_str [(int) peer->last_reset]); + } /* graceful restart */ if (peer->t_gr_stale) @@ -1459,8 +1465,13 @@ bgp_establish (struct peer *peer) /* bgp log-neighbor-changes of neighbor Up */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Up", peer->host); - + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default"); + } /* assign update-group/subgroup */ update_group_adjust_peer_afs(peer); From 70a4754dd0eec88e0294c645d7c93d08e4356dda Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 11:28:11 -0500 Subject: [PATCH 075/193] ospfd: Fix possible crash and wrong data being shown When you have more than one ospf interface configured to be used, we were attempting to reuse the json_interface_sub pointer after we added it to the json data structure. Ticket: CM-13597 Signed-off-by: Donald Sharp --- ospfd/ospf_vty.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 2724df98a0..b13c28d0c9 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3967,9 +3967,14 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, { show_ip_ospf_interface_sub (vty, ospf, ifp, json_interface_sub, use_json); if (use_json) - json_object_object_add(json, ifp->name, json_interface_sub); + { + json_object_object_add(json, ifp->name, json_interface_sub); + json_interface_sub = json_object_new_object (); + } } } + if (use_json) + json_object_free (json_interface_sub); } else { From 71ffee748f3a5466dc3e73e9f5fb5b286ff3b6c5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 12:00:40 -0500 Subject: [PATCH 076/193] bgpd: More Extended nexthop fixing Basically if we are reading in a cli with a extended-nexthop and we have not received from zebra the interface we are working on I believe we have a race condition where we are not propagating the PEER_FLAG_CAPABILITY_ENHE in this case. Modify the code to propagate even if we haven't found the interface yet. Signed-off-by: Donald Sharp --- bgpd/bgpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 86133cd763..c6997a9b83 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2652,7 +2652,7 @@ peer_group_bind (struct bgp *bgp, union sockunion *su, struct peer *peer, * Capability extended-nexthop is enabled for an interface neighbor by * default. So, fix that up here. */ - if (peer->ifp && cap_enhe_preset) + if (peer->conf_if && cap_enhe_preset) peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); for (afi = AFI_IP; afi < AFI_MAX; afi++) From 2dbfa8a020315ae7d3572bd1c691701c25e3c54a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 22:17:39 -0500 Subject: [PATCH 077/193] ospf6d: Fix debug line always showing up in ospf6d The command 'debug ospf6 lsa unknown' was always showing up, upon starting of the ospf6 daemon. Remove this from happening. Also fix some help strings while we are in there. Ticket: CM-7913 Signed-off-by: Donald Sharp --- ospf6d/ospf6_lsa.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 35e5a91544..f3afd487e4 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -77,8 +77,7 @@ struct ospf6_lsa_handler unknown_handler = "Unknown", "Unk", ospf6_unknown_lsa_show, - NULL, - OSPF6_LSA_DEBUG, + NULL }; void @@ -822,7 +821,14 @@ DEFUN (debug_ospf6_lsa_type, DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" + "Router LSA's\n" + "Network LSA's\n" + "Inter-Prefix LSA's\n" + "Inter-Router LSA's\n" + "AS-External LSA's\n" + "Link LSA's\n" + "Intra-Prefix LSA's\n" + "Unknown LSA's\n" ) { unsigned int i; @@ -876,7 +882,14 @@ DEFUN (no_debug_ospf6_lsa_type, DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" + "Router LSA's\n" + "Network LSA's\n" + "Inter-Prefix LSA's\n" + "Inter-Router LSA's\n" + "AS-External LSA's\n" + "Link LSA's\n" + "Intra-Prefix LSA's\n" + "Unknown LSA's\n" ) { u_int i; From 5b0747d71df6006835ead8e6354f70b26f7bca80 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 18 Nov 2016 11:41:53 -0500 Subject: [PATCH 078/193] ospf6d: Allow unconfig of unknown lsa's When we are receiving the 'no debug ospf6 lsa unknown ...' Allow the removal of the originate examine and flooding keywords. Ticket: CM-12805 Signed-off-by: Donald Sharp --- ospf6d/ospf6_lsa.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index f3afd487e4..867dc3d9d8 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -872,7 +872,17 @@ ALIAS (debug_ospf6_lsa_type, DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" + "Router LSA's\n" + "Network LSA's\n" + "Inter-Prefix LSA's\n" + "Inter-Router LSA's\n" + "AS-External LSA's\n" + "Link LSA's\n" + "Intra-Prefix LSA's\n" + "Unknown LSA's\n" + "Originate\n" + "Examine\n" + "Flooding\n" ) DEFUN (no_debug_ospf6_lsa_type, @@ -928,12 +938,22 @@ DEFUN (no_debug_ospf6_lsa_type, ALIAS (no_debug_ospf6_lsa_type, no_debug_ospf6_lsa_hex_detail_cmd, - "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)", + "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)", NO_STR DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" + "Router LSA's\n" + "Network LSA's\n" + "Inter-Prefix LSA's\n" + "Inter-Router LSA's\n" + "AS-External LSA's\n" + "Link LSA's\n" + "Intra-Prefix LSA's\n" + "Unknown LSA's\n" + "Originate\n" + "Examine\n" + "Flooding\n" ) void From c2f613443672d8dd95e505ff14a92693448173df Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 1 Dec 2016 08:59:16 -0500 Subject: [PATCH 079/193] bgpd: Fix vrf crash Ensure that we have a valid vrf before we log information about it. Signed-off-by: Donald Sharp Reviewed-by: Don Slice --- bgpd/bgp_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index f20bd3bf26..2f37f39ffd 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1470,7 +1470,7 @@ bgp_establish (struct peer *peer) zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up", peer->host, (peer->hostname) ? peer->hostname : "Unknown", - (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default"); + vrf ? ((vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default") : ""); } /* assign update-group/subgroup */ update_group_adjust_peer_afs(peer); From d32dfc22011c79c87edcdf05b66f4598443ee7b2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Nov 2016 10:16:52 -0500 Subject: [PATCH 080/193] bgpd: Fix ADJCHANGE message to include more info When bgp logs ADJCHANGE messages include the hostname and vrf that this change is being made in. Ticket: CM-10922 Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index e669b4f9b7..f20bd3bf26 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1021,8 +1021,14 @@ bgp_stop (struct peer *peer) /* bgp log-neighbor-changes of neighbor Down */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Down %s", peer->host, - peer_down_str [(int) peer->last_reset]); + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default", + peer_down_str [(int) peer->last_reset]); + } /* graceful restart */ if (peer->t_gr_stale) @@ -1459,8 +1465,13 @@ bgp_establish (struct peer *peer) /* bgp log-neighbor-changes of neighbor Up */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Up", peer->host); - + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default"); + } /* assign update-group/subgroup */ update_group_adjust_peer_afs(peer); From 2e37f307ee663c3955044c6fa97914c37fed9751 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 22 Nov 2016 09:48:16 -0800 Subject: [PATCH 081/193] bgpd: fix crash in bgp_stop due to missing vrf Problem found to be derefencing a vrf that had already been deleted. Fix verifies that vrf exists before using it. Ticket: CM-13682 Signed-off-by: Don Slice Reviewed By: Vivek Venkatraman Testing Done: manual testing, re-run of failing scripts good --- bgpd/bgp_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index f20bd3bf26..e3968d21cd 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1026,7 +1026,7 @@ bgp_stop (struct peer *peer) zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s", peer->host, (peer->hostname) ? peer->hostname : "Unknown", - (vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default", + vrf ? ((vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default") : "", peer_down_str [(int) peer->last_reset]); } From fa14eb2c0b408982a6634459b3afb21e9df6326a Mon Sep 17 00:00:00 2001 From: Don Slice Date: Wed, 5 Apr 2017 07:13:45 -0700 Subject: [PATCH 082/193] bgpd: resolve ipv6 ecmp issue with vrfs and ll nexthop Problem reported that ecmp wasn't working correctly in a vrf with ipv6. Issue was that originator of the routes were sending the updates with a link-local nexthop and nhlen of 16. In this particular case, bgp_zebra_announce was using the wrong call to get the ifindex and was not supplying the vrf. This caused ecmp to work only in the case of the default vrf. Ticket: CM-15545 Signed-off-by: Don Slice Reviewed-by: CCR-6017 --- bgpd/bgp_zebra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 3d3bd90f5b..d07fc65bdf 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1469,7 +1469,8 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp, if (!ifindex) { if (info->peer->conf_if || info->peer->ifname) - ifindex = if_nametoindex (info->peer->conf_if ? info->peer->conf_if : info->peer->ifname); + ifindex = ifname2ifindex_vrf (info->peer->conf_if ? info->peer->conf_if : + info->peer->ifname, bgp->vrf_id); else if (info->peer->nexthop.ifp) ifindex = info->peer->nexthop.ifp->ifindex; } From 83f35619359379687f21c839d61121e4ebe72541 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 23:49:53 +0000 Subject: [PATCH 083/193] zebra: 'no ip route 4.1.1.19 255.255.255.255 99' is ambiguous Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp --- zebra/zebra_mpls_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index 8b967c3af8..343f2975e8 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -472,7 +472,7 @@ DEFUN (no_ip_route_tag_distance_label, DEFUN (no_ip_route_mask_distance_label, no_ip_route_mask_distance_label_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>", + "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255> label WORD", NO_STR IP_STR "Establish static routes\n" @@ -486,7 +486,7 @@ DEFUN (no_ip_route_mask_distance_label, "One or more labels separated by '/'\n") { return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL, argv[5]); + argv[3], NULL, argv[4]); } DEFUN (no_ip_route_mask_tag_distance_label, From 464598de53722b515c0967eb223aa538bb27ecf6 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 23:54:46 +0000 Subject: [PATCH 084/193] bgpd: "neighbor swpX interface remote-as XYZ" is ignored Signed-off-by: Daniel Walton Reviewed-by: Don Slice If you did: neighbor swp1 interface neighbor swp1 interface remote-as external we would not set the remote-as. You could however still do neighbor swp1 remote-as external --- bgpd/bgp_vty.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 347d026aff..f163fef712 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2872,7 +2872,12 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, } peer = peer_lookup_by_conf_if (bgp, conf_if); - if (!peer) + if (peer) + { + if (as_str) + ret = peer_remote_as (bgp, &su, NULL, &as, as_type, afi, safi); + } + else { if (bgp_flag_check (bgp, BGP_FLAG_NO_DEFAULT_IPV4) && afi == AFI_IP && safi == SAFI_UNICAST) @@ -2896,8 +2901,9 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, } peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); } - else if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) || - (!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY))) + + if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) || + (!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY))) { if (v6only) SET_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY); From 10a6a98b0af1c5490c8b87ab0ce15d5edabbbc35 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 23:56:31 +0000 Subject: [PATCH 085/193] bgpd: does not honor configured keepalive timer Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp --- bgpd/bgp_packet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 796a57f054..5ac982d565 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1118,7 +1118,10 @@ bgp_open_receive (struct peer *peer, bgp_size_t size) else peer->v_holdtime = send_holdtime; - peer->v_keepalive = peer->v_holdtime / 3; + if (CHECK_FLAG (peer->config, PEER_CONFIG_TIMER)) + peer->v_keepalive = peer->keepalive; + else + peer->v_keepalive = peer->v_holdtime / 3; /* Open option part parse. */ if (optlen != 0) From 501be9875b7e385d4b39e85ea6bddd431e87e8bb Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 16 May 2017 23:58:34 +0000 Subject: [PATCH 086/193] bgpd: 'redistribute' triggers both IPv4 and IPv6 code paths Signed-off-by: Daniel Walton Whenever you did "redistribute" zebra would kick this off for ipv4 and ipv6. No real issue other than this is sub-optimal --- zebra/redistribute.c | 56 ++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 9c7ef5f12c..5d7dbd5b00 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -108,42 +108,38 @@ zebra_redistribute_default (struct zserv *client, vrf_id_t vrf_id) /* Redistribute routes. */ static void -zebra_redistribute (struct zserv *client, int type, u_short instance, vrf_id_t vrf_id) +zebra_redistribute (struct zserv *client, int type, u_short instance, vrf_id_t vrf_id, int afi) { struct rib *newrib; struct route_table *table; struct route_node *rn; - int afi; - for (afi = AFI_IP; afi <= AFI_IP6; afi++) - { - table = zebra_vrf_table (afi, SAFI_UNICAST, vrf_id); - if (! table) - continue; + table = zebra_vrf_table (afi, SAFI_UNICAST, vrf_id); + if (! table) + return; - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, newrib) - { - if (IS_ZEBRA_DEBUG_EVENT) - zlog_debug("%s: checking: selected=%d, type=%d, distance=%d, " - "zebra_check_addr=%d", __func__, - CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED), - newrib->type, newrib->distance, - zebra_check_addr (&rn->p)); + for (rn = route_top (table); rn; rn = route_next (rn)) + RNODE_FOREACH_RIB (rn, newrib) + { + if (IS_ZEBRA_DEBUG_EVENT) + zlog_debug("%s: checking: selected=%d, type=%d, distance=%d, " + "zebra_check_addr=%d", __func__, + CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED), + newrib->type, newrib->distance, + zebra_check_addr (&rn->p)); - if (! CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)) - continue; - if ((type != ZEBRA_ROUTE_ALL && - (newrib->type != type || newrib->instance != instance))) - continue; - if (newrib->distance == DISTANCE_INFINITY) - continue; - if (! zebra_check_addr (&rn->p)) - continue; + if (! CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)) + continue; + if ((type != ZEBRA_ROUTE_ALL && + (newrib->type != type || newrib->instance != instance))) + continue; + if (newrib->distance == DISTANCE_INFINITY) + continue; + if (! zebra_check_addr (&rn->p)) + continue; - zsend_redistribute_route (1, client, &rn->p, newrib); - } - } + zsend_redistribute_route (1, client, &rn->p, newrib); + } } /* Either advertise a route for redistribution to registered clients or */ @@ -262,13 +258,13 @@ zebra_redistribute_add (int command, struct zserv *client, int length, if (! redist_check_instance (&client->mi_redist[afi][type], instance)) { redist_add_instance (&client->mi_redist[afi][type], instance); - zebra_redistribute (client, type, instance, zvrf_id (zvrf)); + zebra_redistribute (client, type, instance, zvrf_id (zvrf), afi); } } else { if (! vrf_bitmap_check (client->redist[afi][type], zvrf_id (zvrf))) { vrf_bitmap_set (client->redist[afi][type], zvrf_id (zvrf)); - zebra_redistribute (client, type, 0, zvrf_id (zvrf)); + zebra_redistribute (client, type, 0, zvrf_id (zvrf), afi); } } } From 3bd07551f803960920db358dd8291b24ca50ec79 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:01:23 +0000 Subject: [PATCH 087/193] bgp: garbage "neighbor (af 54816) remote-as internal" peer in show run Signed-off-by: Daniel Walton --- bgpd/bgp_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f163fef712..6f330b0d03 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2875,7 +2875,7 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, if (peer) { if (as_str) - ret = peer_remote_as (bgp, &su, NULL, &as, as_type, afi, safi); + ret = peer_remote_as (bgp, &su, conf_if, &as, as_type, afi, safi); } else { From 46111f2f48e964ac14b617f77fccb574cfb8d693 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:07:02 +0000 Subject: [PATCH 088/193] bgpd: Add epoch uptime to BGP neighbor json outputs Signed-off-by: Daniel Walton --- bgpd/bgp_vty.c | 4 ++++ bgpd/bgpd.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 6f330b0d03..f71d03e46b 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -11087,6 +11087,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js u_int16_t i; u_char *msg; json_object *json_neigh = NULL; + time_t epoch_tbuf; bgp = p->bgp; @@ -11277,8 +11278,11 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js uptime = bgp_clock(); uptime -= p->uptime; tm = gmtime(&uptime); + epoch_tbuf = time(NULL) - uptime; json_object_int_add(json_neigh, "bgpTimerUp", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000)); + json_object_string_add(json_neigh, "bgpTimerUpString", peer_uptime (p->uptime, timebuf, BGP_UPTIME_LEN, 0, NULL)); + json_object_int_add(json_neigh, "bgpTimerUpEstablishedEpoch", epoch_tbuf); } else if (p->status == Active) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 86133cd763..31d54a3e98 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -6250,7 +6250,7 @@ peer_clear_soft (struct peer *peer, afi_t afi, safi_t safi, char * peer_uptime (time_t uptime2, char *buf, size_t len, u_char use_json, json_object *json) { - time_t uptime1; + time_t uptime1, epoch_tbuf; struct tm *tm; /* Check buffer length. */ @@ -6304,8 +6304,10 @@ peer_uptime (time_t uptime2, char *buf, size_t len, u_char use_json, json_object if (use_json) { + epoch_tbuf = time(NULL) - uptime1; json_object_string_add(json, "peerUptime", buf); json_object_long_add(json, "peerUptimeMsec", uptime1 * 1000); + json_object_int_add(json, "peerUptimeEstablishedEpoch", epoch_tbuf); } return buf; From 825be4c27bc165e68ebcb1de8d1beebdbd8c82e9 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:14:37 +0000 Subject: [PATCH 089/193] tools: frr-reload.py should exit non-zero when "set src x.x.x.x" fails Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp --- tools/frr-reload.py | 34 +++++++++++++++++++++++++++++----- vtysh/vtysh.c | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 80d2d6a2a3..0e71eaa04c 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -346,6 +346,7 @@ end "debug ", "dump ", "enable ", + "frr ", "hostname ", "ip ", "ipv6 ", @@ -888,11 +889,15 @@ if __name__ == '__main__': # Verify the new config file is valid if not os.path.isfile(args.filename): - print "Filename %s does not exist" % args.filename + msg = "Filename %s does not exist" % args.filename + print msg + log.error(msg) sys.exit(1) if not os.path.getsize(args.filename): - print "Filename %s is an empty file" % args.filename + msg = "Filename %s is an empty file" % args.filename + print msg + log.error(msg) sys.exit(1) # Verify that 'service integrated-vtysh-config' is configured @@ -909,7 +914,9 @@ if __name__ == '__main__': break if not service_integrated_vtysh_config: - print "'service integrated-vtysh-config' is not configured, this is required for 'service frr reload'" + msg = "'service integrated-vtysh-config' is not configured, this is required for 'service frr reload'" + print msg + log.error(msg) sys.exit(1) if args.debug: @@ -920,6 +927,7 @@ if __name__ == '__main__': # Create a Config object from the config generated by newconf newconf = Config() newconf.load_from_file(args.filename) + reload_ok = True if args.test: @@ -1029,7 +1037,7 @@ if __name__ == '__main__': # 'no ip ospf authentication message-digest 1.1.1.1' in # our example above # - Split that last entry by whitespace and drop the last word - log.warning('Failed to execute %s', ' '.join(cmd)) + log.info('Failed to execute %s', ' '.join(cmd)) last_arg = cmd[-1].split(' ') if len(last_arg) <= 2: @@ -1064,9 +1072,25 @@ if __name__ == '__main__': with open(filename, 'w') as fh: for line in lines_to_configure: fh.write(line + '\n') - subprocess.call(['/usr/bin/vtysh', '-f', filename]) + + output = subprocess.check_output(['/usr/bin/vtysh', '-f', filename]) + + # exit non-zero if we see these errors + for x in ('BGP instance name and AS number mismatch', + 'BGP instance is already running', + '% not a local address'): + for line in output.splitlines(): + if x in line: + msg = "ERROR: %s" % x + log.error(msg) + print msg + reload_ok = False + os.unlink(filename) # Make these changes persistent if args.overwrite or args.filename != '/etc/frr/frr.conf': subprocess.call(['/usr/bin/vtysh', '-c', 'write']) + + if not reload_ok: + sys.exit(1) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 51f71a46bb..2994c3507a 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -635,7 +635,7 @@ vtysh_mark_file (const char *filename) } } /* This is the end */ - fprintf(stdout, "end\n"); + fprintf(stdout, "\nend\n"); vty_close(vty); XFREE(MTYPE_VTYSH_CMD, vty_buf_copy); From afa2e8e1870eab4578e19c80cfd23bb443d1adbe Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:16:09 +0000 Subject: [PATCH 090/193] tools: reload handle removal of entire address-family section under BGP Signed-off-by: Daniel Walton When an entire address-family section is removed from under BGP, we cannot just issue 'no address-family foo bar' as address-family line doesn't support 'no'. We have to delete the individual lines under the address-family. --- tools/frr-reload.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 0e71eaa04c..1ef6920d06 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -814,6 +814,14 @@ def compare_context_objects(newconf, running): elif "router bgp" in running_ctx_keys[0] and len(running_ctx_keys) > 1 and delete_bgpd: continue + elif ("router bgp" in running_ctx_keys[0] and + len(running_ctx_keys) > 1 and + running_ctx_keys[1].startswith('address-family')): + # There's no 'no address-family' support and so we have to + # delete each line individually again + for line in running_ctx.lines: + lines_to_del.append((running_ctx_keys, line)) + # Non-global context elif running_ctx_keys and not any("address-family" in key for key in running_ctx_keys): lines_to_del.append((running_ctx_keys, None)) From 970c956816599fe3d58bc45ca3a18b9542467337 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:18:33 +0000 Subject: [PATCH 091/193] tools: frr-reload removes "ipv6 nd ra-interval" and "no ipv6 nd supp" Signed-off-by: Daniel Walton --- tools/frr-reload.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 1ef6920d06..f6cb6d9910 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -1009,7 +1009,20 @@ if __name__ == '__main__': (lines_to_add, lines_to_del) = compare_context_objects(newconf, running) - if lines_to_del: + # Only do deletes on the first pass. The reason being if we + # configure a bgp neighbor via "neighbor swp1 interface" frr + # will automatically add: + # + # interface swp1 + # ipv6 nd ra-interval 10 + # no ipv6 nd suppress-ra + # ! + # + # but those lines aren't in the config we are reloading against so + # on the 2nd pass they will show up in lines_to_del. This could + # apply to other scenarios as well where configuring FOO adds BAR + # to the config. + if lines_to_del and x == 0: for (ctx_keys, line) in lines_to_del: if line == '!': From 619c4e3acf2077dc16adf6ebd48adaec9365c623 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:22:00 +0000 Subject: [PATCH 092/193] frr-reload.py fails on "no debug ospf6 message unknown" Signed-off-by: Daniel Walton --- tools/frr-reload.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index f6cb6d9910..090937ed27 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -351,6 +351,7 @@ end "ip ", "ipv6 ", "log ", + "no ", "password ", "ptm-enable", "router-id ", From ec3fd9577411a4555a9988f8187e2d1598cd2b00 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:23:38 +0000 Subject: [PATCH 093/193] tools: frr-reload.py VtyshMarkException needs to include "vtysh -m" output Signed-off-by: Daniel Walton --- tools/frr-reload.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 090937ed27..11e0bdc681 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -109,9 +109,12 @@ class Config(object): log.info('Loading Config object from file %s', filename) try: - file_output = subprocess.check_output(['/usr/bin/vtysh', '-m', '-f', filename]) + file_output = subprocess.check_output(['/usr/bin/vtysh', '-m', '-f', filename], + stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: - raise VtyshMarkException(str(e)) + ve = VtyshMarkException(e) + ve.output = e.output + raise ve for line in file_output.split('\n'): line = line.strip() @@ -134,9 +137,11 @@ class Config(object): try: config_text = subprocess.check_output( "/usr/bin/vtysh -c 'show run' | /usr/bin/tail -n +4 | /usr/bin/vtysh -m -f -", - shell=True) + shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: - raise VtyshMarkException(str(e)) + ve = VtyshMarkException(e) + ve.output = e.output + raise ve for line in config_text.split('\n'): line = line.strip() From e80c8c5531635e9df550f11b466f35644668f9f5 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 17 May 2017 00:25:28 +0000 Subject: [PATCH 094/193] tools: Allow frr-reload.py to know about agentx Signed-off-by: Daniel Walton Signed-off-by: Donald Sharp --- tools/frr-reload.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 11e0bdc681..a9151e3e7d 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -347,6 +347,7 @@ end # the keywords that we know are single line contexts. bgp in this case # is not the main router bgp block, but enabling multi-instance oneline_ctx_keywords = ("access-list ", + "agentx", "bgp ", "debug ", "dump ", From 30cfe9a2910297f1114c3da44d97e0fdcacaecd0 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Mon, 23 Jan 2017 17:39:54 -0800 Subject: [PATCH 095/193] pimd: fix ip pim hello option does not take in effect If frr.conf file has pim hello option setup prior to pim sm under an interface, upon frr start/restart hello option cli replayed prior to sm command from vtysh. Added a code in pim hello option cli handler to create pim vif if it does not exist. Testing Done: configure pim hello options before pim sm in frr.conf file and restart frr Signed-off-by: Chirag Shah --- pimd/pim_cmd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 1224bc5fc8..0f4e8fdcbf 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5075,11 +5075,16 @@ DEFUN (interface_ip_pim_hello, pim_ifp = ifp->info; - if (!pim_ifp) { - vty_out(vty, "Pim not enabled on this interface%s", VTY_NEWLINE); - return CMD_WARNING; - } + if (!pim_ifp) + { + if (!pim_cmd_interface_add(ifp)) + { + vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE); + return CMD_WARNING; + } + } + pim_ifp = ifp->info; pim_ifp->pim_hello_period = strtol(argv[idx_time]->arg, NULL, 10); if (argc == idx_hold + 1) From 8dc60b69b582728866ec485c77a3e296123aac5a Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 24 Jan 2017 14:58:59 -0800 Subject: [PATCH 096/193] pimd: fix pim reg processing return 1 upon success pim register_recv api returns 1 instead of 0 upon succesfully processing REG message Testing Done: Verified At RP via receiving PIM (Data/Null) Register messages and checked show ip pim interface < > Received errors under Hello Signed-off-by: Chirag Shah --- pimd/pim_register.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pimd/pim_register.c b/pimd/pim_register.c index 8dc179c144..e6145a142e 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -346,7 +346,7 @@ pim_register_recv (struct interface *ifp, zlog_debug("%s: Sending register-Stop to %s and dropping mr. packet", __func__, "Sender"); /* Drop Packet Silently */ - return 1; + return 0; } } @@ -408,5 +408,5 @@ pim_register_recv (struct interface *ifp, pim_register_stop_send (ifp, &sg, dest_addr, src_addr); } - return 1; + return 0; } From 95d3f5011b509acbbc3a257c74c23bc5b57148af Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 16 May 2017 21:57:25 -0700 Subject: [PATCH 097/193] pimd: Fix input value to bool Signed-off-by: Chirag Shah --- pimd/pim_ifchannel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 04f8a22c6b..c5953e560c 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -583,7 +583,7 @@ pim_ifchannel_add(struct interface *ifp, return ch; } -static void ifjoin_to_noinfo(struct pim_ifchannel *ch, uint8_t ch_del) +static void ifjoin_to_noinfo(struct pim_ifchannel *ch, bool ch_del) { pim_forward_stop(ch); pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch, PIM_IFJOIN_NOINFO); @@ -599,7 +599,7 @@ static int on_ifjoin_expiry_timer(struct thread *t) ch->t_ifjoin_expiry_timer = NULL; - ifjoin_to_noinfo(ch, 1); + ifjoin_to_noinfo(ch, true); /* ch may have been deleted */ return 0; @@ -643,10 +643,10 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) ch_del is set to 0 for not deleteing from here. Holdtime expiry (ch_del set to 1) delete the entry. */ - ifjoin_to_noinfo(ch, 0); + ifjoin_to_noinfo(ch, false); } else - ifjoin_to_noinfo(ch, 1); + ifjoin_to_noinfo(ch, true); /* from here ch may have been deleted */ } else From 9de498ecad40c88ebcbfed9ec12ce762d90a6507 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 12 Nov 2016 21:52:32 -0500 Subject: [PATCH 098/193] zebra: Consolidate static_config_ipv[4|6] into one function. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 115 ++++++++-------------------------------------- 1 file changed, 18 insertions(+), 97 deletions(-) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index c5c462c8da..7ee5b1b21b 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2317,49 +2317,49 @@ DEFUN (show_ip_route_vrf_all_summary_prefix, return CMD_SUCCESS; } -/* Write IPv4 static route configuration. */ +/* Write static route configuration. */ static int -static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd) +static_config (struct vty *vty, afi_t afi, safi_t safi, const char *cmd) { struct route_node *rn; struct static_route *si; struct route_table *stable; struct vrf *vrf; struct zebra_vrf *zvrf; - char buf[BUFSIZ]; + char buf[SRCDEST2STR_BUFFER]; int write =0; RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { if (!(zvrf = vrf->info)) continue; - if ((stable = zvrf->stable[AFI_IP][safi]) == NULL) + if ((stable = zvrf->stable[afi][safi]) == NULL) continue; - for (rn = route_top (stable); rn; rn = route_next (rn)) + for (rn = route_top (stable); rn; rn = srcdest_route_next (rn)) for (si = rn->info; si; si = si->next) { - vty_out (vty, "%s %s", cmd, prefix2str (&rn->p, buf, sizeof buf)); + vty_out (vty, "%s %s", cmd, srcdest_rnode2str (rn, buf, sizeof buf)); switch (si->type) { case STATIC_IPV4_GATEWAY: vty_out (vty, " %s", inet_ntoa (si->addr.ipv4)); break; + case STATIC_IPV6_GATEWAY: + vty_out (vty, " %s", inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ)); + break; case STATIC_IFINDEX: vty_out (vty, " %s", si->ifname); break; case STATIC_BLACKHOLE: vty_out (vty, " Null0"); break; - case STATIC_IPV6_GATEWAY: - vty_out (vty, " %s", inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ)); - break; - case STATIC_IPV6_GATEWAY_IFINDEX: - vty_out (vty, " %s %s", - inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ), - ifindex2ifname (si->ifindex, si->vrf_id)); - break; + case STATIC_IPV6_GATEWAY_IFINDEX: + vty_out (vty, " %s %s", + inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ), + ifindex2ifname (si->ifindex, si->vrf_id)); + break; } /* flags are incompatible with STATIC_BLACKHOLE */ @@ -2379,7 +2379,7 @@ static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd) vty_out (vty, " %d", si->distance); if (si->vrf_id != VRF_DEFAULT) - vty_out (vty, " vrf %s", zvrf ? zvrf_name (zvrf) : ""); + vty_out (vty, " vrf %s", zvrf_name (zvrf)); /* Label information */ if (si->snh_label.num_labels) @@ -3843,85 +3843,6 @@ DEFUN (show_ipv6_route_vrf_all_summary_prefix, return CMD_SUCCESS; } -/* Write IPv6 static route configuration. */ -static int -static_config_ipv6 (struct vty *vty) -{ - struct route_node *rn; - struct static_route *si; - int write = 0; - char buf[SRCDEST2STR_BUFFER]; - struct route_table *stable; - struct vrf *vrf; - struct zebra_vrf *zvrf; - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if (!(zvrf = vrf->info)) - continue; - if ((stable = zvrf->stable[AFI_IP6][SAFI_UNICAST]) == NULL) - continue; - - for (rn = route_top (stable); rn; rn = srcdest_route_next (rn)) - for (si = rn->info; si; si = si->next) - { - vty_out (vty, "ipv6 route %s", srcdest_rnode2str (rn, buf, sizeof buf)); - - switch (si->type) - { - case STATIC_IPV4_GATEWAY: - vty_out (vty, " %s", inet_ntoa (si->addr.ipv4)); - break; - case STATIC_IPV6_GATEWAY: - vty_out (vty, " %s", inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ)); - break; - case STATIC_IFINDEX: - vty_out (vty, " %s", si->ifname); - break; - case STATIC_BLACKHOLE: - vty_out (vty, " Null0" ); - break; - case STATIC_IPV6_GATEWAY_IFINDEX: - vty_out (vty, " %s %s", - inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ), - ifindex2ifname (si->ifindex, si->vrf_id)); - break; - } - - /* flags are incompatible with STATIC_BLACKHOLE */ - if (si->type != STATIC_BLACKHOLE) - { - if (CHECK_FLAG(si->flags, ZEBRA_FLAG_REJECT)) - vty_out (vty, " %s", "reject"); - if (CHECK_FLAG(si->flags, ZEBRA_FLAG_BLACKHOLE)) - vty_out (vty, " %s", "blackhole"); - } - - if (si->tag) - vty_out (vty, " tag %"ROUTE_TAG_PRI, si->tag); - - if (si->distance != ZEBRA_STATIC_DISTANCE_DEFAULT) - vty_out (vty, " %d", si->distance); - - if (si->vrf_id != VRF_DEFAULT) - { - vty_out (vty, " vrf %s", zvrf_name (zvrf)); - } - - /* Label information */ - if (si->snh_label.num_labels) - vty_out (vty, " label %s", - mpls_label2str (si->snh_label.num_labels, - si->snh_label.label, buf, sizeof buf, 0)); - - vty_out (vty, "%s", VTY_NEWLINE); - - write = 1; - } - } - return write; -} - DEFUN (allow_external_route_update, allow_external_route_update_cmd, "allow-external-route-update", @@ -3978,9 +3899,9 @@ zebra_ip_config (struct vty *vty) { int write = 0; - write += static_config_ipv4 (vty, SAFI_UNICAST, "ip route"); - write += static_config_ipv4 (vty, SAFI_MULTICAST, "ip mroute"); - write += static_config_ipv6 (vty); + write += static_config (vty, AFI_IP, SAFI_UNICAST, "ip route"); + write += static_config (vty, AFI_IP, SAFI_MULTICAST, "ip mroute"); + write += static_config (vty, AFI_IP6, SAFI_UNICAST, "ipv6 route"); write += zebra_import_table_config (vty); return write; From 047fc9501d8d2f2279c2be42108967b2a63eb257 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 14 Nov 2016 15:28:17 -0500 Subject: [PATCH 099/193] bgpd: Allow 'show bgp neighbor' to indicate authentication or not When we configure authentication. Allow the 'show bgp neighbor' commands( and their ilk ) to indicate that the peer has authentication enabled. Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e5734bd76b..c24580ed4e 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -9227,6 +9227,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js json_object_int_add(json_neigh, "mraiInterval", p->v_routeadv); json_object_int_add(json_neigh, "mraiTimerExpireInMsecs", thread_timer_remain_second (p->t_routeadv) * 1000); } + if (p->password) + json_object_int_add(json_neigh, "authenticationEnabled", 1); if (p->t_read) json_object_string_add(json_neigh, "readThread", "on"); @@ -9254,6 +9256,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js vty_out (vty, "MRAI (interval %u) timer expires in %ld seconds%s", p->v_routeadv, thread_timer_remain_second (p->t_routeadv), VTY_NEWLINE); + if (p->password) + vty_out (vty, "Peer Authentication Enabled%s", VTY_NEWLINE); vty_out (vty, "Read thread: %s Write thread: %s%s", p->t_read ? "on" : "off", From d5f4ab97a6112009842e52978eb521e5a6fa7a07 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 16 May 2017 19:15:05 -0400 Subject: [PATCH 100/193] pimd: Fix spelling mistake in cli Signed-off-by: Donald Sharp --- pimd/pim_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 2d502d9aa9..41f69fca23 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -295,7 +295,7 @@ int pim_interface_config_write(struct vty *vty) /* IF ip igmp query-max-response-time */ if (pim_ifp->igmp_query_max_response_time_dsec != IGMP_QUERY_MAX_RESPONSE_TIME_DSEC) { - vty_out(vty, " ip igpm query-max-response-time %d%s", + vty_out(vty, " ip igmp query-max-response-time %d%s", pim_ifp->igmp_query_max_response_time_dsec, VTY_NEWLINE); ++writes; From 9c5cd62f08f5e0d77a6474e15a49dcf8bd8ce21c Mon Sep 17 00:00:00 2001 From: Don Slice Date: Wed, 23 Nov 2016 11:58:27 -0800 Subject: [PATCH 101/193] zebra: Move interfaces to default before deleting Encountered a crash in zebra due to getting a delete on an SVI with VRR configured. Since we don't actually do a delete but flag the interface as inactive, slag VRR interfaces would remain on the vrf_iflist with a lock count of zero, causing the crash. Since all other interface types are moved to the default table before deleting, doing the same thing for any interfaces that were left in the vrf. Testing includes manual testing, bgp-min, ospf-min, vrf-min, bgp-smoke, and ospf-smoke. All passed (first time or on rerun) or match known failures. Ticket: CM-13288 Signed-off-by: Don Slice Reviewed-by: Donald Sharp --- zebra/interface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra/interface.c b/zebra/interface.c index 39c20e6289..524183a434 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -693,6 +693,10 @@ if_delete_update (struct interface *ifp) for setting ifindex to IFINDEX_INTERNAL after processing the interface deletion message. */ ifp->ifindex = IFINDEX_INTERNAL; + + /* if the ifp is in a vrf, move it to default so vrf can be deleted if desired */ + if (ifp->vrf_id) + if_handle_vrf_change (ifp, VRF_DEFAULT); } /* VRF change for an interface */ From 63d825b0db90ba8a69c3da42a8fc163541495a13 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 6 Dec 2016 09:29:05 -0800 Subject: [PATCH 102/193] zebrad: Correct problem removing dead routes from rib due to NHT issue Fix for another issue with next-hop tracking for overlapping static routes created a problem removing the dead routes. This fix corrects that error. Ticket: CM-13710 Signed-off-by: Don Slice Reviewed By: Donald Sharp Testing Done: ospf-smoke, bgp-smoke --- zebra/zebra_rnh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index b679803b06..1032d5405f 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -546,7 +546,7 @@ zebra_rnh_process_static_routes (vrf_id_t vrfid, int family, { RNODE_FOREACH_RIB(static_rn, srib) { - if (srib->type == ZEBRA_ROUTE_STATIC) + if (srib->type != ZEBRA_ROUTE_STATIC) continue; /* Set the filter flag for the correct nexthop - static route may From 1dac3a9619c8436f81c7b37f0252574b0b677dd0 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 14 Feb 2017 09:15:40 -0800 Subject: [PATCH 103/193] zebra: stop deregistering static nexthops unless removing the static Problem reported was that with some overlapping static route configurations, when the link went down the less specific static was not re-installed after the link came back up. Determined that with the overlapping statics, we would recursively resolve the next-hop temporarily thru the more specific static route, but since the next-hop wasn't actually reachable, we would go through the code that clears the nht information for the static completely. This caused the nht code to no longer process the static route. After reviewing the process, there doesn't seem to be any reason that the static should be deregistered in that section of code. Removed the deregister and the problem is resolved and not addional failures seen in manual testing. zebra_test.py completed successfully and ospf and bgp smokes completed with no new failures. Ticket: CM-14873 Signed-off-by: Don Slice Reviewed-by: CCR-5696 --- zebra/zebra_rib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e48da0479b..23c4c9ebea 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -366,7 +366,6 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, if (set) { UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); - zebra_deregister_rnh_static_nexthops(rib->vrf_id, nexthop->resolved, top); nexthops_free(nexthop->resolved); nexthop->resolved = NULL; rib->nexthop_mtu = 0; @@ -597,7 +596,6 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, if (set) { UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); - zebra_deregister_rnh_static_nexthops (rib->vrf_id, nexthop->resolved, top); nexthops_free(nexthop->resolved); nexthop->resolved = NULL; } From 77566facad2070deda29fc636de5a6526110c792 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 10 May 2017 00:55:10 +0000 Subject: [PATCH 104/193] Change Frr.conf to frr.conf Signed-off-by: Daniel Walton --- cumulus/etc/frr/{Frr.conf => frr.conf} | 0 doc/Building_FRR_on_Ubuntu1604.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename cumulus/etc/frr/{Frr.conf => frr.conf} (100%) diff --git a/cumulus/etc/frr/Frr.conf b/cumulus/etc/frr/frr.conf similarity index 100% rename from cumulus/etc/frr/Frr.conf rename to cumulus/etc/frr/frr.conf diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index 5715b70158..655c810550 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -120,7 +120,7 @@ Add the following lines to `/etc/modules-load.d/modules.conf`: sudo install -m 644 cumulus/etc/default/frr /etc/default/frr sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons sudo install -m 644 cumulus/etc/frr/debian.conf /etc/frr/debian.conf - sudo install -m 644 cumulus/etc/frr/Frr.conf /etc/frr/Frr.conf + sudo install -m 644 cumulus/etc/frr/frr.conf /etc/frr/frr.conf sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf ### Enable daemons From 1f0a6ed1f1270a1a3c12bd67675c434c6f05be69 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Nov 2016 09:39:35 -0500 Subject: [PATCH 105/193] bgpd: Fix occassional turn off of extended-nexthop for an if Sometimes, like once every 400 iterations, when you restart Quagga, extended-nexthop has been turned off for interface based config( for 5549 ). Examining the code, there is only 1 real path to setting the PEER_FLAG_CAPABILITITY_ENHE and that is through peer_conf_interface_get. Modify this code path to always set the PEER_FLAG_CAPABILITY_ENHE if it is not already set. In addition, fix a possible pointer dereference. Ticket: CM-12929 Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 9d954e5007..0c6648d562 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2714,7 +2714,10 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, peer = peer_create (NULL, conf_if, bgp, bgp->as, as, as_type, afi, safi, NULL); - if (peer && v6only) + if (!peer) + return CMD_WARNING; + + if (v6only) SET_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY); /* Request zebra to initiate IPv6 RAs on this interface. We do this @@ -2723,10 +2726,7 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, * gets deleted later etc.) */ if (peer->ifp) - { - bgp_zebra_initiate_radv (bgp, peer); - } - peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); + bgp_zebra_initiate_radv (bgp, peer); } else if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) || (!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY))) @@ -2747,8 +2747,8 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, bgp_session_reset(peer); } - if (!peer) - return CMD_WARNING; + if (!CHECK_FLAG (peer->flags, PEER_FLAG_CAPABILITY_ENHE)) + peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); if (peer_group_name) { From 8c51cac02a366f0171d52e58418836b67fcf0b44 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 15 Nov 2016 10:16:52 -0500 Subject: [PATCH 106/193] bgpd: Fix ADJCHANGE message to include more info When bgp logs ADJCHANGE messages include the hostname and vrf that this change is being made in. Ticket: CM-10922 Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 2bbdca595c..4b8a296885 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1021,8 +1021,14 @@ bgp_stop (struct peer *peer) /* bgp log-neighbor-changes of neighbor Down */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Down %s", peer->host, - peer_down_str [(int) peer->last_reset]); + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default", + peer_down_str [(int) peer->last_reset]); + } /* graceful restart */ if (peer->t_gr_stale) @@ -1457,8 +1463,13 @@ bgp_establish (struct peer *peer) /* bgp log-neighbor-changes of neighbor Up */ if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) - zlog_info ("%%ADJCHANGE: neighbor %s Up", peer->host); - + { + struct vrf *vrf = vrf_lookup_by_id (peer->bgp->vrf_id); + zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up", + peer->host, + (peer->hostname) ? peer->hostname : "Unknown", + (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default"); + } /* assign update-group/subgroup */ update_group_adjust_peer_afs(peer); From 2139c76bb4b8c5cc63d605736d562a9095958721 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 12:00:40 -0500 Subject: [PATCH 107/193] bgpd: More Extended nexthop fixing Basically if we are reading in a cli with a extended-nexthop and we have not received from zebra the interface we are working on I believe we have a race condition where we are not propagating the PEER_FLAG_CAPABILITY_ENHE in this case. Modify the code to propagate even if we haven't found the interface yet. Signed-off-by: Donald Sharp --- bgpd/bgpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 24ef4465fe..7343d3714f 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2697,7 +2697,7 @@ peer_group_bind (struct bgp *bgp, union sockunion *su, struct peer *peer, * Capability extended-nexthop is enabled for an interface neighbor by * default. So, fix that up here. */ - if (peer->ifp && cap_enhe_preset) + if (peer->conf_if && cap_enhe_preset) peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE); for (afi = AFI_IP; afi < AFI_MAX; afi++) From 8801b8b0d0fbe5f3aaabcd320db1323dc8e5a533 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 22:17:39 -0500 Subject: [PATCH 108/193] ospf6d: Fix debug line always showing up in ospf6d The command 'debug ospf6 lsa unknown' was always showing up, upon starting of the ospf6 daemon. Remove this from happening. Also fix some help strings while we are in there. Ticket: CM-7913 Signed-off-by: Donald Sharp --- ospf6d/ospf6_lsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index bea153c928..f943e16bf2 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -77,8 +77,7 @@ struct ospf6_lsa_handler unknown_handler = "Unknown", "Unk", ospf6_unknown_lsa_show, - NULL, - OSPF6_LSA_DEBUG, + NULL }; void From b9796a6e01314bf408191545b0eac09c8cfee8a5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 1 Dec 2016 08:59:16 -0500 Subject: [PATCH 109/193] bgpd: Fix vrf crash Ensure that we have a valid vrf before we log information about it. Signed-off-by: Donald Sharp Reviewed-by: Don Slice --- bgpd/bgp_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 4b8a296885..424eec55c4 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1468,7 +1468,7 @@ bgp_establish (struct peer *peer) zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Up", peer->host, (peer->hostname) ? peer->hostname : "Unknown", - (vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default"); + vrf ? ((vrf->vrf_id != VRF_DEFAULT ) ? vrf->name : "Default") : ""); } /* assign update-group/subgroup */ update_group_adjust_peer_afs(peer); From dbb3cdb601642c1259cffca3b7c85e80e628abd7 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 16 May 2017 18:17:23 +0000 Subject: [PATCH 110/193] lib: correctly handle EOF when using poll() Descriptor owner should handle EOF, not thread.c Signed-off-by: Quentin Young --- lib/thread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index 34802fcedd..dbdd91dd24 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1052,14 +1052,13 @@ check_pollfds(struct thread_master *m, fd_set *readfd, int num) ready++; /* POLLIN / POLLOUT process event */ - if (m->handler.pfds[i].revents & POLLIN) + if (m->handler.pfds[i].revents & (POLLIN | POLLHUP)) thread_process_fds_helper(m, m->read[m->handler.pfds[i].fd], NULL, POLLIN, i); if (m->handler.pfds[i].revents & POLLOUT) thread_process_fds_helper(m, m->write[m->handler.pfds[i].fd], NULL, POLLOUT, i); /* remove fd from list on POLLNVAL */ - if (m->handler.pfds[i].revents & POLLNVAL || - m->handler.pfds[i].revents & POLLHUP) + if (m->handler.pfds[i].revents & POLLNVAL) { memmove(m->handler.pfds+i, m->handler.pfds+i+1, From f14b7abf4f36f6ebcd6280df41b430e062a696c2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 17 May 2017 01:53:47 +0000 Subject: [PATCH 111/193] vtysh: fix ldpd vtysh ldpd needs a special case to execute the correct exit command for walkup when using vtysh Signed-off-by: Quentin Young --- vtysh/vtysh.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 5bb969bef7..5c39e1ee90 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -324,7 +324,11 @@ vtysh_execute_func (const char *line, int pager) { vtysh_execute("exit-vnc"); } - else if ((saved_node == KEYCHAIN_KEY_NODE) && (tried == 1)) + else if ((saved_node == KEYCHAIN_KEY_NODE + || saved_node == LDP_PSEUDOWIRE_NODE + || saved_node == LDP_IPV4_IFACE_NODE + || saved_node == LDP_IPV6_IFACE_NODE) + && (tried == 1)) { vtysh_execute("exit"); } From a108e6e40d85089fe4e46197c0ae3135a12ab2fb Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 17 May 2017 18:37:24 +0000 Subject: [PATCH 112/193] eigrpd: disambiguate bandwidth command eigrpd defines a bandwidth command that takes kilobits instead of megabits which is problematic when installed in the same node as the megabits command since (1-100000) and (1-10000000) are ambiguous Signed-off-by: Quentin Young --- eigrpd/eigrp_vty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index 5694ca49f9..c6ff7b5a80 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -646,7 +646,8 @@ DEFUN (no_eigrp_if_delay, DEFUN (eigrp_if_bandwidth, eigrp_if_bandwidth_cmd, - "bandwidth (1-10000000)", + "eigrp bandwidth (1-10000000)", + "EIGRP specific commands\n" "Set bandwidth informational parameter\n" "Bandwidth in kilobits\n") { @@ -671,8 +672,9 @@ DEFUN (eigrp_if_bandwidth, DEFUN (no_eigrp_if_bandwidth, no_eigrp_if_bandwidth_cmd, - "no bandwidth [(1-10000000)]", + "no eigrp bandwidth [(1-10000000)]", NO_STR + "EIGRP specific commands\n" "Set bandwidth informational parameter\n" "Bandwidth in kilobits\n") { From 201c3dac294e15ecc6673d88f5ca9c1842a71f88 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Wed, 17 May 2017 14:54:10 -0400 Subject: [PATCH 113/193] bgpd: fix config of v6 vpn networks tags Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 4 ++-- bgpd/bgp_evpn_vty.c | 4 ++-- bgpd/bgp_mplsvpn.c | 12 ++++++------ bgpd/bgp_route.c | 16 ++-------------- bgpd/bgp_route.h | 4 ++-- 5 files changed, 14 insertions(+), 26 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 23be34c63b..01df053952 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -219,7 +219,7 @@ DEFUN (encap_network, int idx_ipv4 = 1; int idx_rd = 3; int idx_word = 5; - return bgp_static_set_safi (SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, + return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); } @@ -238,7 +238,7 @@ DEFUN (no_encap_network, int idx_ipv4 = 2; int idx_rd = 4; int idx_word = 6; - return bgp_static_unset_safi (SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, + return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, 0, NULL, NULL, NULL); } diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index c133d7ba39..a51affc4f7 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -705,7 +705,7 @@ DEFUN(evpnrt5_network, int idx_ethtag = 5; int idx_routermac = 13; int idx_rmap = 15; - return bgp_static_set_safi(SAFI_EVPN, vty, + return bgp_static_set_safi(AFI_L2VPN, SAFI_EVPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, @@ -739,7 +739,7 @@ DEFUN(no_evpnrt5_network, int idx_ethtag = 6; int idx_esi = 10; int idx_gwip = 12; - return bgp_static_unset_safi(SAFI_EVPN, vty, + return bgp_static_unset_safi(AFI_L2VPN, SAFI_EVPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_label]->arg, EVPN_IP_PREFIX, diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 97b40df28a..60a48f506b 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -471,7 +471,7 @@ DEFUN (vpnv4_network, int idx_ipv4_prefixlen = 1; int idx_ext_community = 3; int idx_word = 5; - return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, + return bgp_static_set_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); } @@ -491,7 +491,7 @@ DEFUN (vpnv4_network_route_map, int idx_ext_community = 3; int idx_word = 5; int idx_word_2 = 7; - return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, + return bgp_static_set_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); } @@ -510,7 +510,7 @@ DEFUN (no_vpnv4_network, int idx_ipv4_prefixlen = 2; int idx_ext_community = 4; int idx_word = 6; - return bgp_static_unset_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, + return bgp_static_unset_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, 0, NULL, NULL, NULL); } @@ -532,9 +532,9 @@ DEFUN (vpnv6_network, int idx_word = 5; int idx_word_2 = 7; if (argc == 8) - return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); + return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); else - return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); + return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); } /* For testing purpose, static route of MPLS-VPN. */ @@ -552,7 +552,7 @@ DEFUN (no_vpnv6_network, int idx_ipv6_prefix = 2; int idx_ext_community = 4; int idx_word = 6; - return bgp_static_unset_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, 0, NULL, NULL, NULL); + return bgp_static_unset_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, 0, NULL, NULL, NULL); } int diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index de51de7a66..cb4d88859e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4453,7 +4453,7 @@ bgp_purge_static_redist_routes (struct bgp *bgp) * I think it can probably be factored with bgp_static_set. */ int -bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str, +bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str, const char *rd_str, const char *tag_str, const char *rmap_str, int evpn_type, const char *esi, const char *gwip, const char *ethtag, const char *routermac) @@ -4467,14 +4467,8 @@ bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str, struct bgp_table *table; struct bgp_static *bgp_static; u_char tag[3]; - afi_t afi; struct prefix gw_ip; - if(safi == SAFI_EVPN) - afi = AFI_L2VPN; - else - afi = AFI_IP; - /* validate ip prefix */ ret = str2prefix (ip_str, &p); if (! ret) @@ -4599,7 +4593,7 @@ bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str, /* Configure static BGP network. */ int -bgp_static_unset_safi(safi_t safi, struct vty *vty, const char *ip_str, +bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_str, const char *rd_str, const char *tag_str, int evpn_type, const char *esi, const char *gwip, const char *ethtag) { @@ -4612,12 +4606,6 @@ bgp_static_unset_safi(safi_t safi, struct vty *vty, const char *ip_str, struct bgp_table *table; struct bgp_static *bgp_static; u_char tag[3]; - afi_t afi; - - if(safi == SAFI_EVPN) - afi = AFI_L2VPN; - else - afi = AFI_IP; /* Convert IP prefix string to struct prefix. */ ret = str2prefix (ip_str, &p); diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index e75978d003..dbdcedd005 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -318,11 +318,11 @@ extern void bgp_static_update (struct bgp *, struct prefix *, struct bgp_static afi_t, safi_t); extern void bgp_static_withdraw (struct bgp *, struct prefix *, afi_t, safi_t); -extern int bgp_static_set_safi (safi_t safi, struct vty *vty, const char *, +extern int bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *, const char *, const char *, const char *, int, const char *, const char *, const char *, const char *); -extern int bgp_static_unset_safi (safi_t safi, struct vty *, const char *, +extern int bgp_static_unset_safi (afi_t afi, safi_t safi, struct vty *, const char *, const char *, const char *, int, const char *, const char *, const char *); From 201f6271de2c5b428c6390ee445c9b38dd3550fc Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 17 May 2017 18:30:43 -0400 Subject: [PATCH 114/193] nhrpd: Fix some missing newlines Signed-off-by: Donald Sharp --- nhrpd/nhrp_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 9b8463fb54..940b3ddfd7 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -206,7 +206,7 @@ DEFUN(nhrp_event_socket, nhrp_event_socket_cmd, NHRP_STR "Event Manager commands\n" "Event Manager unix socket path\n" - "Unix path for the socket") + "Unix path for the socket\n") { evmgr_set_socket(argv[3]->arg); return CMD_SUCCESS; @@ -218,7 +218,7 @@ DEFUN(no_nhrp_event_socket, no_nhrp_event_socket_cmd, NHRP_STR "Event Manager commands\n" "Event Manager unix socket path\n" - "Unix path for the socket") + "Unix path for the socket\n") { evmgr_set_socket(NULL); return CMD_SUCCESS; From d258c885bdc4e4a8141668fd94db1e24b5b8588a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 17 May 2017 18:31:02 -0400 Subject: [PATCH 115/193] nhrpd: Fix crash in 'no nhrp event socket..' command Signed-off-by: Donald Sharp --- nhrpd/nhrp_event.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nhrpd/nhrp_event.c b/nhrpd/nhrp_event.c index da86c585a4..8a3f820f76 100644 --- a/nhrpd/nhrp_event.c +++ b/nhrpd/nhrp_event.c @@ -215,9 +215,12 @@ void evmgr_init(void) void evmgr_set_socket(const char *socket) { - if (nhrp_event_socket_path) + if (nhrp_event_socket_path) { free((char *) nhrp_event_socket_path); - nhrp_event_socket_path = strdup(socket); + nhrp_event_socket_path = NULL; + } + if (socket) + nhrp_event_socket_path = strdup(socket); evmgr_connection_error(&evmgr_connection); } From 55fd6ee9ca49301ddfe5f2e3af11cfa89eebdeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 17 May 2017 18:36:07 -0400 Subject: [PATCH 116/193] nhrp: improve CIE prefix length handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RFC2332 states that prefix length MUST be 0xff for unique bindings. However, it seems at least some Cisco firmwares use host prefix length instead (which on wire level makes sense). Relax the handling of prefix length to treat all value longer than address length as 0xff. Additionally treat 0x00 the same way too, this is required by the RFC. This also fixes the prefix length address family to be checked against protocol address. Signed-off-by: Timo Teräs --- nhrpd/nhrp_nhs.c | 2 +- nhrpd/nhrp_peer.c | 11 ++++++++--- nhrpd/nhrp_shortcut.c | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c index b926a8d7b2..76c591fd79 100644 --- a/nhrpd/nhrp_nhs.c +++ b/nhrpd/nhrp_nhs.c @@ -189,7 +189,7 @@ static int nhrp_reg_send_req(struct thread *t) hdr->flags |= htons(NHRP_FLAG_REGISTRATION_NAT); ext = nhrp_ext_push(zb, hdr, NHRP_EXTENSION_NAT_ADDRESS); cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS, &nifp->nbma, &if_ad->addr); - cie->prefix_length = 8 * sockunion_get_addrlen(&nifp->nbma); + cie->prefix_length = 8 * sockunion_get_addrlen(&if_ad->addr); nhrp_ext_complete(zb, ext); nhrp_packet_complete(zb, hdr); diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c index 5f1e43a608..d9e8627a14 100644 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -386,11 +386,12 @@ static void nhrp_handle_registration_request(struct nhrp_packet_parser *p) struct nhrp_extension_header *ext; struct nhrp_cache *c; union sockunion cie_nbma, cie_proto, *proto_addr, *nbma_addr, *nbma_natoa; - int holdtime, natted = 0; + int holdtime, prefix_len, hostprefix_len, natted = 0; size_t paylen; void *pay; debugf(NHRP_DEBUG_COMMON, "Parsing and replying to Registration Req"); + hostprefix_len = 8 * sockunion_get_addrlen(&p->if_ad->addr); if (!sockunion_same(&p->src_nbma, &p->peer->vc->remote.nbma)) natted = 1; @@ -412,13 +413,17 @@ static void nhrp_handle_registration_request(struct nhrp_packet_parser *p) zbuf_init(&payload, pay, paylen, paylen); while ((cie = nhrp_cie_pull(&payload, hdr, &cie_nbma, &cie_proto)) != NULL) { - if (cie->prefix_length != 0xff && !(p->hdr->flags & htons(NHRP_FLAG_REGISTRATION_UNIQUE))) { + prefix_len = cie->prefix_length; + if (prefix_len == 0 || prefix_len >= hostprefix_len) + prefix_len = hostprefix_len; + + if (prefix_len != hostprefix_len && !(p->hdr->flags & htons(NHRP_FLAG_REGISTRATION_UNIQUE))) { cie->code = NHRP_CODE_BINDING_NON_UNIQUE; continue; } /* We currently support only unique prefix registrations */ - if (cie->prefix_length != 0xff) { + if (prefix_len != hostprefix_len) { cie->code = NHRP_CODE_ADMINISTRATIVELY_PROHIBITED; continue; } diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c index 4a6cbce31f..4faa9d7863 100644 --- a/nhrpd/nhrp_shortcut.c +++ b/nhrpd/nhrp_shortcut.c @@ -228,7 +228,7 @@ static void nhrp_shortcut_recv_resolution_rep(struct nhrp_reqid *reqid, void *ar prefix.prefixlen = cie->prefix_length; /* Sanity check prefix length */ - if (prefix.prefixlen >= 8*prefix_blen(&prefix)) { + if (prefix.prefixlen >= 8*prefix_blen(&prefix) || prefix.prefixlen == 0) { prefix.prefixlen = 8*prefix_blen(&prefix); } else if (nhrp_route_address(NULL, &pp->dst_proto, &route_prefix, NULL) == NHRP_ROUTE_NBMA_NEXTHOP) { if (prefix.prefixlen < route_prefix.prefixlen) From 4a07939b68450a2fa4dbf808316da5cc3149d754 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 17 May 2017 20:33:43 -0400 Subject: [PATCH 117/193] pimd: Thread changes allow pim to crash a boo When we add a thread pointer to thread_add_XXX functions when the specified function is called, thread.c is setting the thread pointer to NULL. This was causing pim to liberally pull it's zassert grenade pin's. Additionally clean up code to not set the NULL pointer. Signed-off-by: Donald Sharp --- pimd/pim_ifchannel.c | 4 ---- pimd/pim_igmp.c | 10 ---------- pimd/pim_igmpv3.c | 11 ----------- pimd/pim_mroute.c | 3 --- pimd/pim_msdp.c | 5 ----- pimd/pim_neighbor.c | 3 --- pimd/pim_pim.c | 2 -- pimd/pim_ssmpingd.c | 5 +---- pimd/pim_upstream.c | 11 +---------- pimd/pim_zebra.c | 4 ---- pimd/pim_zlookup.c | 5 ----- 11 files changed, 2 insertions(+), 61 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 77ff2aaa4e..d4dbcb383d 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -586,8 +586,6 @@ static int on_ifjoin_expiry_timer(struct thread *t) ch = THREAD_ARG(t); - ch->t_ifjoin_expiry_timer = NULL; - ifjoin_to_noinfo(ch); /* ch may have been deleted */ @@ -603,8 +601,6 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) ch = THREAD_ARG(t); - ch->t_ifjoin_prune_pending_timer = NULL; - if (ch->ifjoin_state == PIM_IFJOIN_PRUNE_PENDING) { /* Send PruneEcho(S,G) ? */ diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 66dfc069c9..76ec812b3f 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -155,7 +155,6 @@ static int pim_igmp_other_querier_expire(struct thread *t) igmp = THREAD_ARG(t); - zassert(igmp->t_other_querier_timer); zassert(!igmp->t_igmp_query_timer); if (PIM_DEBUG_IGMP_TRACE) { @@ -166,8 +165,6 @@ static int pim_igmp_other_querier_expire(struct thread *t) ifaddr_str); } - igmp->t_other_querier_timer = NULL; - /* We are the current querier, then re-start sending general queries. @@ -200,9 +197,7 @@ void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp) zlog_debug("Querier %s resetting TIMER event for Other-Querier-Present", ifaddr_str); } - THREAD_OFF(igmp->t_other_querier_timer); - zassert(!igmp->t_other_querier_timer); } else { /* @@ -264,7 +259,6 @@ void pim_igmp_other_querier_timer_off(struct igmp_sock *igmp) } } THREAD_OFF(igmp->t_other_querier_timer); - zassert(!igmp->t_other_querier_timer); } static int @@ -964,7 +958,6 @@ static int igmp_group_timer(struct thread *t) zassert(group->group_filtermode_isexcl); - group->t_group_timer = NULL; group->group_filtermode_isexcl = 0; /* Any source (*,G) is forwarded only if mode is EXCLUDE {empty} */ @@ -972,7 +965,6 @@ static int igmp_group_timer(struct thread *t) igmp_source_delete_expired(group->group_source_list); - zassert(!group->t_group_timer); zassert(!group->group_filtermode_isexcl); /* @@ -999,9 +991,7 @@ static void group_timer_off(struct igmp_group *group) zlog_debug("Cancelling TIMER event for group %s on %s", group_str, group->group_igmp_sock->interface->name); } - THREAD_OFF(group->t_group_timer); - zassert(!group->t_group_timer); } void igmp_group_timer_on(struct igmp_group *group, diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index 51db9ac3b7..ad37ad8762 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -128,9 +128,6 @@ static int igmp_source_timer(struct thread *t) group->group_igmp_sock->interface->name); } - zassert(source->t_source_timer); - source->t_source_timer = NULL; - /* RFC 3376: 6.3. IGMPv3 Source-Specific Forwarding Rules @@ -151,8 +148,6 @@ static int igmp_source_timer(struct thread *t) Source timer switched from (T > 0) to (T == 0): disable forwarding. */ - zassert(!source->t_source_timer); - if (group->group_filtermode_isexcl) { /* EXCLUDE mode */ @@ -193,7 +188,6 @@ static void source_timer_off(struct igmp_group *group, } THREAD_OFF(source->t_source_timer); - zassert(!source->t_source_timer); } static void igmp_source_timer_on(struct igmp_group *group, @@ -216,7 +210,6 @@ static void igmp_source_timer_on(struct igmp_group *group, thread_add_timer_msec(master, igmp_source_timer, source, interval_msec, &source->t_source_timer); - zassert(source->t_source_timer); /* RFC 3376: 6.3. IGMPv3 Source-Specific Forwarding Rules @@ -470,8 +463,6 @@ source_new (struct igmp_group *group, listnode_add(group->group_source_list, src); - zassert(!src->t_source_timer); /* source timer == 0 */ - /* Any source (*,G) is forwarded only if mode is EXCLUDE {empty} */ igmp_anysource_forward_stop(group); @@ -1281,8 +1272,6 @@ static int igmp_group_retransmit(struct thread *t) num_retransmit_sources_left = group_retransmit_sources(group, send_with_sflag_set); - group->t_group_query_retransmit_timer = NULL; - /* Keep group retransmit timer running if there is any retransmit counter pending diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index c3d68e24d4..01747268a3 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -625,7 +625,6 @@ static int mroute_read(struct thread *t) } /* Keep reading */ done: - qpim_mroute_socket_reader = NULL; mroute_read_on(); return result; @@ -633,8 +632,6 @@ static int mroute_read(struct thread *t) static void mroute_read_on() { - zassert(!qpim_mroute_socket_reader); - thread_add_read(master, mroute_read, 0, qpim_mroute_socket_fd, &qpim_mroute_socket_reader); } diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 001e080d5d..ed1284a95d 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -67,7 +67,6 @@ pim_msdp_sa_timer_expiry_log(struct pim_msdp_sa *sa, const char *timer_str) static int pim_msdp_sa_adv_timer_cb(struct thread *t) { - msdp->sa_adv_timer = NULL; if (PIM_DEBUG_MSDP_EVENTS) { zlog_debug("MSDP SA advertisment timer expired"); } @@ -93,7 +92,6 @@ pim_msdp_sa_state_timer_cb(struct thread *t) struct pim_msdp_sa *sa; sa = THREAD_ARG(t); - sa->sa_state_timer = NULL; if (PIM_DEBUG_MSDP_EVENTS) { pim_msdp_sa_timer_expiry_log(sa, "state"); @@ -898,7 +896,6 @@ pim_msdp_peer_hold_timer_cb(struct thread *t) struct pim_msdp_peer *mp; mp = THREAD_ARG(t); - mp->hold_timer = NULL; if (PIM_DEBUG_MSDP_EVENTS) { pim_msdp_peer_timer_expiry_log(mp, "hold"); @@ -932,7 +929,6 @@ pim_msdp_peer_ka_timer_cb(struct thread *t) struct pim_msdp_peer *mp; mp = THREAD_ARG(t); - mp->ka_timer = NULL; if (PIM_DEBUG_MSDP_EVENTS) { pim_msdp_peer_timer_expiry_log(mp, "ka"); @@ -994,7 +990,6 @@ pim_msdp_peer_cr_timer_cb(struct thread *t) struct pim_msdp_peer *mp; mp = THREAD_ARG(t); - mp->cr_timer = NULL; if (PIM_DEBUG_MSDP_EVENTS) { pim_msdp_peer_timer_expiry_log(mp, "connect-retry"); diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 00190bd830..7583be858d 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -223,8 +223,6 @@ static int on_neighbor_timer(struct thread *t) neigh->holdtime, src_str, ifp->name); } - neigh->t_expire_timer = NULL; - snprintf(msg, sizeof(msg), "%d-sec holdtime expired", neigh->holdtime); pim_neighbor_delete(ifp, neigh, msg); @@ -278,7 +276,6 @@ on_neighbor_jp_timer (struct thread *t) zlog_debug("%s:Sending JP Agg to %s on %s with %d groups", __PRETTY_FUNCTION__, src_str, neigh->interface->name, neigh->upstream_jp_agg->count); } - neigh->jp_timer = NULL; rpf.source_nexthop.interface = neigh->interface; rpf.rpf_addr.u.prefix4 = neigh->source_addr; diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 2a2f3060ab..f6a5bb1226 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -721,7 +721,6 @@ static int on_pim_hello_send(struct thread *t) /* * Schedule next hello */ - pim_ifp->t_pim_hello_timer = NULL; hello_resched(ifp); /* @@ -801,7 +800,6 @@ void pim_hello_restart_triggered(struct interface *ifp) } THREAD_OFF(pim_ifp->t_pim_hello_timer); - pim_ifp->t_pim_hello_timer = NULL; } random_msec = triggered_hello_delay_msec; diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index 1249e0ee57..c907d66d5a 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -316,12 +316,10 @@ static int ssmpingd_sock_read(struct thread *t) ss = THREAD_ARG(t); sock_fd = THREAD_FD(t); - zassert(sock_fd == ss->sock_fd); result = ssmpingd_read_msg(ss); /* Keep reading */ - ss->t_sock_read = 0; ssmpingd_read_on(ss); return result; @@ -329,7 +327,6 @@ static int ssmpingd_sock_read(struct thread *t) static void ssmpingd_read_on(struct ssmpingd_sock *ss) { - zassert(!ss->t_sock_read); thread_add_read(master, ssmpingd_sock_read, ss, ss->sock_fd, &ss->t_sock_read); } @@ -370,7 +367,7 @@ static struct ssmpingd_sock *ssmpingd_new(struct in_addr source_addr) } ss->sock_fd = sock_fd; - ss->t_sock_read = 0; + ss->t_sock_read = NULL; ss->source_addr = source_addr; ss->creation = pim_time_monotonic_sec(); ss->requests = 0; diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index c139c91a8c..49c0ad3fd9 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -280,8 +280,6 @@ static int on_join_timer(struct thread *t) up = THREAD_ARG(t); - up->t_join_timer = NULL; - /* * In the case of a HFR we will not ahve anyone to send this to. */ @@ -1075,7 +1073,6 @@ pim_upstream_keep_alive_timer (struct thread *t) struct pim_upstream *up; up = THREAD_ARG(t); - up->t_ka_timer = NULL; if (I_am_RP (up->sg.grp)) { @@ -1131,7 +1128,6 @@ pim_upstream_msdp_reg_timer(struct thread *t) struct pim_upstream *up; up = THREAD_ARG(t); - up->t_msdp_reg_timer = NULL; /* source is no longer active - pull the SA from MSDP's cache */ pim_msdp_sa_local_del(&up->sg); @@ -1322,8 +1318,6 @@ pim_upstream_register_stop_timer (struct thread *t) struct ip ip_hdr; up = THREAD_ARG (t); - up->t_rs_timer = NULL; - if (PIM_DEBUG_TRACE) { char state_str[PIM_REG_STATE_STR_LEN]; @@ -1384,10 +1378,7 @@ pim_upstream_start_register_stop_timer (struct pim_upstream *up, int null_regist uint32_t time; if (up->t_rs_timer) - { - THREAD_TIMER_OFF (up->t_rs_timer); - up->t_rs_timer = NULL; - } + THREAD_TIMER_OFF (up->t_rs_timer); if (!null_register) { diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 4506e8cdb5..1f2b47c7db 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -579,10 +579,6 @@ void pim_scan_oil() static int on_rpf_cache_refresh(struct thread *t) { - zassert(qpim_rpf_cache_refresher); - - qpim_rpf_cache_refresher = 0; - /* update PIM protocol state */ scan_upstream_rpf_cache(); diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 9c26745e77..e4ca046818 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -46,7 +46,6 @@ static int zclient_lookup_connect(struct thread *t) struct zclient *zlookup; zlookup = THREAD_ARG(t); - zlookup->t_connect = NULL; if (zlookup->sock >= 0) { return 0; @@ -61,7 +60,6 @@ static int zclient_lookup_connect(struct thread *t) zlookup->fail = 0; /* reset counter on connection */ } - zassert(!zlookup->t_connect); if (zlookup->sock < 0) { /* Since last connect failed, retry within 10 secs */ zclient_lookup_sched(zlookup, 10); @@ -74,8 +72,6 @@ static int zclient_lookup_connect(struct thread *t) /* Schedule connection with delay. */ static void zclient_lookup_sched(struct zclient *zlookup, int delay) { - zassert(!zlookup->t_connect); - thread_add_timer(master, zclient_lookup_connect, zlookup, delay, &zlookup->t_connect); @@ -86,7 +82,6 @@ static void zclient_lookup_sched(struct zclient *zlookup, int delay) /* Schedule connection for now. */ static void zclient_lookup_sched_now(struct zclient *zlookup) { - zassert(!zlookup->t_connect); thread_add_event(master, zclient_lookup_connect, zlookup, 0, &zlookup->t_connect); From a27cb3cfe901d4f1378116bc91e6656aaed7c74c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 17 May 2017 20:31:19 +0000 Subject: [PATCH 118/193] ospf6d: fix decimal area ID cli Not all numbers are dotted quads Signed-off-by: Quentin Young --- ospf6d/ospf6_area.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index bbab8598b8..1691e501f8 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -406,26 +406,11 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) } -#define OSPF6_CMD_AREA_LOOKUP(str, oa) \ -{ \ - u_int32_t area_id = 0; \ - if (inet_pton (AF_INET, str, &area_id) != 1) \ - { \ - vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ - return CMD_SUCCESS; \ - } \ - oa = ospf6_area_lookup (area_id, ospf6); \ - if (oa == NULL) \ - { \ - vty_out (vty, "No such Area: %s%s", str, VNL); \ - return CMD_SUCCESS; \ - } \ -} - #define OSPF6_CMD_AREA_GET(str, oa) \ { \ - u_int32_t area_id = 0; \ - if (inet_pton (AF_INET, str, &area_id) != 1) \ + char *ep; \ + u_int32_t area_id = htonl (strtol(str, &ep, 10)); \ + if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \ { \ vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ return CMD_SUCCESS; \ From 32f464d891df378b37bc01e62be6a56ff3b205ba Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 17 May 2017 20:31:19 +0000 Subject: [PATCH 119/193] ospf6d: fix decimal area ID cli Not all numbers are dotted quads Signed-off-by: Quentin Young --- ospf6d/ospf6_area.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 2b25585e6c..fd5e84d88c 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -406,26 +406,11 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) } -#define OSPF6_CMD_AREA_LOOKUP(str, oa) \ -{ \ - u_int32_t area_id = 0; \ - if (inet_pton (AF_INET, str, &area_id) != 1) \ - { \ - vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ - return CMD_SUCCESS; \ - } \ - oa = ospf6_area_lookup (area_id, ospf6); \ - if (oa == NULL) \ - { \ - vty_out (vty, "No such Area: %s%s", str, VNL); \ - return CMD_SUCCESS; \ - } \ -} - #define OSPF6_CMD_AREA_GET(str, oa) \ { \ - u_int32_t area_id = 0; \ - if (inet_pton (AF_INET, str, &area_id) != 1) \ + char *ep; \ + u_int32_t area_id = htonl (strtol(str, &ep, 10)); \ + if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \ { \ vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ return CMD_SUCCESS; \ From ba4eb1bccf8afa4516fa78d510d96161e2363e22 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Mon, 10 Apr 2017 18:01:53 -0700 Subject: [PATCH 120/193] pimd: pim bfd support All PIM Neighbors for a given pim interface is registered with BFD. Upon receiving BFD status down event, PIM Neighbor with BFD info is deleted. Add pim bfd configuraiton (CLI) per interface, '[no] ip pim bfd' Testing Done: Configure BFD under PIM interface on all neighbor routers, check bfd sessions up, remote end unconfigure BFD, results in BFD session down. Previous state was UP to New state DOWN, results in PIM neighbor delete behind that particular pim interface. Pim-smoke Results: Ran 94 tests in 7409.680s FAILED (SKIP=8, failures=2) Signed-off-by: Chirag Shah --- pimd/Makefile.am | 4 +- pimd/pim_bfd.c | 360 +++++++++++++++++++++++++++++++++ pimd/pim_bfd.h | 42 ++++ pimd/pim_cmd.c | 101 +++++++++ pimd/pim_iface.h | 4 + pimd/pim_main.c | 2 + pimd/pim_neighbor.c | 7 + pimd/pim_neighbor.h | 1 + pimd/pim_upstream.h | 3 + pimd/pim_vty.c | 3 + pimd/pim_zebra.c | 4 + pimd/pimd.c | 1 + zebra/client_main.c | 1 + zebra/zebra_ptm.c | 2 +- zebra/zebra_ptm_redistribute.c | 7 +- 15 files changed, 536 insertions(+), 6 deletions(-) create mode 100644 pimd/pim_bfd.c create mode 100644 pimd/pim_bfd.h diff --git a/pimd/Makefile.am b/pimd/Makefile.am index 77eb5c7568..0dd6c569dc 100644 --- a/pimd/Makefile.am +++ b/pimd/Makefile.am @@ -53,7 +53,7 @@ libpim_a_SOURCES = \ pim_ssmpingd.c pim_int.c pim_rp.c \ pim_static.c pim_br.c pim_register.c pim_routemap.c \ pim_msdp.c pim_msdp_socket.c pim_msdp_packet.c \ - pim_jp_agg.c pim_nht.c pim_ssm.c + pim_jp_agg.c pim_nht.c pim_ssm.c pim_bfd.c noinst_HEADERS = \ pim_memory.h \ @@ -66,7 +66,7 @@ noinst_HEADERS = \ pim_igmp_join.h pim_ssmpingd.h pim_int.h pim_rp.h \ pim_static.h pim_br.h pim_register.h \ pim_msdp.h pim_msdp_socket.h pim_msdp_packet.h pim_nht.h \ - pim_jp_agg.h pim_ssm.h + pim_jp_agg.h pim_ssm.h pim_bfd.h pimd_SOURCES = \ pim_main.c $(libpim_a_SOURCES) diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c new file mode 100644 index 0000000000..5c10df32e1 --- /dev/null +++ b/pimd/pim_bfd.c @@ -0,0 +1,360 @@ +/* + * pim_bfd.c: PIM BFD handling routines + * + * Copyright (C) 2017 Cumulus Networks, Inc. + * Chirag Shah + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + +#include "lib/json.h" +#include "command.h" +#include "vty.h" +#include "zclient.h" + +#include "pim_cmd.h" +#include "pim_vty.h" +#include "pim_iface.h" +#include "pim_bfd.h" +#include "bfd.h" +#include "pimd.h" +#include "pim_zebra.h" + +/* + * pim_bfd_write_config - Write the interface BFD configuration. + */ +void +pim_bfd_write_config (struct vty *vty, struct interface *ifp) +{ + struct pim_interface *pim_ifp = ifp->info; + struct bfd_info *bfd_info = NULL; + + if (!pim_ifp) + return; + bfd_info = (struct bfd_info *) pim_ifp->bfd_info; + if (!bfd_info) + { + zlog_debug ("%s: interface %s bfd_info is NULL ", __PRETTY_FUNCTION__, + ifp->name); + return; + } + if (CHECK_FLAG (bfd_info->flags, BFD_FLAG_PARAM_CFG)) + vty_out (vty, " ip pim bfd %d %d %d%s", + bfd_info->detect_mult, bfd_info->required_min_rx, + bfd_info->desired_min_tx, VTY_NEWLINE); + else + vty_out (vty, " ip pim bfd%s", VTY_NEWLINE); +} + +/* + * pim_bfd_show_info - Show BFD info structure + */ +void +pim_bfd_show_info (struct vty *vty, void *bfd_info, json_object * json_obj, + u_char use_json, int param_only) +{ + if (param_only) + bfd_show_param (vty, (struct bfd_info *) bfd_info, 1, 0, use_json, + json_obj); + else + bfd_show_info (vty, (struct bfd_info *) bfd_info, 0, 1, use_json, + json_obj); +} + +/* + * pim_bfd_info_nbr_create - Create/update BFD information for a neighbor. + */ +void +pim_bfd_info_nbr_create (struct pim_interface *pim_ifp, + struct pim_neighbor *neigh) +{ + struct bfd_info *nbr_bfd_info = NULL; + + /* Check if Pim Interface BFD is enabled */ + if (!pim_ifp || !pim_ifp->bfd_info) + return; + + if (!neigh->bfd_info) + neigh->bfd_info = bfd_info_create (); + + if (!neigh->bfd_info) + return; + zlog_debug ("%s: bfd_info ", __PRETTY_FUNCTION__); + + nbr_bfd_info = (struct bfd_info *) neigh->bfd_info; + nbr_bfd_info->detect_mult = pim_ifp->bfd_info->detect_mult; + nbr_bfd_info->desired_min_tx = pim_ifp->bfd_info->desired_min_tx; + nbr_bfd_info->required_min_rx = pim_ifp->bfd_info->required_min_rx; +} + +/* + * pim_bfd_info_free - Free BFD info structure + */ +void +pim_bfd_info_free (void **bfd_info) +{ + bfd_info_free ((struct bfd_info **) bfd_info); +} + +static void +pim_bfd_reg_dereg_nbr (struct pim_neighbor *nbr, int command) +{ + struct pim_interface *pim_ifp = NULL; + struct bfd_info *bfd_info = NULL; + struct zclient *zclient = NULL; + + zclient = pim_zebra_zclient_get (); + + if (!nbr) + return; + pim_ifp = nbr->interface->info; + bfd_info = (struct bfd_info *) pim_ifp->bfd_info; + if (!bfd_info) + return; + if (PIM_DEBUG_PIM_TRACE) + { + char str[INET_ADDRSTRLEN]; + pim_inet4_dump ("", nbr->source_addr, str, sizeof (str)); + zlog_debug ("%s Nbr %s %s with BFD", __PRETTY_FUNCTION__, str, + bfd_get_command_dbg_str (command)); + } + bfd_peer_sendmsg (zclient, bfd_info, AF_INET, + &nbr->source_addr, NULL, nbr->interface->name, + 0, 0, command, 0, VRF_DEFAULT); +} + +/* + * pim_bfd_reg_dereg_all_nbr - Register/Deregister all neighbors associated + * with a interface with BFD through + * zebra for starting/stopping the monitoring of + * the neighbor rechahability. + */ +int +pim_bfd_reg_dereg_all_nbr (struct interface *ifp, int command) +{ + struct pim_interface *pim_ifp = NULL; + struct listnode *node = NULL; + struct pim_neighbor *neigh = NULL; + + pim_ifp = ifp->info; + if (!pim_ifp) + return -1; + if (!pim_ifp->bfd_info) + return -1; + + for (ALL_LIST_ELEMENTS_RO (pim_ifp->pim_neighbor_list, node, neigh)) + { + if (command != ZEBRA_BFD_DEST_DEREGISTER) + pim_bfd_info_nbr_create (pim_ifp, neigh); + else + bfd_info_free ((struct bfd_info **) &neigh->bfd_info); + + pim_bfd_reg_dereg_nbr (neigh, command); + } + + return 0; +} + +/* + * pim_bfd_trigger_event - Neighbor is registered/deregistered with BFD when + * neighbor state is changed to/from 2way. + */ +void +pim_bfd_trigger_event (struct pim_interface *pim_ifp, struct pim_neighbor *nbr, uint8_t nbr_up) +{ + if (nbr_up) + { + pim_bfd_info_nbr_create (pim_ifp, nbr); + pim_bfd_reg_dereg_nbr (nbr, ZEBRA_BFD_DEST_REGISTER); + } + else + { + pim_bfd_info_free ((void *)&nbr->bfd_info); + pim_bfd_reg_dereg_nbr (nbr, ZEBRA_BFD_DEST_DEREGISTER); + } +} + +/* + * pim_bfd_if_param_set - Set the configured BFD paramter values for + * interface. + */ +void +pim_bfd_if_param_set (struct interface *ifp, u_int32_t min_rx, + u_int32_t min_tx, u_int8_t detect_mult, int defaults) +{ + struct pim_interface *pim_ifp = ifp->info; + int command = 0; + + bfd_set_param ((struct bfd_info **) &(pim_ifp->bfd_info), min_rx, min_tx, + detect_mult, defaults, &command); + + if (pim_ifp->bfd_info) + { + if (PIM_DEBUG_PIM_TRACE) + zlog_debug ("%s: interface %s has bfd_info", __PRETTY_FUNCTION__, + ifp->name); + } + if (command) + pim_bfd_reg_dereg_all_nbr (ifp, command); +} + + +/* + * pim_bfd_interface_dest_update - Find the neighbor for which the BFD status + * has changed and bring down the neighbor + * connectivity if the BFD status changed to + * down. + */ +static int +pim_bfd_interface_dest_update (int command, struct zclient *zclient, + zebra_size_t length, vrf_id_t vrf_id) +{ + struct interface *ifp = NULL; + struct pim_interface *pim_ifp = NULL; + struct prefix p; + int status; + char msg[100]; + int old_status; + struct bfd_info *bfd_info = NULL; + struct timeval tv; + struct listnode *neigh_node = NULL; + struct listnode *neigh_nextnode = NULL; + struct pim_neighbor *neigh = NULL; + + ifp = bfd_get_peer_info (zclient->ibuf, &p, NULL, &status, vrf_id); + + if ((ifp == NULL) || (p.family != AF_INET)) + return 0; + + pim_ifp = ifp->info; + if (!pim_ifp) + return 0; + + if (!pim_ifp->bfd_info) + { + if (PIM_DEBUG_PIM_TRACE) + zlog_debug ("%s: pim interface %s BFD is disabled ", __PRETTY_FUNCTION__, + ifp->name); + return 0; + } + + if (PIM_DEBUG_PIM_TRACE) + { + char buf[PREFIX2STR_BUFFER]; + prefix2str (&p, buf, sizeof (buf)); + zlog_debug ("%s: interface %s bfd destination %s %s", + __PRETTY_FUNCTION__, ifp->name, buf, + bfd_get_status_str (status)); + } + + for (ALL_LIST_ELEMENTS (pim_ifp->pim_neighbor_list, neigh_node, + neigh_nextnode, neigh)) + { + bfd_info = (struct bfd_info *) neigh->bfd_info; + if (bfd_info->status == status) + { + if (PIM_DEBUG_PIM_TRACE) + { + char str[INET_ADDRSTRLEN]; + pim_inet4_dump ("", neigh->source_addr, str, + sizeof (str)); + zlog_debug ("%s: bfd status is same for nbr %s", + __PRETTY_FUNCTION__, str); + } + continue; + } + old_status = bfd_info->status; + bfd_info->status = status; + monotime(&tv); + bfd_info->last_update = tv.tv_sec; + + if (PIM_DEBUG_PIM_TRACE) + { + zlog_debug ("%s: status %s old_status %s", __PRETTY_FUNCTION__, + bfd_get_status_str (status), + bfd_get_status_str (old_status)); + } + if ((status == BFD_STATUS_DOWN) && (old_status == BFD_STATUS_UP)) + { + snprintf (msg, sizeof (msg), "BFD Session Expired"); + pim_neighbor_delete (ifp, neigh, msg); + } + } + return 0; +} + +/* + * pim_bfd_nbr_replay - Replay all the neighbors that have BFD enabled + * to zebra + */ +static int +pim_bfd_nbr_replay (int command, struct zclient *zclient, zebra_size_t length, + vrf_id_t vrf_id) +{ + struct interface *ifp = NULL; + struct pim_interface *pim_ifp = NULL; + struct pim_neighbor *neigh = NULL; + struct listnode *node; + struct listnode *neigh_node; + struct listnode *neigh_nextnode; + + /* Send the client registration */ + bfd_client_sendmsg (zclient, ZEBRA_BFD_CLIENT_REGISTER); + + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) + { + pim_ifp = ifp->info; + + if (!pim_ifp) + continue; + + if (pim_ifp->pim_sock_fd < 0) + continue; + + for (ALL_LIST_ELEMENTS (pim_ifp->pim_neighbor_list, neigh_node, + neigh_nextnode, neigh)) + { + if (!neigh->bfd_info) + continue; + if (PIM_DEBUG_PIM_TRACE) + { + char str[INET_ADDRSTRLEN]; + pim_inet4_dump ("", neigh->source_addr, str, + sizeof (str)); + zlog_debug ("%s: Replaying Pim Neigh %s to BFD", + __PRETTY_FUNCTION__, str); + } + pim_bfd_reg_dereg_nbr (neigh, ZEBRA_BFD_DEST_UPDATE); + + } + } + return 0; +} + +void +pim_bfd_init (void) +{ + struct zclient *zclient = NULL; + + zclient = pim_zebra_zclient_get (); + + bfd_gbl_init (); + + zclient->interface_bfd_dest_update = pim_bfd_interface_dest_update; + zclient->bfd_dest_replay = pim_bfd_nbr_replay; +} diff --git a/pimd/pim_bfd.h b/pimd/pim_bfd.h new file mode 100644 index 0000000000..23f286b86e --- /dev/null +++ b/pimd/pim_bfd.h @@ -0,0 +1,42 @@ +/* + * pim_bfd.h: PIM BFD definitions and structures + * + * Copyright (C) 2017 Cumulus Networks, Inc. + * Chirag Shah + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as 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 + */ + +#ifndef PIM_BFD_H +#define PIM_BFD_H + +#include "if.h" + +void pim_bfd_init (void); +void pim_bfd_write_config (struct vty *vty, struct interface *ifp); +void +pim_bfd_show_info (struct vty *vty, void *bfd_info, json_object * json_obj, + u_char use_json, int param_only); +void +pim_bfd_if_param_set (struct interface *ifp, u_int32_t min_rx, + u_int32_t min_tx, u_int8_t detect_mult, int defaults); +int pim_bfd_reg_dereg_all_nbr (struct interface *ifp, int command); +void +pim_bfd_trigger_event (struct pim_interface *pim_ifp, struct pim_neighbor *nbr, uint8_t nbr_up); +void +pim_bfd_info_nbr_create (struct pim_interface *pim_ifp, struct pim_neighbor *neigh); +void pim_bfd_info_free(void **bfd_info); +#endif /* _PIM_BFD_H */ diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index da07dcb4ac..60b0b9bf2e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -57,6 +57,8 @@ #include "pim_msdp.h" #include "pim_ssm.h" #include "pim_nht.h" +#include "pim_bfd.h" +#include "bfd.h" static struct cmd_node pim_global_node = { PIM_NODE, @@ -1508,6 +1510,7 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor, u_c vty_out(vty, " Hello Option - Holdtime : %s%s", option_holdtime ? "yes" : "no", VTY_NEWLINE); vty_out(vty, " Hello Option - LAN Prune Delay : %s%s", option_lan_prune_delay ? "yes" : "no", VTY_NEWLINE); vty_out(vty, " Hello Option - T-bit : %s%s", option_t_bit ? "yes" : "no", VTY_NEWLINE); + pim_bfd_show_info (vty, neigh->bfd_info, json_ifp, uj, 0); vty_out(vty, "%s", VTY_NEWLINE); } } @@ -5927,6 +5930,99 @@ DEFUN (interface_no_pim_use_source, return interface_pim_use_src_cmd_worker (vty, "0.0.0.0"); } +DEFUN (ip_pim_bfd, + ip_pim_bfd_cmd, + "ip pim bfd", + IP_STR + PIM_STR + "Enables BFD support\n") +{ + VTY_DECLVAR_CONTEXT(interface, ifp); + struct pim_interface *pim_ifp = NULL; + struct bfd_info *bfd_info = NULL; + + if (!ifp) + return CMD_SUCCESS; + pim_ifp = ifp->info; + if (!pim_ifp) + return CMD_SUCCESS; + bfd_info = pim_ifp->bfd_info; + + if (!bfd_info || !CHECK_FLAG (bfd_info->flags, BFD_FLAG_PARAM_CFG)) + pim_bfd_if_param_set (ifp, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, + BFD_DEF_DETECT_MULT, 1); + + return CMD_SUCCESS; +} + +DEFUN (no_ip_pim_bfd, + no_ip_pim_bfd_cmd, + "no ip pim bfd", + NO_STR + IP_STR + PIM_STR + "Disables BFD support\n") +{ + VTY_DECLVAR_CONTEXT(interface, ifp); + struct pim_interface *pim_ifp = NULL; + + assert (ifp); + + pim_ifp = ifp->info; + if (!pim_ifp) + return CMD_SUCCESS; + + if (pim_ifp->bfd_info) + { + pim_bfd_reg_dereg_all_nbr (ifp, ZEBRA_BFD_DEST_DEREGISTER); + bfd_info_free (&(pim_ifp->bfd_info)); + } + + return CMD_SUCCESS; +} + +DEFUN (ip_pim_bfd_param, + ip_pim_bfd_param_cmd, + "ip pim bfd (2-255) (50-60000) (50-60000)", + IP_STR + PIM_STR + "Enables BFD support\n" + "Detect Multiplier\n" + "Required min receive interval\n" + "Desired min transmit interval\n") +{ + VTY_DECLVAR_CONTEXT(interface, ifp); + int idx_number = 3; + int idx_number_2 = 4; + int idx_number_3 = 5; + u_int32_t rx_val; + u_int32_t tx_val; + u_int8_t dm_val; + int ret; + + + if ((ret = bfd_validate_param (vty, argv[idx_number]->arg, + argv[idx_number_2]->arg, + argv[idx_number_3]->arg, + &dm_val, &rx_val, &tx_val)) != CMD_SUCCESS) + return ret; + + pim_bfd_if_param_set (ifp, rx_val, tx_val, dm_val, 0); + + return CMD_SUCCESS; +} + +ALIAS (no_ip_pim_bfd, + no_ip_pim_bfd_param_cmd, + "no ip pim bfd (2-255) (50-60000) (50-60000)", + NO_STR + IP_STR + PIM_STR + "Enables BFD support\n" + "Detect Multiplier\n" + "Required min receive interval\n" + "Desired min transmit interval\n") + static int ip_msdp_peer_cmd_worker (struct vty *vty, const char *peer, const char *local) { @@ -6910,4 +7006,9 @@ void pim_cmd_init() install_element (VIEW_NODE, &show_ip_pim_group_type_cmd); install_element (INTERFACE_NODE, &interface_pim_use_source_cmd); install_element (INTERFACE_NODE, &interface_no_pim_use_source_cmd); + /* Install BFD command */ + install_element (INTERFACE_NODE, &ip_pim_bfd_cmd); + install_element (INTERFACE_NODE, &ip_pim_bfd_param_cmd); + install_element (INTERFACE_NODE, &no_ip_pim_bfd_cmd); + install_element (INTERFACE_NODE, &no_ip_pim_bfd_param_cmd); } diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h index fa623d45b4..a1c2b692f4 100644 --- a/pimd/pim_iface.h +++ b/pimd/pim_iface.h @@ -24,9 +24,12 @@ #include "if.h" #include "vty.h" +#include "vrf.h" +#include "zclient.h" #include "pim_igmp.h" #include "pim_upstream.h" +#include "bfd.h" #define PIM_IF_MASK_PIM (1 << 0) #define PIM_IF_MASK_IGMP (1 << 1) @@ -127,6 +130,7 @@ struct pim_interface { uint32_t pim_ifstat_reg_stop_send; uint32_t pim_ifstat_assert_recv; uint32_t pim_ifstat_assert_send; + struct bfd_info *bfd_info; }; extern struct interface *pim_regiface; diff --git a/pimd/pim_main.c b/pimd/pim_main.c index 19dcd3aa9a..a80059535d 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -45,6 +45,7 @@ #include "pim_zebra.h" #include "pim_msdp.h" #include "pim_iface.h" +#include "pim_bfd.h" extern struct host host; @@ -129,6 +130,7 @@ int main(int argc, char** argv, char** envp) { * Initialize zclient "update" and "lookup" sockets */ pim_zebra_init(); + pim_bfd_init (); frr_config_fork(); diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 00190bd830..dede8e198f 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -38,6 +38,7 @@ #include "pim_zebra.h" #include "pim_join.h" #include "pim_jp_agg.h" +#include "pim_bfd.h" static void dr_election_by_addr(struct interface *ifp) { @@ -379,6 +380,9 @@ static struct pim_neighbor *pim_neighbor_new(struct interface *ifp, ++pim_ifp->pim_dr_num_nondrpri_neighbors; } + //Register PIM Neighbor with BFD + pim_bfd_trigger_event (pim_ifp, neigh, 1); + return neigh; } @@ -682,6 +686,9 @@ void pim_neighbor_delete(struct interface *ifp, src_str, ifp->name); } + //De-Register PIM Neighbor with BFD + pim_bfd_trigger_event (pim_ifp, neigh, 0); + listnode_delete(pim_ifp->pim_neighbor_list, neigh); pim_neighbor_free(neigh); diff --git a/pimd/pim_neighbor.h b/pimd/pim_neighbor.h index a3d39d2622..eaaefd8fef 100644 --- a/pimd/pim_neighbor.h +++ b/pimd/pim_neighbor.h @@ -43,6 +43,7 @@ struct pim_neighbor { struct thread *jp_timer; struct list *upstream_jp_agg; + struct bfd_info *bfd_info; }; void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime); diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index 1de8adcc02..ad9e360feb 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -22,8 +22,11 @@ #include #include +#include "plist.h" #include +#include "pim_str.h" +#include "pim_ifchannel.h" #define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED (1 << 0) #define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED_UPDATED (1 << 1) diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index 9cf5c30469..f87484ad5d 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -38,6 +38,7 @@ #include "pim_rp.h" #include "pim_msdp.h" #include "pim_ssm.h" +#include "pim_bfd.h" int pim_debug_config_write (struct vty *vty) @@ -320,6 +321,8 @@ int pim_interface_config_write(struct vty *vty) } vty_out(vty, "!%s", VTY_NEWLINE); ++writes; + /* PIM BFD write */ + pim_bfd_write_config (vty, ifp); } return writes; diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 4506e8cdb5..7be4a997ba 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -29,6 +29,7 @@ #include "network.h" #include "vty.h" #include "plist.h" +#include "lib/bfd.h" #include "pimd.h" #include "pim_pim.h" @@ -624,6 +625,9 @@ void sched_rpf_cache_refresh(void) static void pim_zebra_connected (struct zclient *zclient) { + /* Send the client registration */ + bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER); + zclient_send_reg_requests (zclient, VRF_DEFAULT); } diff --git a/pimd/pimd.c b/pimd/pimd.c index 8aab5d2ef7..51a0833cd5 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -27,6 +27,7 @@ #include "plist.h" #include "hash.h" #include "jhash.h" +#include "vrf.h" #include "pimd.h" #include "pim_cmd.h" diff --git a/zebra/client_main.c b/zebra/client_main.c index cf423ad25f..c9d738bb08 100644 --- a/zebra/client_main.c +++ b/zebra/client_main.c @@ -115,6 +115,7 @@ struct zebra_info { "ospf6", ZEBRA_ROUTE_OSPF6 }, { "bgp", ZEBRA_ROUTE_BGP }, { "nhrp", ZEBRA_ROUTE_NHRP }, + { "pim", ZEBRA_ROUTE_PIM }, { NULL, 0 } }; diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index 68d2bff718..e49347638b 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -1026,7 +1026,7 @@ zebra_ptm_bfd_client_deregister (int proto) int data_len = ZEBRA_PTM_SEND_MAX_SOCKBUF; if (proto != ZEBRA_ROUTE_OSPF && proto != ZEBRA_ROUTE_BGP - && proto != ZEBRA_ROUTE_OSPF6) + && proto != ZEBRA_ROUTE_OSPF6 && proto != ZEBRA_ROUTE_PIM) return; if (IS_ZEBRA_DEBUG_EVENT) diff --git a/zebra/zebra_ptm_redistribute.c b/zebra/zebra_ptm_redistribute.c index efa29989e1..d6902142a3 100644 --- a/zebra/zebra_ptm_redistribute.c +++ b/zebra/zebra_ptm_redistribute.c @@ -78,9 +78,9 @@ zebra_interface_bfd_update (struct interface *ifp, struct prefix *dp, for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client)) { - /* Supporting for OSPF and BGP */ + /* Supporting for OSPF, BGP and PIM */ if (client->proto != ZEBRA_ROUTE_OSPF && client->proto != ZEBRA_ROUTE_BGP - && client->proto != ZEBRA_ROUTE_OSPF6) + && client->proto != ZEBRA_ROUTE_OSPF6 && client->proto != ZEBRA_ROUTE_PIM) continue; /* Notify to the protocol daemons. */ @@ -117,7 +117,8 @@ zebra_bfd_peer_replay_req (void) /* Supporting for BGP */ if ((client->proto != ZEBRA_ROUTE_BGP) && (client->proto != ZEBRA_ROUTE_OSPF) && - (client->proto != ZEBRA_ROUTE_OSPF6)) + (client->proto != ZEBRA_ROUTE_OSPF6) && + (client->proto != ZEBRA_ROUTE_PIM)) continue; /* Notify to the protocol daemons. */ From d79d90b297c5b6fde0d839988e8a07be09baba90 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 18 May 2017 11:29:28 +0200 Subject: [PATCH 121/193] bgpd: remove bgp_nexthop_afi prototype as pointed out by Renato Westphal in #536 Signed-off-by: David Lamparter --- bgpd/bgp_attr.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index e7f3e25c41..b28197cdd2 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -249,8 +249,6 @@ extern struct attr *bgp_attr_default_set (struct attr *attr, u_char); extern struct attr *bgp_attr_aggregate_intern (struct bgp *, u_char, struct aspath *, struct community *, int as_set, u_char); -extern afi_t bgp_nexthop_afi (struct peer *peer, afi_t afi, safi_t safi, - struct attr *attr); extern bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *, struct stream *, struct attr *, struct bpacket_attr_vec_arr *vecarr, From b2b6f8f33c934c87de580a1665acfe79e434b3ec Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 18 May 2017 11:41:01 +0200 Subject: [PATCH 122/193] Pre-revert nonmergeable changes Revert "ospf6d: fix decimal area ID cli" commit a27cb3cfe901d4f1378116bc91e6656aaed7c74c Revert "bgpd: add back unicast option to 'address-family vpnv(4&6)' Issue #459" commit 399598bf6b749daa15d70ad64fc885d00cde1225 Revert "Fix the memory leak" commit d8d58e98397d8442ec68f8d715b64d5e6000b903 Revert "zebra: 'no ip route 4.1.1.19 255.255.255.255 99' is ambiguous" commit 83f35619359379687f21c839d61121e4ebe72541 Revert "ospf6d: Allow unconfig of unknown lsa's" commit 5b0747d71df6006835ead8e6354f70b26f7bca80 Revert "Fix the "Dead assignment" of clang SA." commit 3a6570a1f145c49155d72a815441025085dd45ad Revert "snapcraft: Improve README.usage.md based on feedback received" commit 2a3a819a9c2b2c9700e6228e7352e53b3562776c Revert "zebra: stop deregistering static nexthops unless removing the static" commit 1dac3a9619c8436f81c7b37f0252574b0b677dd0 All of these changes do not apply on stable/3.0 due to either CLI changes or another fix already being present. Signed-off-by: David Lamparter --- bgpd/bgp_vty.c | 16 ----------- lib/csv.c | 7 ----- ospf6d/ospf6_area.c | 21 ++++++++++++-- ospf6d/ospf6_lsa.c | 26 ++--------------- ospfd/ospf_apiserver.c | 2 +- ospfd/ospf_vty.c | 9 ++++++ pimd/pim_register.c | 4 +-- snapcraft/README.usage.md | 59 ++++----------------------------------- zebra/zebra_mpls_vty.c | 4 +-- zebra/zebra_rib.c | 2 ++ 10 files changed, 42 insertions(+), 108 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 9d5a4bd1cf..eef11441d6 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -6147,13 +6147,6 @@ DEFUN (address_family_vpnv4, return CMD_SUCCESS; } -ALIAS (address_family_vpnv4, - address_family_vpnv4_unicast_cmd, - "address-family vpnv4 unicast", - "Enter Address Family command mode\n" - "Address family\n" - "Address Family modifier\n") - DEFUN (address_family_vpnv6, address_family_vpnv6_cmd, "address-family vpnv6", @@ -6164,13 +6157,6 @@ DEFUN (address_family_vpnv6, return CMD_SUCCESS; } -ALIAS (address_family_vpnv6, - address_family_vpnv6_unicast_cmd, - "address-family vpnv6 unicast", - "Enter Address Family command mode\n" - "Address family\n" - "Address Family modifier\n") - DEFUN (address_family_encap, address_family_encap_cmd, "address-family encap", @@ -15173,9 +15159,7 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_safi_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd); - install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); - install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd); install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encapv4_cmd); install_element (BGP_NODE, &address_family_encapv6_cmd); diff --git a/lib/csv.c b/lib/csv.c index 95e3e97768..7df9292647 100644 --- a/lib/csv.c +++ b/lib/csv.c @@ -177,9 +177,6 @@ csv_decode_record(csv_record_t *rec) field = strpbrk(curr, ","); } field = strstr(curr, "\n"); - if (!field) { - return; - } fld = malloc(sizeof(csv_field_t)); if (field && fld) { fld->field = curr; @@ -242,10 +239,6 @@ csv_encode (csv_t *csv, rec = malloc(sizeof(csv_record_t)); if (!rec) { log_error("record malloc failed\n"); - if (!buf) { - free(str); - } - va_end(list); return (NULL); } csv_init_record(rec); diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 1691e501f8..bbab8598b8 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -406,11 +406,26 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) } +#define OSPF6_CMD_AREA_LOOKUP(str, oa) \ +{ \ + u_int32_t area_id = 0; \ + if (inet_pton (AF_INET, str, &area_id) != 1) \ + { \ + vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ + return CMD_SUCCESS; \ + } \ + oa = ospf6_area_lookup (area_id, ospf6); \ + if (oa == NULL) \ + { \ + vty_out (vty, "No such Area: %s%s", str, VNL); \ + return CMD_SUCCESS; \ + } \ +} + #define OSPF6_CMD_AREA_GET(str, oa) \ { \ - char *ep; \ - u_int32_t area_id = htonl (strtol(str, &ep, 10)); \ - if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \ + u_int32_t area_id = 0; \ + if (inet_pton (AF_INET, str, &area_id) != 1) \ { \ vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ return CMD_SUCCESS; \ diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 867dc3d9d8..f3afd487e4 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -872,17 +872,7 @@ ALIAS (debug_ospf6_lsa_type, DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Router LSA's\n" - "Network LSA's\n" - "Inter-Prefix LSA's\n" - "Inter-Router LSA's\n" - "AS-External LSA's\n" - "Link LSA's\n" - "Intra-Prefix LSA's\n" - "Unknown LSA's\n" - "Originate\n" - "Examine\n" - "Flooding\n" + "Specify LS type as Hexadecimal\n" ) DEFUN (no_debug_ospf6_lsa_type, @@ -938,22 +928,12 @@ DEFUN (no_debug_ospf6_lsa_type, ALIAS (no_debug_ospf6_lsa_type, no_debug_ospf6_lsa_hex_detail_cmd, - "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)", + "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)", NO_STR DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Router LSA's\n" - "Network LSA's\n" - "Inter-Prefix LSA's\n" - "Inter-Router LSA's\n" - "AS-External LSA's\n" - "Link LSA's\n" - "Intra-Prefix LSA's\n" - "Unknown LSA's\n" - "Originate\n" - "Examine\n" - "Flooding\n" + "Specify LS type as Hexadecimal\n" ) void diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index 620dacb157..aac8ef4b8b 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -2459,7 +2459,7 @@ ospf_apiserver_clients_notify_nsm_change (struct ospf_neighbor *nbr) { struct msg *msg; struct in_addr ifaddr = { .s_addr = 0L }; - struct in_addr nbraddr; + struct in_addr nbraddr = { .s_addr = 0L }; assert (nbr); diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index b13c28d0c9..c65d148ff0 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -6763,6 +6763,7 @@ DEFUN (no_ip_ospf_cost, int ret; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc == 1) @@ -6831,6 +6832,7 @@ DEFUN (no_ip_ospf_cost2, int ret; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); /* According to the semantics we are mimicking "no ip ospf cost N" is @@ -7070,6 +7072,7 @@ DEFUN (no_ip_ospf_dead_interval, struct ospf_interface *oi; struct route_node *rn; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc == 2) @@ -7244,6 +7247,7 @@ DEFUN (no_ip_ospf_hello_interval, int ret; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc == 2) @@ -7521,6 +7525,7 @@ DEFUN (no_ip_ospf_priority, int ret; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc == 2) @@ -7667,6 +7672,7 @@ DEFUN (no_ip_ospf_retransmit_interval, struct ospf_if_params *params; int addr_index; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc >= 1) @@ -7738,6 +7744,7 @@ DEFUN (no_ip_ospf_retransmit_interval_sec, struct interface *ifp = vty->index; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); UNSET_IF_PARAM (params, retransmit_interval); @@ -7822,6 +7829,7 @@ DEFUN (no_ip_ospf_transmit_delay, struct ospf_if_params *params; int addr_index; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); if (argc >= 1) @@ -7894,6 +7902,7 @@ DEFUN (no_ip_ospf_transmit_delay_sec, struct interface *ifp = vty->index; struct ospf_if_params *params; + ifp = vty->index; params = IF_DEF_PARAMS (ifp); UNSET_IF_PARAM (params, transmit_delay); diff --git a/pimd/pim_register.c b/pimd/pim_register.c index 7844bd3399..ce3ac1a433 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -160,8 +160,8 @@ pim_register_recv (struct interface *ifp, int sentRegisterStop = 0; struct ip *ip_hdr; //size_t hlen; - struct in_addr group; - struct in_addr source; + struct in_addr group = { .s_addr = 0 }; + struct in_addr source = { .s_addr = 0 }; //uint8_t *msg; uint32_t *bits; diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md index c678c8805c..aaff59438a 100644 --- a/snapcraft/README.usage.md +++ b/snapcraft/README.usage.md @@ -3,7 +3,7 @@ Using the FRRouting Snap After installing the Snap, the priviledged plug need to be connected: - snap connect frr:network-control core:network-control + snap connect frr:network-control ubuntu-core:network-control Enabling/Disabling FRRouting Daemons ------------------------------------------- @@ -53,74 +53,25 @@ depend on them). These are mainly intended to debug the Snap - `frr.ldpd-debug`: Starts ldpd daemon in foreground -MPLS (LDP) ----------- -The MPLS forwarding requires a Linux Kernel version 4.5 or newer and -specific MPLS kernel modules loaded. It will be auto-detected by -FRR. You can check the detected setup with the `show mpls status` -command from within `frr.vtysh` - -The following kernel modules `mpls-router` and `mpls-iptunnel` -need to be loaded. On Ubuntu 16.04, this can be done by editing -'/etc/modules-load.d/modules.conf' and add the following lines: - - # Load MPLS Kernel Modules - mpls-router - mpls-iptunnel - -For other distributions, please check the documentation on loading -modules. You need to either reboot or use `modprobe` to manually load -the modules as well before MPLS will be available. - -In addition to this, the MPLS Label-Processing needs to be enabled -with `sysctl` on the required interfaces. Assuming the interfaces -are named `eth0`, `eth1` and `eth2`, then the additional lines in -`/etc/sysctl.conf` will enable it on a Ubuntu 16.04 system: - - # Enable MPLS Label processing on all interfaces - net.mpls.conf.eth0.input=1 - net.mpls.conf.eth1.input=1 - net.mpls.conf.eth2.input=1 - net.mpls.platform_labels=100000 - -These settings require either a reboot or a manual configuration with -`sysctl` as well. - FAQ --- - frr.vtysh displays `--MORE--` on long output. How to suppress this? - Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add `export VTYSH_PAGER=cat` to the end of your `.profile`) -- ospfd / ospf6d are not running after installation - - Installing a new snap starts the daemons, but at this time they - may not have the required priviledged access. Make sure you - issue the `snap connect` command as given above (can be verified - with `snap interfaces`) and **THEN** restart the daemons (or - reboot the system). - This is a limitation of any snap package at this time which - requires priviledged interfaces (ie to manipulate routing tables) - Sourcecode available ==================== The source for this SNAP is available as part of the FRRouting -Source Code Distribution under `GPLv2 or later` +Source Code Distribution. - + https://github.com/frrouting/frr.git -Instructions for rebuilding the snap are in `snapcraft/README.snap_build.md` - -*Please checkout the desired branch before following the instructions -as they may have changed between versions of FRR* - -Official Webpage for FRR -======================== - -Official webpage for FRR is at +Instructions for rebuilding the snap are in `README.snap_build.md` Feedback welcome ================ Please send Feedback about this snap to Martin Winter at `mwinter@opensourcerouting.org` + diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index 343f2975e8..8b967c3af8 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -472,7 +472,7 @@ DEFUN (no_ip_route_tag_distance_label, DEFUN (no_ip_route_mask_distance_label, no_ip_route_mask_distance_label_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255> label WORD", + "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>", NO_STR IP_STR "Establish static routes\n" @@ -486,7 +486,7 @@ DEFUN (no_ip_route_mask_distance_label, "One or more labels separated by '/'\n") { return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL, argv[4]); + argv[3], NULL, argv[5]); } DEFUN (no_ip_route_mask_tag_distance_label, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 23c4c9ebea..e48da0479b 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -366,6 +366,7 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, if (set) { UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); + zebra_deregister_rnh_static_nexthops(rib->vrf_id, nexthop->resolved, top); nexthops_free(nexthop->resolved); nexthop->resolved = NULL; rib->nexthop_mtu = 0; @@ -596,6 +597,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, if (set) { UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE); + zebra_deregister_rnh_static_nexthops (rib->vrf_id, nexthop->resolved, top); nexthops_free(nexthop->resolved); nexthop->resolved = NULL; } From 05220b6d5d9d3781654e3f36a2dbac076d709059 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 18 May 2017 14:05:53 +0200 Subject: [PATCH 123/193] Revert "bgpd: resolve ipv6 ecmp issue with vrfs and ll nexthop" This reverts commit fa14eb2c0b408982a6634459b3afb21e9df6326a. This was for stable/2.0 and wasn't intended to go on stable/3.0 -- my bad, missed this in the merge. Signed-off-by: David Lamparter --- bgpd/bgp_zebra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 4e00367aff..72bd081a7e 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1470,8 +1470,7 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp, if (!ifindex) { if (info->peer->conf_if || info->peer->ifname) - ifindex = ifname2ifindex_vrf (info->peer->conf_if ? info->peer->conf_if : - info->peer->ifname, bgp->vrf_id); + ifindex = if_nametoindex (info->peer->conf_if ? info->peer->conf_if : info->peer->ifname); else if (info->peer->nexthop.ifp) ifindex = info->peer->nexthop.ifp->ifindex; } From 37dc8ab5b6d39b41cd964c2a3d84a1872b7f44b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 18 May 2017 12:00:22 +0300 Subject: [PATCH 124/193] nhrpd: announce ipv6 routes to zebra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timo Teräs --- nhrpd/nhrp_route.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c index 69c55e3058..7f8cad6e92 100644 --- a/nhrpd/nhrp_route.c +++ b/nhrpd/nhrp_route.c @@ -86,7 +86,6 @@ void nhrp_route_update_nhrp(const struct prefix *p, struct interface *ifp) void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix *p, struct interface *ifp, const union sockunion *nexthop, uint32_t mtu) { - struct in_addr *nexthop_ipv4; int flags = 0; if (zclient->sock < 0) @@ -109,6 +108,7 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix SET_FLAG(flags, ZEBRA_FLAG_INTERNAL); if (p->family == AF_INET) { + struct in_addr *nexthop_ipv4; struct zapi_ipv4 api; memset(&api, 0, sizeof(api)); @@ -118,7 +118,6 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); if (nexthop) { - SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); nexthop_ipv4 = (struct in_addr *) sockunion_get_addr(nexthop); api.nexthop_num = 1; api.nexthop = &nexthop_ipv4; @@ -147,6 +146,45 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix zapi_ipv4_route( add ? ZEBRA_IPV4_ROUTE_ADD : ZEBRA_IPV4_ROUTE_DELETE, zclient, (struct prefix_ipv4 *) p, &api); + } else if (p->family == AF_INET6) { + struct in6_addr *nexthop_ipv6; + struct zapi_ipv6 api; + + memset(&api, 0, sizeof(api)); + api.flags = flags; + api.type = ZEBRA_ROUTE_NHRP; + api.safi = SAFI_UNICAST; + + SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); + if (nexthop) { + nexthop_ipv6 = (struct in6_addr *) sockunion_get_addr(nexthop); + api.nexthop_num = 1; + api.nexthop = &nexthop_ipv6; + } + if (ifp) { + SET_FLAG(api.message, ZAPI_MESSAGE_IFINDEX); + api.ifindex_num = 1; + api.ifindex = &ifp->ifindex; + } + if (mtu) { + SET_FLAG(api.message, ZAPI_MESSAGE_MTU); + api.mtu = mtu; + } + + if (unlikely(debug_flags & NHRP_DEBUG_ROUTE)) { + char buf[2][INET6_ADDRSTRLEN]; + zlog_debug("Zebra send: IPv6 route %s %s/%d nexthop %s metric %u" + " count %d dev %s", + add ? "add" : "del", + inet_ntop(AF_INET6, &p->u.prefix6, buf[0], sizeof(buf[0])), + p->prefixlen, + nexthop ? inet_ntop(AF_INET6, api.nexthop[0], buf[1], sizeof(buf[1])) : "", + api.metric, api.nexthop_num, ifp->name); + } + + zapi_ipv6_route( + add ? ZEBRA_IPV6_ROUTE_ADD : ZEBRA_IPV6_ROUTE_DELETE, + zclient, (struct prefix_ipv6 *) p, NULL, &api); } } From 0e20096f60b190f8476a65cc214520fa87e9ccc0 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 18 May 2017 14:51:56 +0200 Subject: [PATCH 125/193] zebra: fix label manager merge snafu Signed-off-by: David Lamparter --- zebra/label_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra/label_manager.c b/zebra/label_manager.c index 508ba5b923..fbe4cea467 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -178,8 +178,8 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv, vrf_id_t vrf /* make sure we listen to the response */ if (!zclient->t_read) - zclient->t_read = - thread_add_read(zclient->master, lm_zclient_read, zserv, zclient->sock); + thread_add_read(zclient->master, lm_zclient_read, zserv, + zclient->sock, &zclient->t_read); return 0; } From f1deac618b5ff78657d04f443a74799881b76e21 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 08:56:40 -0400 Subject: [PATCH 126/193] pimd: Fix indentation issue that is causing clang unhappiness The indentation of ifjoin_to_noinfo was not consistent with the rest of the function and caused clang to loose it's mind Signed-off-by: Donald Sharp --- pimd/pim_ifchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index c5953e560c..d46cc70b06 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -643,7 +643,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) ch_del is set to 0 for not deleteing from here. Holdtime expiry (ch_del set to 1) delete the entry. */ - ifjoin_to_noinfo(ch, false); + ifjoin_to_noinfo(ch, false); } else ifjoin_to_noinfo(ch, true); From 69b174d4ec7d347054761d4ddcddba096c9c4ece Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 08:56:40 -0400 Subject: [PATCH 127/193] pimd: Fix indentation issue that is causing clang unhappiness The indentation of ifjoin_to_noinfo was not consistent with the rest of the function and caused clang to loose it's mind Signed-off-by: Donald Sharp --- pimd/pim_ifchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 735df82581..d7df0735a7 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -642,7 +642,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t) ch_del is set to 0 for not deleteing from here. Holdtime expiry (ch_del set to 1) delete the entry. */ - ifjoin_to_noinfo(ch, false); + ifjoin_to_noinfo(ch, false); } else ifjoin_to_noinfo(ch, true); From 25c58d6d2bbec1de1ab21d76f8bd2cd6cd65df0b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 09:44:09 -0400 Subject: [PATCH 128/193] pimd: Address PR Comments Remove a bit more dead code and unused variable. Signed-off-by: Donald Sharp --- pimd/pim_ssmpingd.c | 3 --- pimd/pim_upstream.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index c907d66d5a..dd92ff1b28 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -310,13 +310,10 @@ static int ssmpingd_read_msg(struct ssmpingd_sock *ss) static int ssmpingd_sock_read(struct thread *t) { struct ssmpingd_sock *ss; - int sock_fd; int result; ss = THREAD_ARG(t); - sock_fd = THREAD_FD(t); - result = ssmpingd_read_msg(ss); /* Keep reading */ diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 49c0ad3fd9..d06703ccb3 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1377,8 +1377,7 @@ pim_upstream_start_register_stop_timer (struct pim_upstream *up, int null_regist { uint32_t time; - if (up->t_rs_timer) - THREAD_TIMER_OFF (up->t_rs_timer); + THREAD_TIMER_OFF (up->t_rs_timer); if (!null_register) { From eefe02daa1818258c5b28a1cc7d2e7490cf25024 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 11:03:21 -0400 Subject: [PATCH 129/193] ospf6d: Make 'show zebra' 'show ipv6 ospf6 zebra' The 'show zebra' command really shouldn't be owned by ospf6. This command is a specialized command to show some basic information about ospf6 and zebra so limit it to ospf6. Signed-off-by: Donald Sharp --- doc/ospf6d.texi | 4 ++++ ospf6d/ospf6_zebra.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/ospf6d.texi b/doc/ospf6d.texi index 31f4db0ccc..3ea71fbd20 100644 --- a/doc/ospf6d.texi +++ b/doc/ospf6d.texi @@ -151,6 +151,10 @@ Shows requestlist of neighbor. This command shows internal routing table. @end deffn +@deffn {Command} {show ipv6 ospf6 zebra} {} +Shows state about what is being redistributed between zebra and OSPF6 +@end deffn + @node OSPF6 Configuration Examples @section OSPF6 Configuration Examples diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index fdf2f299cb..305870a64f 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -304,13 +304,12 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient, return 0; } - - - DEFUN (show_zebra, - show_zebra_cmd, - "show zebra", + show_ospf6_zebra_cmd, + "show ipv6 ospf6 zebra", SHOW_STR + IPV6_STR + OSPF6_STR "Zebra information\n") { int i; @@ -836,7 +835,7 @@ ospf6_zebra_init (struct thread_master *master) install_node (&zebra_node, config_write_ospf6_zebra); /* Install command element for zebra node. */ - install_element (VIEW_NODE, &show_zebra_cmd); + install_element (VIEW_NODE, &show_ospf6_zebra_cmd); install_default (ZEBRA_NODE); install_element (ZEBRA_NODE, &redistribute_ospf6_cmd); install_element (ZEBRA_NODE, &no_redistribute_ospf6_cmd); From 57282a31cfcd7c96e8867dbb4eaaf565c5bc7394 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 13:13:32 -0400 Subject: [PATCH 130/193] zebra: Add code to track kernel interactions Allow zebra to track kernel interactions. Signed-off-by: Donald Sharp --- zebra/interface.c | 2 ++ zebra/zebra_mpls.c | 16 +++++++++++++--- zebra/zebra_rib.c | 4 ++++ zebra/zebra_vrf.h | 7 +++++++ zebra/zserv.c | 23 +++++++++++++++++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/zebra/interface.c b/zebra/interface.c index 7b0d31338d..c60cb8dcbc 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -774,6 +774,7 @@ if_nbr_ipv6ll_to_ipv4ll_neigh_update (struct interface *ifp, struct in6_addr *address, int add) { + struct zebra_vrf *zvrf = vrf_info_lookup(ifp->vrf_id); char buf[16] = "169.254.0.1"; struct in_addr ipv4_ll; char mac[6]; @@ -782,6 +783,7 @@ if_nbr_ipv6ll_to_ipv4ll_neigh_update (struct interface *ifp, ipv6_ll_address_to_mac(address, (u_char *)mac); kernel_neigh_update (add, ifp->ifindex, ipv4_ll.s_addr, mac, 6); + zvrf->neigh_updates++; } static void diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index d7589fda73..b547c62566 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -927,6 +927,7 @@ lsp_process (struct work_queue *wq, void *data) zebra_lsp_t *lsp; zebra_nhlfe_t *oldbest, *newbest; char buf[BUFSIZ], buf2[BUFSIZ]; + struct zebra_vrf *zvrf = vrf_info_lookup (VRF_DEFAULT); lsp = (zebra_lsp_t *)data; if (!lsp) // unexpected @@ -955,15 +956,24 @@ lsp_process (struct work_queue *wq, void *data) { /* Not already installed */ if (newbest) - kernel_add_lsp (lsp); + { + kernel_add_lsp (lsp); + zvrf->lsp_installs++; + } } else { /* Installed, may need an update and/or delete. */ if (!newbest) - kernel_del_lsp (lsp); + { + kernel_del_lsp (lsp); + zvrf->lsp_removals++; + } else if (CHECK_FLAG (lsp->flags, LSP_FLAG_CHANGED)) - kernel_upd_lsp (lsp); + { + kernel_upd_lsp (lsp); + zvrf->lsp_installs++; + } } return WQ_SUCCESS; diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 12ee9961d5..5f457a6fc5 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1114,6 +1114,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old) rib_table_info_t *info = srcdest_rnode_table_info(rn); int recursing; struct prefix *p, *src_p; + struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id); srcdest_rnode_prefixes (rn, &p, &src_p); @@ -1130,6 +1131,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old) */ hook_call(rib_update, rn, "installing in kernel"); ret = kernel_route_rib (p, src_p, old, rib); + zvrf->installs++; /* If install succeeds, update FIB flag for nexthops. */ if (!ret) @@ -1158,6 +1160,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib) rib_table_info_t *info = srcdest_rnode_table_info(rn); int recursing; struct prefix *p, *src_p; + struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id); srcdest_rnode_prefixes (rn, &p, &src_p); @@ -1174,6 +1177,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib) */ hook_call(rib_update, rn, "uninstalling from kernel"); ret = kernel_route_rib (p, src_p, rib, NULL); + zvrf->removals++; for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing)) UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB); diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h index df25fad947..790e2e53d2 100644 --- a/zebra/zebra_vrf.h +++ b/zebra/zebra_vrf.h @@ -94,6 +94,13 @@ struct zebra_vrf /* MPLS processing flags */ u_int16_t mpls_flags; #define MPLS_FLAG_SCHEDULE_LSPS (1 << 0) + + /* Route Installs */ + uint64_t installs; + uint64_t removals; + uint64_t neigh_updates; + uint64_t lsp_installs; + uint64_t lsp_removals; }; static inline vrf_id_t diff --git a/zebra/zserv.c b/zebra/zserv.c index 76c0756ada..0a33b166cd 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2817,6 +2817,28 @@ DEFUN (no_ip_forwarding, return CMD_SUCCESS; } +DEFUN (show_zebra, + show_zebra_cmd, + "show zebra", + SHOW_STR + "Zebra information\n") +{ + struct vrf *vrf; + + vty_out (vty, " Route Route Neighbor LSP LSP%s", VTY_NEWLINE); + vty_out (vty, "VRF Installs Removals Updates Installs Removals%s", VTY_NEWLINE); + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) + { + struct zebra_vrf *zvrf = vrf->info; + vty_out (vty,"%-25s %10ld %10ld %10ld %10ld %10ld%s", + vrf->name, zvrf->installs, zvrf->removals, + zvrf->neigh_updates, zvrf->lsp_installs, zvrf->lsp_removals, + VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + /* This command is for debugging purpose. */ DEFUN (show_zebra_client, show_zebra_client_cmd, @@ -3005,6 +3027,7 @@ zebra_init (void) install_element (VIEW_NODE, &show_ip_forwarding_cmd); install_element (CONFIG_NODE, &ip_forwarding_cmd); install_element (CONFIG_NODE, &no_ip_forwarding_cmd); + install_element (ENABLE_NODE, &show_zebra_cmd); install_element (ENABLE_NODE, &show_zebra_client_cmd); install_element (ENABLE_NODE, &show_zebra_client_summary_cmd); From cd6a565d4cca2d818e865d7f4ef977560d026b66 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 13:16:58 -0400 Subject: [PATCH 131/193] doc: Add some documentation for 'show zebra' Signed-off-by: Donald Sharp --- doc/main.texi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/main.texi b/doc/main.texi index 706baa25f7..265d6295ef 100644 --- a/doc/main.texi +++ b/doc/main.texi @@ -498,6 +498,11 @@ If so, the box can't work as a router. Display whether the host's IP v6 forwarding is enabled or not. @end deffn +@deffn Command {show zebra} {} +Display various statistics related to the installation and deletion +of routes, neighbor updates, and LSP's into the kernel. +@end deffn + @deffn Command {show zebra fpm stats} {} Display statistics related to the zebra code that interacts with the optional Forwarding Plane Manager (FPM) component. From b85120bcb3af24cc35b97cf1fe0a96e54f3cbb6e Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 8 May 2017 03:06:07 +0200 Subject: [PATCH 132/193] lib: detangle protocol name/instance from logging Signed-off-by: David Lamparter --- lib/filter.c | 3 ++- lib/libfrr.c | 10 ++++++++++ lib/libfrr.h | 3 +++ lib/log.c | 6 ------ lib/log.h | 2 -- lib/plist.c | 3 ++- lib/routemap.c | 17 ++++------------- lib/vty.c | 3 ++- 8 files changed, 23 insertions(+), 24 deletions(-) diff --git a/lib/filter.c b/lib/filter.c index 93aac31b4f..01301de4b9 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -28,6 +28,7 @@ #include "buffer.h" #include "log.h" #include "routemap.h" +#include "libfrr.h" DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List") DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str") @@ -1696,7 +1697,7 @@ filter_show (struct vty *vty, const char *name, afi_t afi) return 0; /* Print the name of the protocol */ - vty_out(vty, "%s:%s", zlog_protoname(), VTY_NEWLINE); + vty_out(vty, "%s:%s", frr_protoname, VTY_NEWLINE); for (access = master->num.head; access; access = access->next) { diff --git a/lib/libfrr.c b/lib/libfrr.c index 16681fe578..ff4160a243 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -36,6 +36,9 @@ const char frr_sysconfdir[] = SYSCONFDIR; const char frr_vtydir[] = DAEMON_VTY_DIR; const char frr_moduledir[] = MODULE_PATH; +char frr_protoname[] = "NONE"; +char frr_protonameinst[] = "NONE"; + char config_default[256]; static char pidfile_default[256]; static char vtypath_default[256]; @@ -164,6 +167,9 @@ void frr_preinit(struct frr_daemon_info *daemon, int argc, char **argv) frr_sysconfdir, di->name); snprintf(pidfile_default, sizeof(pidfile_default), "%s/%s.pid", frr_vtydir, di->name); + + strlcpy(frr_protoname, di->logname, sizeof(frr_protoname)); + strlcpy(frr_protonameinst, di->logname, sizeof(frr_protonameinst)); } void frr_opt_add(const char *optstr, const struct option *longopts, @@ -337,6 +343,10 @@ struct thread_master *frr_init(void) srandom(time(NULL)); + if (di->instance) + snprintf(frr_protonameinst, sizeof(frr_protonameinst), + "%s[%u]", di->logname, di->instance); + openzlog (di->progname, di->logname, di->instance, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); #if defined(HAVE_CUMULUS) diff --git a/lib/libfrr.h b/lib/libfrr.h index 6bd92d8bea..832ff4486e 100644 --- a/lib/libfrr.h +++ b/lib/libfrr.h @@ -110,4 +110,7 @@ extern const char frr_sysconfdir[]; extern const char frr_vtydir[]; extern const char frr_moduledir[]; +extern char frr_protoname[]; +extern char frr_protonameinst[]; + #endif /* _ZEBRA_FRR_H */ diff --git a/lib/log.c b/lib/log.c index 111b98758d..219b384c4d 100644 --- a/lib/log.c +++ b/lib/log.c @@ -763,12 +763,6 @@ closezlog (void) zlog_default = NULL; } -const char * -zlog_protoname (void) -{ - return zlog_default ? zlog_default->protoname : "NONE"; -} - /* Called from command.c. */ void zlog_set_level (zlog_dest_t dest, int log_level) diff --git a/lib/log.h b/lib/log.h index f6c94ba604..a45486275c 100644 --- a/lib/log.h +++ b/lib/log.h @@ -69,8 +69,6 @@ extern void openzlog (const char *progname, const char *protoname, /* Close zlog function. */ extern void closezlog (void); -extern const char *zlog_protoname (void); - /* GCC have printf type attribute check. */ #ifdef __GNUC__ #define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) diff --git a/lib/plist.c b/lib/plist.c index 8091429e31..d9bdeab6b6 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -29,6 +29,7 @@ #include "log.h" #include "routemap.h" #include "lib/json.h" +#include "libfrr.h" #include "plist_int.h" @@ -1174,7 +1175,7 @@ vty_show_prefix_entry (struct vty *vty, afi_t afi, struct prefix_list *plist, struct prefix_list_entry *pentry; /* Print the name of the protocol */ - vty_out(vty, "%s: ", zlog_protoname()); + vty_out(vty, "%s: ", frr_protoname); if (dtype == normal_display) { diff --git a/lib/routemap.c b/lib/routemap.c index 44b3c2bf9f..ed79beb1e7 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -28,8 +28,8 @@ #include "routemap.h" #include "command.h" #include "log.h" -#include "log_int.h" #include "hash.h" +#include "libfrr.h" DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map") DEFINE_MTYPE( LIB, ROUTE_MAP_NAME, "Route map name") @@ -989,14 +989,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map) struct route_map_index *index; struct route_map_rule *rule; - /* Print the name of the protocol */ - if (zlog_default) - { - vty_out (vty, "%s", zlog_protoname()); - if (zlog_default->instance) - vty_out (vty, " %d", zlog_default->instance); - } - vty_out (vty, ":%s", VTY_NEWLINE); + vty_out (vty, "%s:%s", frr_protonameinst, VTY_NEWLINE); for (index = map->head; index; index = index->next) { @@ -1052,10 +1045,8 @@ vty_show_route_map (struct vty *vty, const char *name) } else { - vty_out (vty, "%s", zlog_protoname()); - if (zlog_default && zlog_default->instance) - vty_out (vty, " %d", zlog_default->instance); - vty_out (vty, ": 'route-map %s' not found%s", name, VTY_NEWLINE); + vty_out (vty, "%s: 'route-map %s' not found%s", frr_protonameinst, + name, VTY_NEWLINE); return CMD_SUCCESS; } } diff --git a/lib/vty.c b/lib/vty.c index 51e56fc1ae..e27f8d74ba 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -34,6 +34,7 @@ #include "vty.h" #include "privs.h" #include "network.h" +#include "libfrr.h" #include #include @@ -456,7 +457,7 @@ vty_command (struct vty *vty, char *buf) ret = cmd_execute_command (vline, vty, NULL, 0); /* Get the name of the protocol if any */ - protocolname = zlog_protoname(); + protocolname = frr_protoname; #ifdef CONSUMED_TIME_CHECK GETRUSAGE(&after); From 297c8f6a31979637c43227902a8b71f87088e46b Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 8 May 2017 06:07:52 +0200 Subject: [PATCH 133/193] lib: qobj: MT-guard with rwlock Make qobj_* calls MT-Safe/LF-Blocking. Signed-off-by: David Lamparter --- lib/qobj.c | 38 ++++++++++++++++++++++++++++++++------ lib/qobj.h | 13 ++++++++++++- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/lib/qobj.c b/lib/qobj.c index fd7b4c8c5b..4cf7fbca7b 100644 --- a/lib/qobj.c +++ b/lib/qobj.c @@ -26,6 +26,7 @@ #include "log.h" #include "qobj.h" +static pthread_rwlock_t nodes_lock; static struct hash *nodes = NULL; static unsigned int qobj_key (void *data) @@ -43,37 +44,61 @@ static int qobj_cmp (const void *a, const void *b) void qobj_reg(struct qobj_node *node, struct qobj_nodetype *type) { node->type = type; + pthread_rwlock_wrlock (&nodes_lock); do { node->nid = (uint64_t)random(); node->nid ^= (uint64_t)random() << 32; } while (!node->nid || hash_get (nodes, node, hash_alloc_intern) != node); + pthread_rwlock_unlock (&nodes_lock); } void qobj_unreg(struct qobj_node *node) { + pthread_rwlock_wrlock (&nodes_lock); hash_release (nodes, node); + pthread_rwlock_unlock (&nodes_lock); } struct qobj_node *qobj_get(uint64_t id) { - struct qobj_node dummy = { .nid = id }; - return hash_lookup (nodes, &dummy); + struct qobj_node dummy = { .nid = id }, *rv; + pthread_rwlock_rdlock (&nodes_lock); + rv = hash_lookup (nodes, &dummy); + pthread_rwlock_unlock (&nodes_lock); + return rv; } void *qobj_get_typed(uint64_t id, struct qobj_nodetype *type) { - struct qobj_node *node = qobj_get(id); + struct qobj_node dummy = { .nid = id }; + struct qobj_node *node; + void *rv; + + pthread_rwlock_rdlock (&nodes_lock); + node = hash_lookup (nodes, &dummy); + + /* note: we explicitly hold the lock until after we have checked the type. + * if the caller holds a lock that for example prevents the deletion of + * route-maps, we can still race against a delete of something that isn't + * a route-map. */ if (!node || node->type != type) - return NULL; - return (char *)node - node->type->node_member_offset; + rv = NULL; + else + rv = (char *)node - node->type->node_member_offset; + + pthread_rwlock_unlock (&nodes_lock); + return rv; } void qobj_init (void) { if (!nodes) - nodes = hash_create (qobj_key, qobj_cmp); + { + pthread_rwlock_init (&nodes_lock, NULL); + nodes = hash_create (qobj_key, qobj_cmp); + } } void qobj_finish (void) @@ -81,4 +106,5 @@ void qobj_finish (void) hash_clean (nodes, NULL); hash_free (nodes); nodes = NULL; + pthread_rwlock_destroy (&nodes_lock); } diff --git a/lib/qobj.h b/lib/qobj.h index 64a6774bff..c24bed4f6a 100644 --- a/lib/qobj.h +++ b/lib/qobj.h @@ -81,7 +81,18 @@ struct qobj_node { #define QOBJ_UNREG(n) \ qobj_unreg(&n->qobj_node) -/* internals - should not be directly used without a good reason*/ +/* internals - should not be directly used without a good reason + * + * note: qobj_get is essentially never safe to use in MT context because + * the object could be deleted by another thread -- and worse, it could be + * of the "wrong" type and deleted. + * + * with qobj_get_typed, the type check is done under lock, which means that + * it can be used as long as another lock prevents the deletion of objects + * of the expected type. + * + * in the long this may need another touch, e.g. built-in per-object locking. + */ void qobj_reg(struct qobj_node *node, struct qobj_nodetype *type); void qobj_unreg(struct qobj_node *node); struct qobj_node *qobj_get(uint64_t id); From 5662e2c91cd46ae1642eb939d3e20abe49c48466 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 17 May 2017 19:19:56 +0200 Subject: [PATCH 134/193] lib: fix __attribute__ typo __attribute breaks pycparser Signed-off-by: David Lamparter --- lib/prefix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prefix.h b/lib/prefix.h index 09cb0cab87..35dfddd9d3 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -179,7 +179,7 @@ struct prefix_sg { u_char family; u_char prefixlen; - struct in_addr src __attribute ((aligned (8))); + struct in_addr src __attribute__ ((aligned (8))); struct in_addr grp; }; From 16156c1018e9b8030d0adc13234a29902b940e2d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 17 May 2017 21:34:01 +0200 Subject: [PATCH 135/193] ldpd: use frr_init() Without this, modules aren't loaded. Signed-off-by: David Lamparter --- ldpd/ldpd.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 710dcd15f4..61e8e8268c 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -277,9 +277,9 @@ main(int argc, char *argv[]) exit(1); } - openzlog(ldpd_di.progname, "LDP", 0, - LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON); - + if (lflag || eflag) + openzlog(ldpd_di.progname, "LDP", 0, + LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON); if (lflag) lde(); else if (eflag) @@ -316,19 +316,9 @@ main(int argc, char *argv[]) ldpe_pid = start_child(PROC_LDP_ENGINE, saved_argv0, pipe_parent2ldpe[1], pipe_parent2ldpe_sync[1]); - /* drop privileges */ - zprivs_init(&ldpd_privs); + master = frr_init(); - /* setup signal handler */ - signal_init(master, array_size(ldp_signals), ldp_signals); - - /* thread master */ - master = thread_master_create(); - - /* library inits */ - cmd_init(1); vty_config_lockless(); - vty_init(master); vrf_init(NULL, NULL, NULL, NULL); access_list_init(); ldp_vty_init(); From fb1d2a2d97da848b8c1198fcca7d9131fefeeb20 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 18 May 2017 08:56:26 -0400 Subject: [PATCH 136/193] bgpd: cleanup vpn label config, set BoS, use 'label' in place of 'tag' Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 14 ++++-------- bgpd/bgp_mplsvpn.c | 57 +++++++++++++++++++++++++--------------------- bgpd/bgp_route.c | 31 +++++++++++++------------ 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 01df053952..060f5afb4c 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -208,25 +208,22 @@ bgp_nlri_parse_encap( /* For testing purpose, static route of ENCAP. */ DEFUN (encap_network, encap_network_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD", + "network A.B.C.D/M rd ASN:nn_or_IP-address:nn", "Specify a network to announce via BGP\n" "IPv4 prefix\n" "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n" - "BGP tag\n" - "tag value\n") + "ENCAP Route Distinguisher\n") { int idx_ipv4 = 1; int idx_rd = 3; - int idx_word = 5; - return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, + return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, NULL, 0, NULL, NULL, NULL, NULL); } /* For testing purpose, static route of ENCAP. */ DEFUN (no_encap_network, no_encap_network_cmd, - "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD", + "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn", NO_STR "Specify a network to announce via BGP\n" "IPv4 prefix\n" @@ -237,8 +234,7 @@ DEFUN (no_encap_network, { int idx_ipv4 = 2; int idx_rd = 4; - int idx_word = 6; - return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, argv[idx_word]->arg, + return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); } diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 60a48f506b..4a8bfed8bb 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -460,99 +460,104 @@ prefix_rd2str (struct prefix_rd *prd, char *buf, size_t size) /* For testing purpose, static route of MPLS-VPN. */ DEFUN (vpnv4_network, vpnv4_network_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD", + "network A.B.C.D/M rd ASN:nn_or_IP-address:nn (0-1048575)", "Specify a network to announce via BGP\n" "IPv4 prefix\n" "Specify Route Distinguisher\n" "VPN Route Distinguisher\n" - "BGP tag\n" - "tag value\n") + "VPN NLRI label (tag)\n" + "VPN NLRI label (tag)\n" + "Label value\n") { int idx_ipv4_prefixlen = 1; int idx_ext_community = 3; - int idx_word = 5; + int idx_label = 5; return bgp_static_set_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, - argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); + argv[idx_label]->arg, NULL, 0, NULL, NULL, NULL, NULL); } DEFUN (vpnv4_network_route_map, vpnv4_network_route_map_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD route-map WORD", + "network A.B.C.D/M rd ASN:nn_or_IP-address:nn (0-1048575) route-map WORD", "Specify a network to announce via BGP\n" "IPv4 prefix\n" "Specify Route Distinguisher\n" "VPN Route Distinguisher\n" - "BGP tag\n" - "tag value\n" + "VPN NLRI label (tag)\n" + "VPN NLRI label (tag)\n" + "Label value\n" "route map\n" "route map name\n") { int idx_ipv4_prefixlen = 1; int idx_ext_community = 3; - int idx_word = 5; + int idx_label = 5; int idx_word_2 = 7; - return bgp_static_set_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, + return bgp_static_set_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, argv[idx_ext_community]->arg, argv[idx_label]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); } /* For testing purpose, static route of MPLS-VPN. */ DEFUN (no_vpnv4_network, no_vpnv4_network_cmd, - "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD", + "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn (0-1048575)", NO_STR "Specify a network to announce via BGP\n" "IPv4 prefix\n" "Specify Route Distinguisher\n" "VPN Route Distinguisher\n" - "BGP tag\n" - "tag value\n") + "VPN NLRI label (tag)\n" + "VPN NLRI label (tag)\n" + "Label value\n") { int idx_ipv4_prefixlen = 2; int idx_ext_community = 4; - int idx_word = 6; + int idx_label = 6; return bgp_static_unset_safi (AFI_IP, SAFI_MPLS_VPN, vty, argv[idx_ipv4_prefixlen]->arg, - argv[idx_ext_community]->arg, argv[idx_word]->arg, + argv[idx_ext_community]->arg, argv[idx_label]->arg, 0, NULL, NULL, NULL); } DEFUN (vpnv6_network, vpnv6_network_cmd, - "network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD [route-map WORD]", + "network X:X::X:X/M rd ASN:nn_or_IP-address:nn (0-1048575) [route-map WORD]", "Specify a network to announce via BGP\n" "IPv6 prefix /, e.g., 3ffe::/16\n" "Specify Route Distinguisher\n" "VPN Route Distinguisher\n" - "BGP tag\n" - "tag value\n" + "VPN NLRI label (tag)\n" + "VPN NLRI label (tag)\n" + "Label value\n" "route map\n" "route map name\n") { int idx_ipv6_prefix = 1; int idx_ext_community = 3; - int idx_word = 5; + int idx_label = 5; int idx_word_2 = 7; if (argc == 8) - return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); + return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_label]->arg, argv[idx_word_2]->arg, 0, NULL, NULL, NULL, NULL); else - return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL, 0, NULL, NULL, NULL, NULL); + return bgp_static_set_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_label]->arg, NULL, 0, NULL, NULL, NULL, NULL); } /* For testing purpose, static route of MPLS-VPN. */ DEFUN (no_vpnv6_network, no_vpnv6_network_cmd, - "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD", + "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn (0-1048575)", NO_STR "Specify a network to announce via BGP\n" "IPv6 prefix /, e.g., 3ffe::/16\n" "Specify Route Distinguisher\n" "VPN Route Distinguisher\n" - "BGP tag\n" - "tag value\n") + "VPN NLRI label (tag)\n" + "VPN NLRI label (tag)\n" + "Label value\n") { int idx_ipv6_prefix = 2; int idx_ext_community = 4; - int idx_word = 6; - return bgp_static_unset_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, 0, NULL, NULL, NULL); + int idx_label = 6; + return bgp_static_unset_safi (AFI_IP6, SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_label]->arg, 0, NULL, NULL, NULL); } int diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index cb4d88859e..3cdc3b0034 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4454,7 +4454,7 @@ bgp_purge_static_redist_routes (struct bgp *bgp) */ int bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str, - const char *rd_str, const char *tag_str, + const char *rd_str, const char *label_str, const char *rmap_str, int evpn_type, const char *esi, const char *gwip, const char *ethtag, const char *routermac) { @@ -4491,18 +4491,15 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str return CMD_WARNING; } - if (tag_str) + if (label_str) { - ret = str2tag (tag_str, tag); - if (! ret) - { - vty_out (vty, "%% Malformed tag%s", VTY_NEWLINE); - return CMD_WARNING; - } + unsigned long label_val; + VTY_GET_INTEGER_RANGE("Label/tag", label_val, label_str, 0, 16777215); + encode_label (label_val, tag); } else { - encode_label (0, tag); + memset (tag, 0, sizeof(tag)); /* empty, not even BoS */ } if (safi == SAFI_EVPN) { @@ -4594,7 +4591,7 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str /* Configure static BGP network. */ int bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_str, - const char *rd_str, const char *tag_str, + const char *rd_str, const char *label_str, int evpn_type, const char *esi, const char *gwip, const char *ethtag) { VTY_DECLVAR_CONTEXT(bgp, bgp); @@ -4628,11 +4625,15 @@ bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_st return CMD_WARNING; } - ret = str2tag (tag_str, tag); - if (! ret) + if (label_str) { - vty_out (vty, "%% Malformed tag%s", VTY_NEWLINE); - return CMD_WARNING; + unsigned long label_val; + VTY_GET_INTEGER_RANGE("Label/tag", label_val, label_str, 0, MPLS_LABEL_MAX); + encode_label (label_val, tag); + } + else + { + memset (tag, 0, sizeof(tag)); /* empty, not even BoS */ } prn = bgp_node_get (bgp->route[afi][safi], @@ -10433,7 +10434,7 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp, prefix_rd2str (prd, rdbuf, RD_ADDRSTRLEN); label = decode_label (bgp_static->tag); - vty_out (vty, " network %s/%d rd %s tag %d", + vty_out (vty, " network %s/%d rd %s label %d", inet_ntop (p->family, &p->u.prefix, buf, SU_ADDRSTRLEN), p->prefixlen, rdbuf, label); From 2f98bf47700a9c91eb26bc1a5c963d30378aa65b Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 18 May 2017 09:06:47 -0400 Subject: [PATCH 137/193] bgpd: repalce direct calls to system memory functions Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 3cdc3b0034..737c931152 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4559,8 +4559,8 @@ bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str if (rmap_str) { if (bgp_static->rmap.name) - free (bgp_static->rmap.name); - bgp_static->rmap.name = strdup (rmap_str); + XFREE(MTYPE_ROUTE_MAP_NAME, bgp_static->rmap.name); + bgp_static->rmap.name = XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap_str); bgp_static->rmap.map = route_map_lookup_by_name (rmap_str); } From f4c6f62db816c6cca98f6602e5bc69aa577fc49a Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 18 May 2017 09:45:48 -0400 Subject: [PATCH 138/193] bgp: don't put empty encap or vnc attributes on the wire Signed-off-by: Lou Berger --- bgpd/bgp_attr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 61dcbd1b29..5fe8ebb67f 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2918,7 +2918,8 @@ bgp_packet_mpattr_tea( case BGP_ATTR_ENCAP: attrname = "Tunnel Encap"; subtlvs = attr->extra->encap_subtlvs; - + if (subtlvs == NULL) /* nothing to do */ + return; /* * The tunnel encap attr has an "outer" tlv. * T = tunneltype, @@ -2933,6 +2934,8 @@ bgp_packet_mpattr_tea( case BGP_ATTR_VNC: attrname = "VNC"; subtlvs = attr->extra->vnc_subtlvs; + if (subtlvs == NULL) /* nothing to do */ + return; attrlenfield = 0; /* no outer T + L */ attrhdrlen = 2 + 2; /* subTLV T + L */ break; From 605669958596804746aa6f396d2373ab67969f55 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 18 May 2017 17:53:06 -0400 Subject: [PATCH 139/193] bgpd: fix ipv4|6 vpn|encap with route-map show config Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 737c931152..3cfb118828 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10438,6 +10438,13 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp, inet_ntop (p->family, &p->u.prefix, buf, SU_ADDRSTRLEN), p->prefixlen, rdbuf, label); + if (bgp_static->rmap.name) + vty_out (vty, " route-map %s", bgp_static->rmap.name); + else + { + if (bgp_static->backdoor) + vty_out (vty, " backdoor"); + } vty_out (vty, "%s", VTY_NEWLINE); } return 0; From 53c438dae2b9e9a2303086ec3be9de0565ef4ce6 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 18 May 2017 23:06:12 -0400 Subject: [PATCH 140/193] pimd: Fix crash from cli missinterpertation Signed-off-by: Donald Sharp --- pimd/pim_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index d5dbe4f7ab..5a55e58992 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -6205,7 +6205,7 @@ DEFUN (show_ip_msdp_peer_detail, if (uj) argc--; - if (argc == 4) + if (argc > 4) ip_msdp_show_peers_detail(vty, argv[4]->arg, uj); else ip_msdp_show_peers(vty, uj); From 896868a63ea796e507498917686a07099d4353a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 19 May 2017 14:08:35 +0300 Subject: [PATCH 141/193] nhrpd: configure mgre ipv6 nd for nhrp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timo Teräs Signed-off-by: David Lamparter --- nhrpd/linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nhrpd/linux.c b/nhrpd/linux.c index 1e9c69eb86..75a16eab37 100644 --- a/nhrpd/linux.c +++ b/nhrpd/linux.c @@ -138,16 +138,16 @@ static int linux_icmp_redirect_off(const char *iface) int os_configure_dmvpn(unsigned int ifindex, const char *ifname, int af) { - int ret = -1; + int ret = 0; switch (af) { case AF_INET: - ret = linux_icmp_redirect_off("all"); + ret |= linux_icmp_redirect_off("all"); ret |= linux_icmp_redirect_off(ifname); - ret |= netlink_configure_arp(ifindex, AF_INET); - ret |= linux_configure_arp(ifname, 1); break; } + ret |= linux_configure_arp(ifname, 1); + ret |= netlink_configure_arp(ifindex, af); return ret; } From 6a1d7e82ae07035ee95e7406a5db1a7bca30ed21 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Fri, 19 May 2017 07:56:13 -0400 Subject: [PATCH 142/193] bgpd: set NH len for ipv4 vpn|encap statics Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 3cfb118828..5c157b9539 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4008,7 +4008,7 @@ bgp_static_update_safi (struct bgp *bgp, struct prefix *p, if ((safi == SAFI_EVPN) || (safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP)) { - if (bgp_static->igpnexthop.s_addr) + if (afi == AFI_IP) { bgp_attr_extra_get (&attr)->mp_nexthop_global_in = bgp_static->igpnexthop; bgp_attr_extra_get (&attr)->mp_nexthop_len = IPV4_MAX_BYTELEN; From dfe56adf912fee5c09ca87c629823a9c8650589e Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 10:48:16 -0300 Subject: [PATCH 143/193] bgpd: add missing white space in debug message Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 172ef2e913..e9f6cba127 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2839,7 +2839,7 @@ bgp_update (struct peer *peer, struct prefix *p, u_int32_t addpath_id, peer->rcvd_attr_printed = 1; } - zlog_debug ("%s rcvd %s%s ", peer->host, + zlog_debug ("%s rcvd %s %s ", peer->host, bgp_debug_rdpfxpath2str (prd, p, addpath_id ? 1 : 0, addpath_id, pfx_buf, sizeof (pfx_buf)), label_buf); } From d81e2370014b3b0fbf93d4c298aa639c3c635914 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 10:49:24 -0300 Subject: [PATCH 144/193] bgpd: remove unused str2tag() function This function is not used anymore since commit fb1d2a2d9. Signed-off-by: Renato Westphal --- bgpd/bgp_mplsvpn.c | 25 ------------------------- bgpd/bgp_mplsvpn.h | 1 - 2 files changed, 26 deletions(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 60e0a212ed..73c0389b11 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -381,31 +381,6 @@ out: return lret; } -int -str2tag (const char *str, u_char *tag) -{ - unsigned long l; - char *endptr; - u_int32_t t; - - if (*str == '-') - return 0; - - errno = 0; - l = strtoul (str, &endptr, 10); - - if (*endptr != '\0' || errno || l > UINT32_MAX) - return 0; - - t = (u_int32_t) l; - - tag[0] = (u_char)(t >> 12); - tag[1] = (u_char)(t >> 4); - tag[2] = (u_char)(t << 4); - - return 1; -} - char * prefix_rd2str (struct prefix_rd *prd, char *buf, size_t size) { diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h index d5378a9d37..faae041e07 100644 --- a/bgpd/bgp_mplsvpn.h +++ b/bgpd/bgp_mplsvpn.h @@ -104,7 +104,6 @@ extern void decode_rd_vnc_eth (u_char *pnt, struct rd_vnc_eth *rd_vnc_eth); #endif extern int str2prefix_rd (const char *, struct prefix_rd *); -extern int str2tag (const char *, u_char *); extern char *prefix_rd2str (struct prefix_rd *, char *, size_t); extern int From 79c3f4f491bae3b4bbd4ef63edc8125e24175f3e Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 18 May 2017 17:27:09 +0000 Subject: [PATCH 145/193] ospf6d: remember format for ospf6 area id If the user enters a decimal, display a decimal. If the user enters a dotted quad, display a dotted quad. Signed-off-by: Quentin Young --- ospf6d/ospf6_area.c | 41 ++++++++++++++++++++++++++--------------- ospf6d/ospf6_area.h | 4 +++- ospf6d/ospf6_top.c | 2 +- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 9f02a414de..bf98f704da 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -204,15 +204,32 @@ ospf6_area_no_summary_unset (struct ospf6 *ospf6, struct ospf6_area *area) } } -/* Make new area structure */ +/** + * Make new area structure. + * + * @param area_id - ospf6 area ID + * @param o - ospf6 instance + * @param df - display format for area ID + */ struct ospf6_area * -ospf6_area_create (u_int32_t area_id, struct ospf6 *o) +ospf6_area_create (u_int32_t area_id, struct ospf6 *o, int df) { struct ospf6_area *oa; oa = XCALLOC (MTYPE_OSPF6_AREA, sizeof (struct ospf6_area)); - inet_ntop (AF_INET, &area_id, oa->name, sizeof (oa->name)); + switch (df) + { + case OSPF6_AREA_FMT_DECIMAL: + snprintf (oa->name, sizeof (oa->name), "%u", ntohl (area_id)); + break; + case OSPF6_AREA_FMT_DOTTEDQUAD: + inet_ntop (AF_INET, &area_id, oa->name, sizeof (oa->name)); + break; + default: + return NULL; + } + oa->area_id = area_id; oa->if_list = list_new (); @@ -311,16 +328,6 @@ ospf6_area_lookup (u_int32_t area_id, struct ospf6 *ospf6) return (struct ospf6_area *) NULL; } -static struct ospf6_area * -ospf6_area_get (u_int32_t area_id, struct ospf6 *o) -{ - struct ospf6_area *oa; - oa = ospf6_area_lookup (area_id, o); - if (oa == NULL) - oa = ospf6_area_create (area_id, o); - return oa; -} - void ospf6_area_enable (struct ospf6_area *oa) { @@ -408,13 +415,17 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) #define OSPF6_CMD_AREA_GET(str, oa) \ { \ char *ep; \ - u_int32_t area_id = htonl (strtol(str, &ep, 10)); \ + u_int32_t area_id = htonl (strtoul (str, &ep, 10)); \ if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \ { \ vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \ return CMD_SUCCESS; \ } \ - oa = ospf6_area_get (area_id, ospf6); \ + int format = !*ep ? OSPF6_AREA_FMT_DECIMAL : \ + OSPF6_AREA_FMT_DOTTEDQUAD; \ + oa = ospf6_area_lookup (area_id, ospf6); \ + if (oa == NULL) \ + oa = ospf6_area_create (area_id, ospf6, format); \ } DEFUN (area_range, diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h index 8e2368b166..86c68af17b 100644 --- a/ospf6d/ospf6_area.h +++ b/ospf6d/ospf6_area.h @@ -31,6 +31,8 @@ struct ospf6_area /* Area-ID */ u_int32_t area_id; +#define OSPF6_AREA_FMT_DOTTEDQUAD 1 +#define OSPF6_AREA_FMT_DECIMAL 2 /* Area-ID string */ char name[16]; @@ -115,7 +117,7 @@ struct ospf6_area /* prototypes */ extern int ospf6_area_cmp (void *va, void *vb); -extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *); +extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *, int); extern void ospf6_area_delete (struct ospf6_area *); extern struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index bafe86bff4..dfda06678c 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -603,7 +603,7 @@ DEFUN (ospf6_interface_area, /* find/create ospf6 area */ oa = ospf6_area_lookup (area_id, o); if (oa == NULL) - oa = ospf6_area_create (area_id, o); + oa = ospf6_area_create (area_id, o, OSPF6_AREA_FMT_DOTTEDQUAD); /* attach interface to area */ listnode_add (oa->if_list, oi); /* sort ?? */ From 86573dcbbe253d618c100bd94c1acf20348b7afa Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 19 May 2017 18:38:02 +0000 Subject: [PATCH 146/193] ospfd: remember format for ospf area id If the user enters a decimal, display a decimal. If the user enters a dotted quad, display a dotted quad. Signed-off-by: Quentin Young --- ospfd/ospf_abr.c | 9 ++-- ospfd/ospf_interface.c | 4 +- ospfd/ospf_interface.h | 12 ++--- ospfd/ospf_vty.c | 114 +++++++++++++++++++---------------------- ospfd/ospf_vty.h | 7 +-- ospfd/ospfd.c | 39 ++++++++------ ospfd/ospfd.h | 14 ++--- 7 files changed, 98 insertions(+), 101 deletions(-) diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index a54170e048..aa4909314a 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -197,9 +197,8 @@ ospf_area_range_set (struct ospf *ospf, struct in_addr area_id, { struct ospf_area *area; struct ospf_area_range *range; - int ret = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, ret); + area = ospf_area_get (ospf, area_id); if (area == NULL) return 0; @@ -233,9 +232,8 @@ ospf_area_range_cost_set (struct ospf *ospf, struct in_addr area_id, { struct ospf_area *area; struct ospf_area_range *range; - int ret = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, ret); + area = ospf_area_get (ospf, area_id); if (area == NULL) return 0; @@ -282,9 +280,8 @@ ospf_area_range_substitute_set (struct ospf *ospf, struct in_addr area_id, { struct ospf_area *area; struct ospf_area_range *range; - int ret = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, ret); + area = ospf_area_get (ospf, area_id); range = ospf_area_range_lookup (area, p); if (range != NULL) diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index aeb12a59fa..137df16a05 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -795,7 +795,7 @@ ospf_vl_data_new (struct ospf_area *area, struct in_addr vl_peer) vl_data->vl_peer.s_addr = vl_peer.s_addr; vl_data->vl_area_id = area->area_id; - vl_data->format = area->format; + vl_data->vl_area_id_fmt = area->area_id_fmt; return vl_data; } @@ -869,7 +869,7 @@ ospf_vl_new (struct ospf *ospf, struct ospf_vl_data *vl_data) zlog_debug ("ospf_vl_new(): set if->name to %s", vi->name); area_id.s_addr = 0; - area = ospf_area_get (ospf, area_id, OSPF_AREA_ID_FORMAT_ADDRESS); + area = ospf_area_get (ospf, area_id); voi->area = area; if (IS_DEBUG_OSPF_EVENT) diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 39202f777a..c5e6594926 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -104,12 +104,12 @@ struct ospf_interface; struct ospf_vl_data { - struct in_addr vl_peer; /* Router-ID of the peer for VLs. */ - struct in_addr vl_area_id; /* Transit area for this VL. */ - int format; /* area ID format */ - struct ospf_interface *vl_oi; /* Interface data structure for the VL. */ - struct vertex_nexthop nexthop; /* Nexthop router and oi to use */ - struct in_addr peer_addr; /* Address used to reach the peer. */ + struct in_addr vl_peer; /* Router-ID of the peer */ + struct in_addr vl_area_id; /* Transit area */ + int vl_area_id_fmt; /* Area ID format */ + struct ospf_interface *vl_oi; /* Interface data structure */ + struct vertex_nexthop nexthop; /* Nexthop router and oi to use */ + struct in_addr peer_addr; /* Address used to reach the peer */ u_char flags; }; diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index f409aa8bb4..caf1b0c668 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -67,36 +67,29 @@ static const char *ospf_network_type_str[] = /* Utility functions. */ int -ospf_str2area_id (const char *str, struct in_addr *area_id, int *format) +str2area_id (const char *str, struct in_addr *area_id, int *area_id_fmt) { - char *endptr = NULL; - unsigned long ret; + char *ep; - /* match "A.B.C.D". */ - if (strchr (str, '.') != NULL) - { - ret = inet_aton (str, area_id); - if (!ret) - return -1; - *format = OSPF_AREA_ID_FORMAT_ADDRESS; - } - /* match "<0-4294967295>". */ - else - { - if (*str == '-') - return -1; - errno = 0; - ret = strtoul (str, &endptr, 10); - if (*endptr != '\0' || errno || ret > UINT32_MAX) - return -1; + area_id->s_addr = htonl (strtoul (str, &ep, 10)); + if (*ep && !inet_aton (str, area_id)) + return -1; - area_id->s_addr = htonl (ret); - *format = OSPF_AREA_ID_FORMAT_DECIMAL; - } + *area_id_fmt = *ep ? OSPF_AREA_ID_FMT_DOTTEDQUAD : OSPF_AREA_ID_FMT_DECIMAL; return 0; } +void +area_id2str (char *buf, int length, struct in_addr *area_id, int area_id_fmt) +{ + memset (buf, 0, length); + + if (area_id_fmt == OSPF_AREA_ID_FMT_DOTTEDQUAD) + strncpy (buf, inet_ntoa (*area_id), length); + else + sprintf (buf, "%lu", (unsigned long) ntohl (area_id->s_addr)); +} static int str2metric (const char *str, int *metric) @@ -534,7 +527,7 @@ DEFUN (ospf_network_area, VTY_GET_IPV4_PREFIX ("network prefix", p, argv[idx_ipv4_prefixlen]->arg); VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - ret = ospf_network_set (ospf, &p, area_id); + ret = ospf_network_set (ospf, &p, area_id, format); if (ret == 0) { vty_out (vty, "There is already same network statement.%s", VTY_NEWLINE); @@ -641,6 +634,7 @@ DEFUN (ospf_area_range_cost, VTY_GET_IPV4_PREFIX ("area range", p, argv[idx_ipv4_prefixlen]->arg); ospf_area_range_set (ospf, area_id, &p, OSPF_AREA_RANGE_ADVERTISE); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); VTY_GET_INTEGER ("range cost", cost, argv[idx_cost]->arg); ospf_area_range_cost_set (ospf, area_id, &p, cost); @@ -669,6 +663,7 @@ DEFUN (ospf_area_range_not_advertise, VTY_GET_IPV4_PREFIX ("area range", p, argv[idx_ipv4_prefixlen]->arg); ospf_area_range_set (ospf, area_id, &p, 0); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); return CMD_SUCCESS; } @@ -728,6 +723,7 @@ DEFUN (ospf_area_range_substitute, VTY_GET_IPV4_PREFIX ("substituted network prefix", s, argv[idx_ipv4_prefixlen_2]->arg); ospf_area_range_substitute_set (ospf, area_id, &p, &s); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); return CMD_SUCCESS; } @@ -782,7 +778,7 @@ DEFUN (no_ospf_area_range_substitute, struct ospf_vl_config_data { struct vty *vty; /* vty stuff */ struct in_addr area_id; /* area ID from command line */ - int format; /* command line area ID format */ + int area_id_fmt; /* command line area ID format */ struct in_addr vl_peer; /* command line vl_peer */ int auth_type; /* Authehntication type, if given */ char *auth_key; /* simple password if present */ @@ -821,11 +817,12 @@ ospf_find_vl_data (struct ospf *ospf, struct ospf_vl_config_data *vl_config) VTY_NEWLINE); return NULL; } - area = ospf_area_get (ospf, area_id, vl_config->format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, vl_config->area_id_fmt); if (area->external_routing != OSPF_AREA_DEFAULT) { - if (vl_config->format == OSPF_AREA_ID_FORMAT_ADDRESS) + if (vl_config->area_id_fmt == OSPF_AREA_ID_FMT_DOTTEDQUAD) vty_out (vty, "Area %s is %s%s", inet_ntoa (area_id), area->external_routing == OSPF_AREA_NSSA?"nssa":"stub", @@ -1037,7 +1034,8 @@ DEFUN (ospf_area_vlink, ospf_vl_config_data_init(&vl_config, vty); /* Read off first 2 parameters and check them */ - ret = ospf_str2area_id (argv[idx_ipv4_number]->arg, &vl_config.area_id, &vl_config.format); + ret = str2area_id (argv[idx_ipv4_number]->arg, &vl_config.area_id, + &vl_config.area_id_fmt); if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTY_NEWLINE); @@ -1155,7 +1153,7 @@ DEFUN (ospf_area_vlink_intervals, char *area_id = argv[1]->arg; char *router_id = argv[3]->arg; - ret = ospf_str2area_id (area_id, &vl_config.area_id, &vl_config.format); + ret = str2area_id (area_id, &vl_config.area_id, &vl_config.area_id_fmt); if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTY_NEWLINE); @@ -1210,7 +1208,7 @@ DEFUN (no_ospf_area_vlink, ospf_vl_config_data_init(&vl_config, vty); - ret = ospf_str2area_id (argv[idx_ipv4_number]->arg, &vl_config.area_id, &format); + ret = str2area_id (argv[idx_ipv4_number]->arg, &vl_config.area_id, &format); if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTY_NEWLINE); @@ -1319,7 +1317,7 @@ DEFUN (no_ospf_area_vlink_intervals, char *area_id = argv[2]->arg; char *router_id = argv[4]->arg; - ret = ospf_str2area_id (area_id, &vl_config.area_id, &vl_config.format); + ret = str2area_id (area_id, &vl_config.area_id, &vl_config.area_id_fmt); if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTY_NEWLINE); @@ -1371,7 +1369,8 @@ DEFUN (ospf_area_shortcut, VTY_GET_OSPF_AREA_ID_NO_BB ("shortcut", area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); if (strncmp (argv[idx_enable_disable]->arg, "de", 2) == 0) mode = OSPF_SHORTCUT_DEFAULT; @@ -1437,6 +1436,7 @@ DEFUN (ospf_area_stub, VTY_GET_OSPF_AREA_ID_NO_BB ("stub", area_id, format, argv[idx_ipv4_number]->arg); ret = ospf_area_stub_set (ospf, area_id); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); if (ret == 0) { vty_out (vty, "First deconfigure all virtual link through this area%s", @@ -1466,6 +1466,7 @@ DEFUN (ospf_area_stub_no_summary, VTY_GET_OSPF_AREA_ID_NO_BB ("stub", area_id, format, argv[idx_ipv4_number]->arg); ret = ospf_area_stub_set (ospf, area_id); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); if (ret == 0) { vty_out (vty, "%% Area cannot be stub as it contains a virtual link%s", @@ -1532,6 +1533,7 @@ ospf_area_nssa_cmd_handler (struct vty *vty, int argc, struct cmd_token **argv, VTY_GET_OSPF_AREA_ID_NO_BB ("NSSA", area_id, format, argv[1]->arg); ret = ospf_area_nssa_set (ospf, area_id); + ospf_area_display_format_set (ospf, ospf_area_get (ospf, area_id), format); if (ret == 0) { vty_out (vty, "%% Area cannot be nssa as it contains a virtual link%s", @@ -1669,7 +1671,8 @@ DEFUN (ospf_area_default_cost, VTY_GET_OSPF_AREA_ID_NO_BB ("default-cost", area_id, format, argv[idx_ipv4_number]->arg); VTY_GET_INTEGER_RANGE ("stub default cost", cost, argv[idx_number]->arg, 0, 16777215); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); if (area->external_routing == OSPF_AREA_DEFAULT) { @@ -1756,7 +1759,8 @@ DEFUN (ospf_area_export_list, VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); ospf_area_export_list_set (ospf, area, argv[3]->arg); return CMD_SUCCESS; @@ -1807,7 +1811,8 @@ DEFUN (ospf_area_import_list, VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); ospf_area_import_list_set (ospf, area, argv[3]->arg); return CMD_SUCCESS; @@ -1863,7 +1868,8 @@ DEFUN (ospf_area_filter_list, VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); plist = prefix_list_lookup (AFI_IP, argv[idx_word]->arg); if (strncmp (argv[idx_in_out]->arg, "in", 2) == 0) { @@ -1963,7 +1969,8 @@ DEFUN (ospf_area_authentication_message_digest, VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); area->auth_type = OSPF_AUTH_CRYPTOGRAPHIC; return CMD_SUCCESS; @@ -1985,7 +1992,8 @@ DEFUN (ospf_area_authentication, VTY_GET_OSPF_AREA_ID (area_id, format, argv[idx_ipv4_number]->arg); - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, format); area->auth_type = OSPF_AUTH_SIMPLE; return CMD_SUCCESS; @@ -7003,7 +7011,7 @@ DEFUN (ip_ospf_area, return CMD_SUCCESS; } - ret = ospf_str2area_id (areaid, &area_id, &format); + ret = str2area_id (areaid, &area_id, &format); if (ret < 0) { vty_out (vty, "Please specify area by A.B.C.D|<0-4294967295>%s", @@ -8165,19 +8173,6 @@ const char *ospf_shortcut_mode_str[] = "disable" }; - -static void -area_id2str (char *buf, int length, struct ospf_area *area) -{ - memset (buf, 0, length); - - if (area->format == OSPF_AREA_ID_FORMAT_ADDRESS) - strncpy (buf, inet_ntoa (area->area_id), length); - else - sprintf (buf, "%lu", (unsigned long) ntohl (area->area_id.s_addr)); -} - - const char *ospf_int_type_str[] = { "unknown", /* should never be used. */ @@ -8424,7 +8419,7 @@ config_write_network_area (struct vty *vty, struct ospf *ospf) memset (buf, 0, INET_ADDRSTRLEN); /* Create Area ID string by specified Area ID format. */ - if (n->format == OSPF_AREA_ID_FORMAT_ADDRESS) + if (n->area_id_fmt == OSPF_AREA_ID_FMT_DOTTEDQUAD) strncpy ((char *) buf, inet_ntoa (n->area_id), INET_ADDRSTRLEN); else sprintf ((char *) buf, "%lu", @@ -8451,7 +8446,8 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf) { struct route_node *rn1; - area_id2str ((char *) buf, INET_ADDRSTRLEN, area); + area_id2str ((char *) buf, INET_ADDRSTRLEN, &area->area_id, + area->area_id_fmt); if (area->auth_type != OSPF_AUTH_NULL) { @@ -8570,7 +8566,7 @@ config_write_virtual_link (struct vty *vty, struct ospf *ospf) { struct listnode *node; struct ospf_vl_data *vl_data; - u_char buf[INET_ADDRSTRLEN]; + char buf[INET_ADDRSTRLEN]; /* Virtual-Link print */ for (ALL_LIST_ELEMENTS_RO (ospf->vlinks, node, vl_data)) @@ -8582,12 +8578,8 @@ config_write_virtual_link (struct vty *vty, struct ospf *ospf) if (vl_data != NULL) { memset (buf, 0, INET_ADDRSTRLEN); - - if (vl_data->format == OSPF_AREA_ID_FORMAT_ADDRESS) - strncpy ((char *) buf, inet_ntoa (vl_data->vl_area_id), INET_ADDRSTRLEN); - else - sprintf ((char *) buf, "%lu", - (unsigned long int) ntohl (vl_data->vl_area_id.s_addr)); + + area_id2str (buf, sizeof(buf), &vl_data->vl_area_id, vl_data->vl_area_id_fmt); oi = vl_data->vl_oi; /* timers */ diff --git a/ospfd/ospf_vty.h b/ospfd/ospf_vty.h index 429ac318f7..cf6b322ac7 100644 --- a/ospfd/ospf_vty.h +++ b/ospfd/ospf_vty.h @@ -26,7 +26,7 @@ #define VTY_GET_OSPF_AREA_ID(V,F,STR) \ { \ int retv; \ - retv = ospf_str2area_id ((STR), &(V), &(F)); \ + retv = str2area_id ((STR), &(V), &(F)); \ if (retv < 0) \ { \ vty_out (vty, "%% Invalid OSPF area ID%s", VTY_NEWLINE); \ @@ -37,7 +37,7 @@ #define VTY_GET_OSPF_AREA_ID_NO_BB(NAME,V,F,STR) \ { \ int retv; \ - retv = ospf_str2area_id ((STR), &(V), &(F)); \ + retv = str2area_id ((STR), &(V), &(F)); \ if (retv < 0) \ { \ vty_out (vty, "%% Invalid OSPF area ID%s", VTY_NEWLINE); \ @@ -54,6 +54,7 @@ extern void ospf_vty_init (void); extern void ospf_vty_show_init (void); extern void ospf_vty_clear_init (void); -extern int ospf_str2area_id (const char *, struct in_addr *, int *); +extern int str2area_id (const char *, struct in_addr *, int *); +extern void area_id2str (char *, int, struct in_addr *, int); #endif /* _QUAGGA_OSPF_VTY_H */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 30b1e9622f..af68d1d35f 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -717,6 +717,7 @@ ospf_area_new (struct ospf *ospf, struct in_addr area_id) new->ospf = ospf; new->area_id = area_id; + new->area_id_fmt = OSPF_AREA_ID_FMT_DOTTEDQUAD; new->external_routing = OSPF_AREA_DEFAULT; new->default_cost = 1; @@ -809,7 +810,7 @@ ospf_area_check_free (struct ospf *ospf, struct in_addr area_id) } struct ospf_area * -ospf_area_get (struct ospf *ospf, struct in_addr area_id, int format) +ospf_area_get (struct ospf *ospf, struct in_addr area_id) { struct ospf_area *area; @@ -817,7 +818,6 @@ ospf_area_get (struct ospf *ospf, struct in_addr area_id, int format) if (!area) { area = ospf_area_new (ospf, area_id); - area->format = format; listnode_add_sort (ospf->areas, area); ospf_check_abr_status (ospf); if (ospf->stub_router_admin_set == OSPF_STUB_ROUTER_ADMINISTRATIVE_SET) @@ -920,13 +920,13 @@ static void update_redistributed(struct ospf *ospf, int add_to_ospf) /* Config network statement related functions. */ static struct ospf_network * -ospf_network_new (struct in_addr area_id, int format) +ospf_network_new (struct in_addr area_id) { struct ospf_network *new; new = XCALLOC (MTYPE_OSPF_NETWORK, sizeof (struct ospf_network)); new->area_id = area_id; - new->format = format; + new->area_id_fmt = OSPF_AREA_ID_FMT_DOTTEDQUAD; return new; } @@ -941,12 +941,11 @@ ospf_network_free (struct ospf *ospf, struct ospf_network *network) int ospf_network_set (struct ospf *ospf, struct prefix_ipv4 *p, - struct in_addr area_id) + struct in_addr area_id, int df) { struct ospf_network *network; struct ospf_area *area; struct route_node *rn; - int ret = OSPF_AREA_ID_FORMAT_ADDRESS; rn = route_node_get (ospf->networks, (struct prefix *)p); if (rn->info) @@ -956,8 +955,10 @@ ospf_network_set (struct ospf *ospf, struct prefix_ipv4 *p, return 0; } - rn->info = network = ospf_network_new (area_id, ret); - area = ospf_area_get (ospf, area_id, ret); + rn->info = network = ospf_network_new (area_id); + network->area_id_fmt = df; + area = ospf_area_get (ospf, area_id); + ospf_area_display_format_set (ospf, area, df); /* Run network config now. */ ospf_network_run ((struct prefix *)p, area); @@ -1037,7 +1038,6 @@ ospf_interface_set (struct interface *ifp, struct in_addr area_id) struct ospf *ospf; struct ospf_if_params *params; struct ospf_interface *oi; - int ret = OSPF_AREA_ID_FORMAT_ADDRESS; if ((ospf = ospf_lookup ()) == NULL) return 1; /* Ospf not ready yet */ @@ -1047,7 +1047,7 @@ ospf_interface_set (struct interface *ifp, struct in_addr area_id) SET_IF_PARAM (params, if_area); params->if_area = area_id; - area = ospf_area_get (ospf, area_id, ret); + area = ospf_area_get (ospf, area_id); for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, co)) { @@ -1235,7 +1235,7 @@ ospf_if_update (struct ospf *ospf, struct interface *ifp) if (rn->info != NULL) { network = (struct ospf_network *) rn->info; - area = ospf_area_get (ospf, network->area_id, network->format); + area = ospf_area_get (ospf, network->area_id); ospf_network_run_interface (&rn->p, area, ifp); } @@ -1368,13 +1368,20 @@ ospf_area_vlink_count (struct ospf *ospf, struct ospf_area *area) return count; } +int +ospf_area_display_format_set (struct ospf *ospf, struct ospf_area *area, int df) +{ + area->area_id_fmt = df; + + return 1; +} + int ospf_area_stub_set (struct ospf *ospf, struct in_addr area_id) { struct ospf_area *area; - int format = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); if (ospf_area_vlink_count (ospf, area)) return 0; @@ -1405,9 +1412,8 @@ int ospf_area_no_summary_set (struct ospf *ospf, struct in_addr area_id) { struct ospf_area *area; - int format = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); area->no_summary = 1; return 1; @@ -1432,9 +1438,8 @@ int ospf_area_nssa_set (struct ospf *ospf, struct in_addr area_id) { struct ospf_area *area; - int format = OSPF_AREA_ID_FORMAT_ADDRESS; - area = ospf_area_get (ospf, area_id, format); + area = ospf_area_get (ospf, area_id); if (ospf_area_vlink_count (ospf, area)) return 0; diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 9198d5c620..787a77bf96 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -322,9 +322,9 @@ struct ospf_area struct in_addr area_id; /* Area ID format. */ - char format; -#define OSPF_AREA_ID_FORMAT_ADDRESS 1 -#define OSPF_AREA_ID_FORMAT_DECIMAL 2 + int area_id_fmt; +#define OSPF_AREA_ID_FMT_DOTTEDQUAD 1 +#define OSPF_AREA_ID_FMT_DECIMAL 2 /* Address range. */ struct list *address_range; @@ -431,7 +431,7 @@ struct ospf_network { /* Area ID. */ struct in_addr area_id; - int format; + int area_id_fmt; }; /* OSPF NBMA neighbor structure. */ @@ -525,9 +525,11 @@ extern struct ospf *ospf_get_instance (u_short); extern void ospf_finish (struct ospf *); extern void ospf_router_id_update (struct ospf *ospf); extern int ospf_network_set (struct ospf *, struct prefix_ipv4 *, - struct in_addr); + struct in_addr, int); extern int ospf_network_unset (struct ospf *, struct prefix_ipv4 *, struct in_addr); +extern int ospf_area_display_format_set (struct ospf *, struct ospf_area *area, + int df); extern int ospf_area_stub_set (struct ospf *, struct in_addr); extern int ospf_area_stub_unset (struct ospf *, struct in_addr); extern int ospf_area_no_summary_set (struct ospf *, struct in_addr); @@ -566,7 +568,7 @@ extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup_next (struct ospf *, int); extern int ospf_oi_count (struct interface *); -extern struct ospf_area *ospf_area_get (struct ospf *, struct in_addr, int); +extern struct ospf_area *ospf_area_get (struct ospf *, struct in_addr); extern void ospf_area_check_free (struct ospf *, struct in_addr); extern struct ospf_area *ospf_area_lookup_by_area_id (struct ospf *, struct in_addr); From 48cdf1a9d6e687abe71421c3cce59b93ab34ac54 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 17 May 2017 17:11:34 +0000 Subject: [PATCH 147/193] lib: enforce thread_cancel() MT-unsafe invariant Signed-off-by: Quentin Young --- lib/thread.c | 9 ++++++--- lib/thread.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index 2843a9211e..ccb635a87d 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -377,6 +377,7 @@ thread_master_create (void) rv->timer->update = rv->background->update = thread_timer_update; rv->spin = true; rv->handle_signals = true; + rv->owner = pthread_self(); #if defined(HAVE_POLL_CALL) rv->handler.pfdsize = rv->fd_limit; @@ -1021,7 +1022,7 @@ thread_cancel_read_or_write (struct thread *thread, short int state) * Cancel thread from scheduler. * * This function is *NOT* MT-safe. DO NOT call it from any other pthread except - * the one which owns thread->master. + * the one which owns thread->master. You will crash. */ void thread_cancel (struct thread *thread) @@ -1030,8 +1031,10 @@ thread_cancel (struct thread *thread) struct pqueue *queue = NULL; struct thread **thread_array = NULL; - pthread_mutex_lock (&thread->master->mtx); pthread_mutex_lock (&thread->mtx); + pthread_mutex_lock (&thread->master->mtx); + + assert (pthread_self() == thread->master->owner); switch (thread->type) { @@ -1092,8 +1095,8 @@ thread_cancel (struct thread *thread) thread_add_unuse (thread->master, thread); done: - pthread_mutex_unlock (&thread->mtx); pthread_mutex_unlock (&thread->master->mtx); + pthread_mutex_unlock (&thread->mtx); } /* Delete all events which has argument value arg. */ diff --git a/lib/thread.h b/lib/thread.h index 218672c7bf..7e79eb38dc 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -88,6 +88,7 @@ struct thread_master bool spin; bool handle_signals; pthread_mutex_t mtx; + pthread_t owner; }; typedef unsigned char thread_type; From 4042205e769bbca9d5614fe9b473de4f8dac422c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 12:34:26 -0300 Subject: [PATCH 148/193] bgpd: add network commands for encapv6 Signed-off-by: Renato Westphal --- bgpd/bgp_encap.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index bc86a541e9..572d9fdd1e 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -232,6 +232,42 @@ DEFUN (no_encap_network, 0, NULL, NULL, NULL); } +DEFUN (encapv6_network, + encapv6_network_cmd, + "network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", + "Specify a network to announce via BGP\n" + "IPv6 prefix /, e.g., 3ffe::/16\n" + "Specify Route Distinguisher\n" + "VPN Route Distinguisher\n" + "route map\n" + "route map name\n") +{ + int idx_ipv6 = 1; + int idx_rd = 3; + int idx_rmap = 5; + const char *rmap_str = (argc == 6) ? argv[idx_rmap]->arg : NULL; + return bgp_static_set_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, + argv[idx_rd]->arg, NULL, rmap_str, 0, NULL, + NULL, NULL, NULL); +} + +DEFUN (no_encapv6_network, + no_encapv6_network_cmd, + "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", + NO_STR + "Specify a network to announce via BGP\n" + "IPv6 prefix /, e.g., 3ffe::/16\n" + "Specify Route Distinguisher\n" + "VPN Route Distinguisher\n" + "route map\n" + "route map name\n") +{ + int idx_ipv6 = 2; + int idx_rd = 4; + return bgp_static_unset_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, + argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); +} + static int show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { @@ -752,6 +788,8 @@ bgp_encap_init (void) { install_element (BGP_ENCAP_NODE, &encap_network_cmd); install_element (BGP_ENCAP_NODE, &no_encap_network_cmd); + install_element (BGP_ENCAPV6_NODE, &encapv6_network_cmd); + install_element (BGP_ENCAPV6_NODE, &no_encapv6_network_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); From ebb0c02ad3c985db4c185e5ac599fb54cc0dc37f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 16:51:46 -0300 Subject: [PATCH 149/193] bgpd: fix display of encap routes in the running configuration Static encap routes don't have an MPLS label. Also, use %u instead of %d to print the label. Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e9f6cba127..fc89bc046b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10672,10 +10672,12 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp, prefix_rd2str (prd, rdbuf, RD_ADDRSTRLEN); label = decode_label (bgp_static->tag); - vty_out (vty, " network %s/%d rd %s label %d", + vty_out (vty, " network %s/%d rd %s", inet_ntop (p->family, &p->u.prefix, buf, SU_ADDRSTRLEN), - p->prefixlen, - rdbuf, label); + p->prefixlen, rdbuf); + if (safi == SAFI_MPLS_VPN) + vty_out (vty, " label %u", label); + if (bgp_static->rmap.name) vty_out (vty, " route-map %s", bgp_static->rmap.name); else From 3800c7b0674073dd1c8ab111f5638686db4da767 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 10:51:00 -0300 Subject: [PATCH 150/193] bgpd: fix sending of invalid nexthops on the wire The bpacket_reformat_for_peer() function rewrites the nexthop of outgoing route updates on a per-peer basis in order to handle route-maps ("set ip next-hop") and locally-originated routes missing a nexthop. In the latter case, RFC 4271 says the following: "When announcing a locally-originated route to an internal peer, the BGP speaker SHOULD use the interface address of the router through which the announced network is reachable for the speaker as the NEXT_HOP". We were doing this for regular IPv4/IPv6 routes, but not for VPN/EVPN/ENCAP routes, which were being announced with invalid nexthops (0.0.0.0 or ::). This patch fixes this problem. Signed-off-by: Renato Westphal --- bgpd/bgp_attr.c | 4 +-- bgpd/bgp_updgrp_packet.c | 56 +++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index ec4f34ff47..cf2e487590 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2842,6 +2842,7 @@ bgp_packet_mpattr_start (struct stream *s, struct peer *peer, } /* Nexthop */ + bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); switch (nh_afi) { case AFI_IP: @@ -2850,12 +2851,10 @@ bgp_packet_mpattr_start (struct stream *s, struct peer *peer, case SAFI_UNICAST: case SAFI_MULTICAST: case SAFI_LABELED_UNICAST: - bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); stream_putc (s, 4); stream_put_ipv4 (s, attr->nexthop.s_addr); break; case SAFI_MPLS_VPN: - bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); stream_putc (s, 12); stream_putl (s, 0); /* RD = 0, per RFC */ stream_putl (s, 0); @@ -2879,7 +2878,6 @@ bgp_packet_mpattr_start (struct stream *s, struct peer *peer, struct attr_extra *attre = attr->extra; assert (attr->extra); - bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); if (attre->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) { stream_putc (s, BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL); diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 7e524dd347..7a45cddca9 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -428,21 +428,33 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) nhafi = BGP_NEXTHOP_AFI_FROM_NHLEN(nhlen); if (peer_cap_enhe(peer, paf->afi, paf->safi)) nhafi = AFI_IP6; - if (paf->safi == SAFI_MPLS_VPN && /* if VPN && not global */ - nhlen != BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) - nhafi = AFI_MAX; /* no change allowed */ } if (nhafi == AFI_IP) { struct in_addr v4nh, *mod_v4nh; int nh_modified = 0; + size_t offset_nh = vec->offset + 1; route_map_sets_nh = (CHECK_FLAG (vec->flags, BPKT_ATTRVEC_FLAGS_RMAP_IPV4_NH_CHANGED) || CHECK_FLAG (vec->flags, BPKT_ATTRVEC_FLAGS_RMAP_NH_PEER_ADDRESS)); - stream_get_from (&v4nh, s, vec->offset + 1, 4); + switch (nhlen) + { + case BGP_ATTR_NHLEN_IPV4: + break; + case BGP_ATTR_NHLEN_VPNV4: + offset_nh += 8; + break; + default: + /* TODO: handle IPv6 nexthops */ + zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP): %u", + __func__, peer->host, nhlen); + return NULL; + } + + stream_get_from (&v4nh, s, offset_nh, IPV4_MAX_BYTELEN); mod_v4nh = &v4nh; /* @@ -483,7 +495,7 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } if (nh_modified) /* allow for VPN RD */ - stream_put_in_addr_at (s, vec->offset + 1 + nhlen - 4, mod_v4nh); + stream_put_in_addr_at (s, offset_nh, mod_v4nh); if (bgp_debug_update(peer, NULL, NULL, 0)) zlog_debug ("u%" PRIu64 ":s%" PRIu64 " %s send UPDATE w/ nexthop %s%s", @@ -496,6 +508,8 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) struct in6_addr v6nhglobal, *mod_v6nhg; struct in6_addr v6nhlocal, *mod_v6nhl; int gnh_modified, lnh_modified; + size_t offset_nhglobal = vec->offset + 1; + size_t offset_nhlocal = vec->offset + 1; gnh_modified = lnh_modified = 0; mod_v6nhg = &v6nhglobal; @@ -510,7 +524,28 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) * additional work being to handle 1 or 2 nexthops. Also, 3rd * party nexthop is not propagated for EBGP right now. */ - stream_get_from (&v6nhglobal, s, vec->offset + 1, 16); + switch (nhlen) + { + case BGP_ATTR_NHLEN_IPV6_GLOBAL: + break; + case BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL: + offset_nhlocal += IPV6_MAX_BYTELEN; + break; + case BGP_ATTR_NHLEN_VPNV6_GLOBAL: + offset_nhglobal += 8; + break; + case BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL: + offset_nhglobal += 8; + offset_nhlocal += 8 * 2 + IPV6_MAX_BYTELEN; + break; + default: + /* TODO: handle IPv4 nexthops */ + zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP6): %u", + __func__, peer->host, nhlen); + return NULL; + } + + stream_get_from (&v6nhglobal, s, offset_nhglobal, IPV6_MAX_BYTELEN); if (route_map_sets_nh) { if (CHECK_FLAG(vec->flags, @@ -537,9 +572,10 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } - if (nhlen == 32 || nhlen == 48) /* 48 == VPN */ + if (nhlen == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL || + nhlen == BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) { - stream_get_from (&v6nhlocal, s, vec->offset + 1 + (nhlen-IPV6_MAX_BYTELEN), IPV6_MAX_BYTELEN); + stream_get_from (&v6nhlocal, s, offset_nhlocal, IPV6_MAX_BYTELEN); if (IN6_IS_ADDR_UNSPECIFIED (&v6nhlocal)) { mod_v6nhl = &peer->nexthop.v6_local; @@ -548,9 +584,9 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } if (gnh_modified) - stream_put_in6_addr_at (s, vec->offset + 1, mod_v6nhg); + stream_put_in6_addr_at (s, offset_nhglobal, mod_v6nhg); if (lnh_modified) - stream_put_in6_addr_at (s, vec->offset + 1 + (nhlen-IPV6_MAX_BYTELEN), mod_v6nhl); + stream_put_in6_addr_at (s, offset_nhlocal, mod_v6nhl); if (bgp_debug_update(peer, NULL, NULL, 0)) { From d2057ea3d03dc3def5357cc7580c342953802b1c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 19 May 2017 20:06:43 +0000 Subject: [PATCH 151/193] nhrpd: install access-list commands Signed-off-by: Quentin Young --- nhrpd/nhrp_vty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 9b8463fb54..dc89683277 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -937,6 +937,9 @@ void nhrp_config_init(void) install_node(&zebra_node, nhrp_config_write); install_default(ZEBRA_NODE); + /* access-list commands */ + access_list_init (); + /* global commands */ install_element(VIEW_NODE, &show_debugging_nhrp_cmd); install_element(VIEW_NODE, &show_ip_nhrp_cmd); From e8e0cc1af414c2bb66bdfb79f7bd06a0a818f96a Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 19:10:42 -0300 Subject: [PATCH 152/193] zebra: build mpls sources the right way zebra_mpls_null.c should contain only dummy replacements for platform-specific functions that may not be available on some systems (e.g. add/delete LSPs in the kernel). Signed-off-by: Renato Westphal --- configure.ac | 4 +- zebra/Makefile.am | 6 +- zebra/zebra_mpls_null.c | 206 ---------------------------------------- zebra/zserv_null.c | 7 ++ 4 files changed, 12 insertions(+), 211 deletions(-) diff --git a/configure.ac b/configure.ac index fa10baf8fa..c8b0a78bc6 100755 --- a/configure.ac +++ b/configure.ac @@ -374,11 +374,11 @@ dnl ---------- AC_MSG_CHECKING(whether this OS has MPLS stack) case "$host" in *-linux*) - MPLS_METHOD="zebra_mpls_netlink.o zebra_mpls.o" + MPLS_METHOD="zebra_mpls_netlink.o" AC_MSG_RESULT(Linux MPLS) ;; *-openbsd*) - MPLS_METHOD="zebra_mpls_openbsd.o zebra_mpls.o" + MPLS_METHOD="zebra_mpls_openbsd.o" AC_MSG_RESULT(OpenBSD MPLS) ;; *) diff --git a/zebra/Makefile.am b/zebra/Makefile.am index 6c5e069064..3e0de3b463 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -31,7 +31,7 @@ zebra_SOURCES = \ redistribute.c debug.c rtadv.c zebra_vty.c \ irdp_main.c irdp_interface.c irdp_packet.c router-id.c \ zebra_ptm.c zebra_rnh.c zebra_ptm_redistribute.c \ - zebra_ns.c zebra_vrf.c zebra_static.c zebra_mpls_vty.c \ + zebra_ns.c zebra_vrf.c zebra_static.c zebra_mpls.c zebra_mpls_vty.c \ zebra_mroute.c \ label_manager.c \ # end @@ -40,7 +40,7 @@ testzebra_SOURCES = test_main.c zebra_rib.c interface.c connected.c debug.c \ zebra_vty.c zebra_ptm.c zebra_routemap.c zebra_ns.c zebra_vrf.c \ kernel_null.c redistribute_null.c ioctl_null.c misc_null.c zebra_rnh_null.c \ zebra_ptm_null.c rtadv_null.c if_null.c zserv_null.c zebra_static.c \ - zebra_memory.c zebra_mpls_vty.c zebra_mpls_null.c + zebra_memory.c zebra_mpls.c zebra_mpls_vty.c zebra_mpls_null.c noinst_HEADERS = \ zebra_memory.h \ @@ -88,7 +88,7 @@ EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c \ rt_socket.c rtread_netlink.c rtread_sysctl.c \ rtread_getmsg.c kernel_socket.c kernel_netlink.c \ ioctl.c ioctl_solaris.c \ - zebra_mpls_netlink.c zebra_mpls_openbsd.c zebra_mpls.c \ + zebra_mpls_netlink.c zebra_mpls_openbsd.c \ GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB client : client_main.o ../lib/libfrr.la diff --git a/zebra/zebra_mpls_null.c b/zebra/zebra_mpls_null.c index c69b06085d..a8acdb19f3 100644 --- a/zebra/zebra_mpls_null.c +++ b/zebra/zebra_mpls_null.c @@ -26,209 +26,3 @@ int kernel_add_lsp (zebra_lsp_t *lsp) { return 0; } int kernel_upd_lsp (zebra_lsp_t *lsp) { return 0; } int kernel_del_lsp (zebra_lsp_t *lsp) { return 0; } int mpls_kernel_init (void) { return -1; }; - -int mpls_enabled; - -char * -mpls_label2str (u_int8_t num_labels, mpls_label_t *labels, - char *buf, int len, int pretty) -{ - return NULL; -} - -int -mpls_str2label (const char *label_str, u_int8_t *num_labels, - mpls_label_t *labels) -{ - return 0; -} - -int -zebra_mpls_label_block_add (struct zebra_vrf *vrf, u_int32_t start_label, - u_int32_t end_label) -{ - return 0; -} - -int -zebra_mpls_label_block_del (struct zebra_vrf *zvrf) -{ - return 0; -} - -int -zebra_mpls_write_label_block_config (struct vty *vty, struct zebra_vrf *zvrf) -{ - return 0; -} - -int -zebra_mpls_lsp_install (struct zebra_vrf *zvrf, struct route_node *rn, struct rib *rib) -{ - return 0; -} - -int -zebra_mpls_lsp_uninstall (struct zebra_vrf *zvrf, struct route_node *rn, struct rib *rib) -{ - return 0; -} - -void -zebra_mpls_init_tables (struct zebra_vrf *zvrf) -{ -} - -void -zebra_mpls_print_lsp (struct vty *vty, struct zebra_vrf *zvrf, mpls_label_t label, - u_char use_json) -{ -} - -void -zebra_mpls_print_lsp_table (struct vty *vty, struct zebra_vrf *zvrf, - u_char use_json) -{ -} - -int -zebra_mpls_write_lsp_config (struct vty *vty, struct zebra_vrf *zvrf) -{ - return 0; -} - -#ifdef HAVE_CUMULUS -int -zebra_mpls_lsp_label_consistent (struct zebra_vrf *zvrf, mpls_label_t in_label, - mpls_label_t out_label, enum nexthop_types_t gtype, - union g_addr *gate, ifindex_t ifindex) -{ - return 0; -} -#endif - -int -zebra_mpls_static_lsp_add (struct zebra_vrf *zvrf, mpls_label_t in_label, - mpls_label_t out_label, enum nexthop_types_t gtype, - union g_addr *gate, ifindex_t ifindex) -{ - return 0; -} - -int -zebra_mpls_static_lsp_del (struct zebra_vrf *zvrf, mpls_label_t in_label, - enum nexthop_types_t gtype, union g_addr *gate, - ifindex_t ifindex) -{ - return 0; -} - -void -zebra_mpls_lsp_schedule (struct zebra_vrf *zvrf) -{ -} - -void -zebra_mpls_close_tables (struct zebra_vrf *zvrf) -{ -} - -zebra_fec_t * -zebra_mpls_fec_for_label (struct zebra_vrf *zvrf, mpls_label_t label) -{ - return NULL; -} - -int -zebra_mpls_label_already_bound (struct zebra_vrf *zvrf, mpls_label_t label) -{ - return 0; -} - -int -zebra_mpls_static_fec_add (struct zebra_vrf *zvrf, struct prefix *p, - mpls_label_t in_label) -{ - return 0; -} - -int -zebra_mpls_static_fec_del (struct zebra_vrf *zvrf, struct prefix *p) -{ - return 0; -} - -int -zebra_mpls_write_fec_config (struct vty *vty, struct zebra_vrf *zvrf) -{ - return 0; -} - -void -zebra_mpls_print_fec_table (struct vty *vty, struct zebra_vrf *zvrf) -{ -} - -void -zebra_mpls_print_fec (struct vty *vty, struct zebra_vrf *zvrf, struct prefix *p) -{ -} - -int -zebra_mpls_fec_register (struct zebra_vrf *zvrf, struct prefix *p, - u_int32_t label_index, struct zserv *client) -{ - return 0; -} - -int -zebra_mpls_fec_unregister (struct zebra_vrf *zvrf, struct prefix *p, - struct zserv *client) -{ - return 0; -} - -int -zebra_mpls_cleanup_fecs_for_client (struct zebra_vrf *zvrf, struct zserv *client) -{ - return 0; -} - -void mpls_ldp_lsp_uninstall_all (struct hash_backet *backet, void *ctxt) -{ - return; -} - -void mpls_ldp_ftn_uninstall_all (struct zebra_vrf *zvrf, int afi) -{ - return; -} - -void zebra_mpls_init (void) -{ - return; -} - -int mpls_lsp_install (struct zebra_vrf *zvrf, enum lsp_types_t type, - mpls_label_t in_label, mpls_label_t out_label, - enum nexthop_types_t gtype, union g_addr *gate, - ifindex_t ifindex) -{ - return 0; -} - -int mpls_lsp_uninstall (struct zebra_vrf *zvrf, enum lsp_types_t type, - mpls_label_t in_label, enum nexthop_types_t gtype, - union g_addr *gate, ifindex_t ifindex) -{ - return 0; -} - -int mpls_ftn_update (int add, struct zebra_vrf *zvrf, enum lsp_types_t type, - struct prefix *prefix, enum nexthop_types_t gtype, - union g_addr *gate, ifindex_t ifindex, u_int8_t distance, - mpls_label_t out_label) -{ - return 0; -} - diff --git a/zebra/zserv_null.c b/zebra/zserv_null.c index 972caaeed4..47518f477f 100644 --- a/zebra/zserv_null.c +++ b/zebra/zserv_null.c @@ -29,6 +29,13 @@ #include #include +int +zebra_server_send_message(struct zserv *client) +{ return 0; } + +void zserv_create_header (struct stream *s, uint16_t cmd, vrf_id_t vrf_id) +{ return; } + int zsend_vrf_delete (struct zserv *zserv, struct zebra_vrf *zvrf) { return 0; } From a24dae86e1a03e2809aaaf4c7721e3c3289fc6da Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 20 May 2017 08:22:23 -0400 Subject: [PATCH 153/193] bgpd: Fix crash when going down When bgp is sent a SIGINT signal with vrf's configured bgp proceeds to crash on the way down. This is because the bm->bgp list was deleted( but the pointer was kept around) and then later in the going down process vrf_terminate is called which attempts to find any associated processes. Since memory has been freed and subsuquently used for something else we get a corrupt bgp pointer and bgp crashes. Here is the trace: (gdb) bt at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 at sigevent.c:255 at thread.c:1315 (gdb) Multiple protocols besides bgp and zebra running are needed to make this happen as well. So a weird timing related issue? Signed-off-by: Donald Sharp --- bgpd/bgp_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 8714820e2a..9fcbff0f53 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -194,7 +194,6 @@ bgp_exit (int status) /* reverse bgp_master_init */ for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp)) bgp_delete (bgp); - list_free (bm->bgp); /* reverse bgp_dump_init */ bgp_dump_finish (); @@ -246,6 +245,7 @@ bgp_exit (int status) closezlog (); + list_delete (bm->bgp); memset (bm, 0, sizeof (*bm)); if (bgp_debug_count()) From 7c4e00e305ac12de00d8e2d50309905a15d1d344 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 10:49:24 -0300 Subject: [PATCH 154/193] bgpd: remove unused str2tag() function This function is not used anymore since commit fb1d2a2d9. Signed-off-by: Renato Westphal --- bgpd/bgp_mplsvpn.c | 25 ------------------------- bgpd/bgp_mplsvpn.h | 1 - 2 files changed, 26 deletions(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 4a8bfed8bb..f25c00005a 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -381,31 +381,6 @@ out: return lret; } -int -str2tag (const char *str, u_char *tag) -{ - unsigned long l; - char *endptr; - u_int32_t t; - - if (*str == '-') - return 0; - - errno = 0; - l = strtoul (str, &endptr, 10); - - if (*endptr != '\0' || errno || l > UINT32_MAX) - return 0; - - t = (u_int32_t) l; - - tag[0] = (u_char)(t >> 12); - tag[1] = (u_char)(t >> 4); - tag[2] = (u_char)(t << 4); - - return 1; -} - char * prefix_rd2str (struct prefix_rd *prd, char *buf, size_t size) { diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h index 518bf6143f..3abd818b10 100644 --- a/bgpd/bgp_mplsvpn.h +++ b/bgpd/bgp_mplsvpn.h @@ -104,7 +104,6 @@ extern void decode_rd_vnc_eth (u_char *pnt, struct rd_vnc_eth *rd_vnc_eth); #endif extern int str2prefix_rd (const char *, struct prefix_rd *); -extern int str2tag (const char *, u_char *); extern char *prefix_rd2str (struct prefix_rd *, char *, size_t); extern int From 239b498d3f019568923e20b45f870acc6dd30314 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 12:34:26 -0300 Subject: [PATCH 155/193] bgpd: add network commands for encapv6 Signed-off-by: Renato Westphal --- bgpd/bgp_encap.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 060f5afb4c..8764050b16 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -238,6 +238,42 @@ DEFUN (no_encap_network, 0, NULL, NULL, NULL); } +DEFUN (encapv6_network, + encapv6_network_cmd, + "network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", + "Specify a network to announce via BGP\n" + "IPv6 prefix /, e.g., 3ffe::/16\n" + "Specify Route Distinguisher\n" + "VPN Route Distinguisher\n" + "route map\n" + "route map name\n") +{ + int idx_ipv6 = 1; + int idx_rd = 3; + int idx_rmap = 5; + const char *rmap_str = (argc == 6) ? argv[idx_rmap]->arg : NULL; + return bgp_static_set_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, + argv[idx_rd]->arg, NULL, rmap_str, 0, NULL, + NULL, NULL, NULL); +} + +DEFUN (no_encapv6_network, + no_encapv6_network_cmd, + "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", + NO_STR + "Specify a network to announce via BGP\n" + "IPv6 prefix /, e.g., 3ffe::/16\n" + "Specify Route Distinguisher\n" + "VPN Route Distinguisher\n" + "route map\n" + "route map name\n") +{ + int idx_ipv6 = 2; + int idx_rd = 4; + return bgp_static_unset_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, + argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); +} + static int show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { @@ -758,6 +794,8 @@ bgp_encap_init (void) { install_element (BGP_ENCAP_NODE, &encap_network_cmd); install_element (BGP_ENCAP_NODE, &no_encap_network_cmd); + install_element (BGP_ENCAPV6_NODE, &encapv6_network_cmd); + install_element (BGP_ENCAPV6_NODE, &no_encapv6_network_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); From e50d0a485751e5ed53ff3a283d51f3996ddc25ff Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 16:51:46 -0300 Subject: [PATCH 156/193] bgpd: fix display of encap routes in the running configuration Static encap routes don't have an MPLS label. Also, use %u instead of %d to print the label. Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 5c157b9539..13279f89b1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10434,10 +10434,12 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp, prefix_rd2str (prd, rdbuf, RD_ADDRSTRLEN); label = decode_label (bgp_static->tag); - vty_out (vty, " network %s/%d rd %s label %d", + vty_out (vty, " network %s/%d rd %s", inet_ntop (p->family, &p->u.prefix, buf, SU_ADDRSTRLEN), - p->prefixlen, - rdbuf, label); + p->prefixlen, rdbuf); + if (safi == SAFI_MPLS_VPN) + vty_out (vty, " label %u", label); + if (bgp_static->rmap.name) vty_out (vty, " route-map %s", bgp_static->rmap.name); else From 8b93b03839681a327900b26c2ee184420cccb7f3 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 May 2017 10:51:00 -0300 Subject: [PATCH 157/193] bgpd: fix sending of invalid nexthops on the wire The bpacket_reformat_for_peer() function rewrites the nexthop of outgoing route updates on a per-peer basis in order to handle route-maps ("set ip next-hop") and locally-originated routes missing a nexthop. In the latter case, RFC 4271 says the following: "When announcing a locally-originated route to an internal peer, the BGP speaker SHOULD use the interface address of the router through which the announced network is reachable for the speaker as the NEXT_HOP". We were doing this for regular IPv4/IPv6 routes, but not for VPN/EVPN/ENCAP routes, which were being announced with invalid nexthops (0.0.0.0 or ::). This patch fixes this problem. Signed-off-by: Renato Westphal --- bgpd/bgp_attr.c | 3 +-- bgpd/bgp_updgrp_packet.c | 56 +++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 5fe8ebb67f..4d5f7cab5d 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2742,6 +2742,7 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, else if (nh_afi == AFI_MAX) nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); /* Nexthop */ + bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); switch (nh_afi) { case AFI_IP: @@ -2754,7 +2755,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, stream_put_ipv4 (s, attr->nexthop.s_addr); break; case SAFI_MPLS_VPN: - bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); stream_putc (s, 12); stream_putl (s, 0); /* RD = 0, per RFC */ stream_putl (s, 0); @@ -2777,7 +2777,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, struct attr_extra *attre = attr->extra; assert (attr->extra); - bpacket_attr_vec_arr_set_vec (vecarr, BGP_ATTR_VEC_NH, s, attr); stream_putc (s, attre->mp_nexthop_len); stream_put (s, &attre->mp_nexthop_global, IPV6_MAX_BYTELEN); if (attre->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 8839de391e..5872ca6f3f 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -427,21 +427,33 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) nhafi = BGP_NEXTHOP_AFI_FROM_NHLEN(nhlen); if (peer_cap_enhe(peer)) nhafi = AFI_IP6; - if (paf->safi == SAFI_MPLS_VPN && /* if VPN && not global */ - nhlen != BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) - nhafi = AFI_MAX; /* no change allowed */ } if (nhafi == AFI_IP) { struct in_addr v4nh, *mod_v4nh; int nh_modified = 0; + size_t offset_nh = vec->offset + 1; route_map_sets_nh = (CHECK_FLAG (vec->flags, BPKT_ATTRVEC_FLAGS_RMAP_IPV4_NH_CHANGED) || CHECK_FLAG (vec->flags, BPKT_ATTRVEC_FLAGS_RMAP_NH_PEER_ADDRESS)); - stream_get_from (&v4nh, s, vec->offset + 1, 4); + switch (nhlen) + { + case BGP_ATTR_NHLEN_IPV4: + break; + case BGP_ATTR_NHLEN_VPNV4: + offset_nh += 8; + break; + default: + /* TODO: handle IPv6 nexthops */ + zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP): %u", + __func__, peer->host, nhlen); + return NULL; + } + + stream_get_from (&v4nh, s, offset_nh, IPV4_MAX_BYTELEN); mod_v4nh = &v4nh; /* @@ -482,7 +494,7 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } if (nh_modified) /* allow for VPN RD */ - stream_put_in_addr_at (s, vec->offset + 1 + nhlen - 4, mod_v4nh); + stream_put_in_addr_at (s, offset_nh, mod_v4nh); if (bgp_debug_update(peer, NULL, NULL, 0)) zlog_debug ("u%" PRIu64 ":s%" PRIu64 " %s send UPDATE w/ nexthop %s%s", @@ -495,6 +507,8 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) struct in6_addr v6nhglobal, *mod_v6nhg; struct in6_addr v6nhlocal, *mod_v6nhl; int gnh_modified, lnh_modified; + size_t offset_nhglobal = vec->offset + 1; + size_t offset_nhlocal = vec->offset + 1; gnh_modified = lnh_modified = 0; mod_v6nhg = &v6nhglobal; @@ -509,7 +523,28 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) * additional work being to handle 1 or 2 nexthops. Also, 3rd * party nexthop is not propagated for EBGP right now. */ - stream_get_from (&v6nhglobal, s, vec->offset + 1, 16); + switch (nhlen) + { + case BGP_ATTR_NHLEN_IPV6_GLOBAL: + break; + case BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL: + offset_nhlocal += IPV6_MAX_BYTELEN; + break; + case BGP_ATTR_NHLEN_VPNV6_GLOBAL: + offset_nhglobal += 8; + break; + case BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL: + offset_nhglobal += 8; + offset_nhlocal += 8 * 2 + IPV6_MAX_BYTELEN; + break; + default: + /* TODO: handle IPv4 nexthops */ + zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP6): %u", + __func__, peer->host, nhlen); + return NULL; + } + + stream_get_from (&v6nhglobal, s, offset_nhglobal, IPV6_MAX_BYTELEN); if (route_map_sets_nh) { if (CHECK_FLAG(vec->flags, @@ -536,9 +571,10 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } - if (nhlen == 32 || nhlen == 48) /* 48 == VPN */ + if (nhlen == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL || + nhlen == BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) { - stream_get_from (&v6nhlocal, s, vec->offset + 1 + (nhlen-IPV6_MAX_BYTELEN), IPV6_MAX_BYTELEN); + stream_get_from (&v6nhlocal, s, offset_nhlocal, IPV6_MAX_BYTELEN); if (IN6_IS_ADDR_UNSPECIFIED (&v6nhlocal)) { mod_v6nhl = &peer->nexthop.v6_local; @@ -547,9 +583,9 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf) } if (gnh_modified) - stream_put_in6_addr_at (s, vec->offset + 1, mod_v6nhg); + stream_put_in6_addr_at (s, offset_nhglobal, mod_v6nhg); if (lnh_modified) - stream_put_in6_addr_at (s, vec->offset + 1 + (nhlen-IPV6_MAX_BYTELEN), mod_v6nhl); + stream_put_in6_addr_at (s, offset_nhlocal, mod_v6nhl); if (bgp_debug_update(peer, NULL, NULL, 0)) { From 1d6664e090f883a4971a548f6c7cf07896238309 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 20 May 2017 16:50:52 +0200 Subject: [PATCH 158/193] vtysh: fix autocompletion API misuse I forgot to update this call when I changed cmd_variable_handler_register to take an array... Signed-off-by: David Lamparter --- vtysh/vtysh.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 19b8f2fd8b..2eee7a6897 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -3239,11 +3239,15 @@ static void vtysh_autocomplete(vector comps, struct cmd_token *token) vtysh_ac_line, comps); } -static const struct cmd_variable_handler vtysh_var_handler = { +static const struct cmd_variable_handler vtysh_var_handler[] = { + { /* match all */ .tokenname = NULL, .varname = NULL, .completions = vtysh_autocomplete + }, { + .completions = NULL + } }; void @@ -3256,7 +3260,7 @@ vtysh_init_vty (void) /* Initialize commands. */ cmd_init (0); - cmd_variable_handler_register(&vtysh_var_handler); + cmd_variable_handler_register(vtysh_var_handler); /* Install nodes. */ install_node (&bgp_node, NULL); From 8f599166fb5896224d5b0ec835be4e6b8c496d3e Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 22 May 2017 02:12:05 +0000 Subject: [PATCH 159/193] ospf6d: fix use-after-free ospf6_route_remove may free the ospf6_route passed to it if the refcount reaches zero, in which case zeroing the ->flag field constitutes a uaf Signed-off-by: Quentin Young --- ospf6d/ospf6_intra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 6461963856..5dd10b4c72 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1455,13 +1455,14 @@ ospf6_intra_route_calculation (struct ospf6_area *oa) { if (hook_add) (*hook_add) (route); + route->flag = 0; } else { /* Redo the summaries as things might have changed */ ospf6_abr_originate_summary (route); + route->flag = 0; } - route->flag = 0; } if (IS_OSPF6_DEBUG_EXAMIN (INTRA_PREFIX)) From fb12f2c75f812a546b891266ee7a278ecc1804e3 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 22 May 2017 02:26:16 +0000 Subject: [PATCH 160/193] lib: fix array sizes for capability map incorrect array sizes causing out of bounds read and potentially incorrect capability settings introduced in 1b322039 Signed-off-by: Quentin Young --- lib/privs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/privs.c b/lib/privs.c index decd4bb7db..c25310c8d3 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -105,7 +105,7 @@ static struct #ifdef HAVE_LCAPS /* Quagga -> Linux capabilities mappings */ [ZCAP_SETID] = { 2, (pvalue_t []) { CAP_SETGID, CAP_SETUID }, }, - [ZCAP_BIND] = { 2, (pvalue_t []) { CAP_NET_BIND_SERVICE }, }, + [ZCAP_BIND] = { 1, (pvalue_t []) { CAP_NET_BIND_SERVICE }, }, [ZCAP_NET_ADMIN] = { 1, (pvalue_t []) { CAP_NET_ADMIN }, }, [ZCAP_NET_RAW] = { 1, (pvalue_t []) { CAP_NET_RAW }, }, [ZCAP_CHROOT] = { 1, (pvalue_t []) { CAP_SYS_CHROOT, }, }, @@ -130,7 +130,7 @@ static struct [ZCAP_CHROOT] = { 1, (pvalue_t []) { PRIV_PROC_CHROOT }, }, [ZCAP_NICE] = { 1, (pvalue_t []) { PRIV_PROC_PRIOCNTL }, }, [ZCAP_PTRACE] = { 1, (pvalue_t []) { PRIV_PROC_SESSION }, }, - [ZCAP_DAC_OVERRIDE] = { 2, (pvalue_t []) { PRIV_FILE_DAC_EXECUTE, + [ZCAP_DAC_OVERRIDE] = { 5, (pvalue_t []) { PRIV_FILE_DAC_EXECUTE, PRIV_FILE_DAC_READ, PRIV_FILE_DAC_SEARCH, PRIV_FILE_DAC_WRITE, From acb25e73f4fec8ce22e565febfb83e188a540f8e Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Mon, 22 May 2017 19:56:11 +0000 Subject: [PATCH 161/193] zebra: one "show ip route" to rule them all Signed-off-by: Daniel Walton --- zebra/zebra_vty.c | 1337 ++++++++------------------------------------- 1 file changed, 240 insertions(+), 1097 deletions(-) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index eedd38f3f9..d0d761af95 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -45,7 +45,9 @@ extern int allow_delete; static int do_show_ip_route(struct vty *vty, const char *vrf_name, - safi_t safi, bool use_fib, u_char use_json); + afi_t afi, safi_t safi, bool use_fib, u_char use_json, + route_tag_t tag, struct prefix *longer_prefix_p, + bool supernets_only, int type, u_short ospf_instance_id); static void vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast); @@ -298,12 +300,14 @@ DEFUN (no_ip_multicast_mode, DEFUN (show_ip_rpf, show_ip_rpf_cmd, - "show ip rpf", + "show ip rpf [json]", SHOW_STR IP_STR - "Display RPF information for multicast source\n") + "Display RPF information for multicast source\n" + JSON_STR) { - return do_show_ip_route(vty, VRF_DEFAULT_NAME, SAFI_MULTICAST, false, 0); + int uj = use_json(argc, argv); + return do_show_ip_route (vty, VRF_DEFAULT_NAME, AFI_IP, SAFI_MULTICAST, false, uj, 0, NULL, false, -1, 0); } DEFUN (show_ip_rpf_addr, @@ -1085,22 +1089,11 @@ use_fib (struct cmd_token *token) return strncmp(token->arg, "route", strlen(token->arg)); } -DEFUN (show_ip_route, - show_ip_route_cmd, - "show ip [json]", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - JSON_STR) -{ - return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, - use_fib(argv[2]), use_json(argc, argv)); -} - static int -do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, - bool use_fib, u_char use_json) +do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi, + bool use_fib, u_char use_json, route_tag_t tag, + struct prefix *longer_prefix_p, bool supernets_only, + int type, u_short ospf_instance_id) { struct route_table *table; struct route_node *rn; @@ -1110,6 +1103,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, char buf[BUFSIZ]; json_object *json = NULL; json_object *json_prefix = NULL; + u_int32_t addr; if (!(zvrf = zebra_vrf_lookup_by_name (vrf_name))) { @@ -1129,7 +1123,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, return CMD_SUCCESS; } - table = zebra_vrf_table (AFI_IP, safi, zvrf_id (zvrf)); + table = zebra_vrf_table (afi, safi, zvrf_id (zvrf)); if (! table) { if (use_json) @@ -1138,71 +1132,84 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, } if (use_json) - { json = json_object_new_object(); - /* Show all IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) + /* Show all routes. */ + for (rn = route_top (table); rn; rn = route_next (rn)) + { + RNODE_FOREACH_RIB (rn, rib) { - RNODE_FOREACH_RIB (rn, rib) + if (use_fib && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) + continue; + + if (tag && rib->tag != tag) + continue; + + if (longer_prefix_p && ! prefix_match (longer_prefix_p, &rn->p)) + continue; + + /* This can only be true when the afi is IPv4 */ + if (supernets_only) { - if (use_fib && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) + addr = ntohl (rn->p.u.prefix4.s_addr); + + if (IN_CLASSC (addr) && rn->p.prefixlen >= 24) continue; + + if (IN_CLASSB (addr) && rn->p.prefixlen >= 16) + continue; + + if (IN_CLASSA (addr) && rn->p.prefixlen >= 8) + continue; + } + + if (type && rib->type != type) + continue; + + if (ospf_instance_id && (rib->type != ZEBRA_ROUTE_OSPF || rib->instance != ospf_instance_id)) + continue; + + if (use_json) + { if (!json_prefix) json_prefix = json_object_new_array(); - vty_show_ip_route (vty, rn, rib, json_prefix); + } + else + { + if (first) + { + if (afi == AFI_IP) + vty_out (vty, SHOW_ROUTE_V4_HEADER); + else + vty_out (vty, SHOW_ROUTE_V6_HEADER); + + if (zvrf_id (zvrf) != VRF_DEFAULT) + vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); + + first = 0; + } } - if (json_prefix) - { - prefix2str (&rn->p, buf, sizeof buf); - json_object_object_add(json, buf, json_prefix); - json_prefix = NULL; - } + vty_show_ip_route (vty, rn, rib, json_prefix); } + if (json_prefix) + { + prefix2str (&rn->p, buf, sizeof buf); + json_object_object_add(json, buf, json_prefix); + json_prefix = NULL; + } + } + + if (use_json) + { vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTY_NEWLINE); json_object_free(json); } - else - { - /* Show all IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - { - RNODE_FOREACH_RIB (rn, rib) - { - if (use_fib && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - } return CMD_SUCCESS; } -DEFUN (show_ip_route_vrf, - show_ip_route_vrf_cmd, - "show ip vrf NAME [json]", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_CMD_HELP_STR - JSON_STR) -{ - int idx_vrf = 4; - bool uf = use_fib(argv[2]); - u_char uj = use_json(argc, argv); - - return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uf, uj); -} - DEFUN (show_ip_nht, show_ip_nht_cmd, "show ip nht [vrf NAME]", @@ -1345,258 +1352,115 @@ DEFUN (no_ipv6_nht_default_route, return CMD_SUCCESS; } -DEFUN (show_ip_route_tag, - show_ip_route_tag_cmd, - "show ip [vrf NAME] tag (1-4294967295)", +// dwalton one "show ip route" to rule them all +DEFUN (show_ip_route, + show_ip_route_cmd, + "show ip [vrf NAME] [tag (1-4294967295)|A.B.C.D/M longer-prefixes|supernets-only|" FRR_IP_REDIST_STR_ZEBRA "|ospf (1-65535)] [json]", SHOW_STR IP_STR "IP forwarding table\n" "IP routing table\n" VRF_CMD_HELP_STR "Show only routes with tag\n" - "Tag value\n") + "Tag value\n" + "IP prefix /, e.g., 35.0.0.0/8\n" + "Show route matching the specified Network/Mask pair only\n" + "Show supernet entries only\n" + FRR_IP_REDIST_HELP_STR_ZEBRA + "Open Shortest Path First (OSPFv2)\n" + "Instance ID\n" + JSON_STR) { bool uf = use_fib(argv[2]); - int idx_vrf = 3; - int idx_name = 4; - int idx_tag = 6; struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; + int vrf_all = 0; route_tag_t tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - - if (strmatch(argv[idx_vrf]->text, "vrf")) - { - VRF_GET_ID (vrf_id, argv[idx_name]->arg); - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_tag]->arg, 0, 4294967295); - } - else - { - idx_tag -= 2; - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_tag]->arg, 0, 4294967295); - } - - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; - - /* Show all IPv4 routes with matching tag value. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (rib->tag != tag) - continue; - - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_prefix_longer, - show_ip_route_prefix_longer_cmd, - "show ip [vrf NAME] A.B.C.D/M longer-prefixes", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_CMD_HELP_STR - "IP prefix /, e.g., 35.0.0.0/8\n" - "Show route matching the specified Network/Mask pair only\n") -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct prefix p; - int ret; - int first = 1; - bool uf = use_fib(argv[2]); - vrf_id_t vrf_id = VRF_DEFAULT; - - if (strmatch(argv[3]->text, "vrf")) - { - VRF_GET_ID (vrf_id, argv[4]->arg); - ret = str2prefix (argv[5]->arg, &p); - } - else - { - ret = str2prefix (argv[3]->arg, &p); - } - - if (! ret) - { - vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); - return CMD_WARNING; - } - - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; - - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (prefix_match (&p, &rn->p)) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_supernets, - show_ip_route_supernets_cmd, - "show ip [vrf NAME] supernets-only", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_CMD_HELP_STR - "Show supernet entries only\n") -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - u_int32_t addr; - int first = 1; - vrf_id_t vrf_id = VRF_DEFAULT; - bool uf = use_fib(argv[2]); - - if (strmatch(argv[3]->text, "vrf")) - VRF_GET_ID (vrf_id, argv[4]->arg); - - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; - - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - addr = ntohl (rn->p.u.prefix4.s_addr); - - if ((IN_CLASSC (addr) && rn->p.prefixlen < 24) - || (IN_CLASSB (addr) && rn->p.prefixlen < 16) - || (IN_CLASSA (addr) && rn->p.prefixlen < 8)) - { - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_protocol, - show_ip_route_protocol_cmd, - "show ip [vrf NAME] " FRR_IP_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_CMD_HELP_STR - FRR_IP_REDIST_HELP_STR_ZEBRA) -{ - int type; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; - vrf_id_t vrf_id = VRF_DEFAULT; - bool uf = use_fib(argv[2]); - + struct vrf *vrf; + struct zebra_vrf *zvrf; + int uj = use_json(argc, argv); int idx = 0; - if (argv_find (argv, argc, "NAME", &idx)) - VRF_GET_ID (vrf_id, argv[idx]->arg); + struct prefix p; + bool longer_prefixes = false; + bool supernets_only = false; + int type = 0; + u_short ospf_instance_id = 0; - char *proto = argv[argc - 1]->text; - type = proto_redistnum (AFI_IP, proto); - - if (type < 0) + if (argv_find (argv, argc, "vrf", &idx)) { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); - return CMD_WARNING; + if (strmatch(argv[idx+1]->arg, "all")) + vrf_all = 1; + else + VRF_GET_ID (vrf_id, argv[idx+1]->arg); } - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; + if (argv_find (argv, argc, "tag", &idx)) + VTY_GET_INTEGER_RANGE("tag", tag, argv[idx+1]->arg, 0, 4294967295); - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (rib->type == type) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - return CMD_SUCCESS; -} + else if (argv_find (argv, argc, "A.B.C.D/M", &idx)) + { + str2prefix (argv[idx]->arg, &p); + longer_prefixes = true; + } + else if (argv_find (argv, argc, "supernets_only", &idx)) + supernets_only = true; -DEFUN (show_ip_route_ospf_instance, - show_ip_route_ospf_instance_cmd, - "show ip ospf (1-65535)", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - "Open Shortest Path First (OSPFv2)\n" - "Instance ID\n") -{ - int idx_number = 4; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; - u_short instance = 0; - bool uf = use_fib(argv[2]); + else + { + if (argv_find (argv, argc, "kernel", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "connected", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "static", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "rip", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "ospf", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "isis", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "bgp", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "pim", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "eigrp", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "nhrp", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "table", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); + else if (argv_find (argv, argc, "vnc", &idx)) + type = proto_redistnum (AFI_IP, argv[idx]->text); - VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg); + if (argv_find (argv, argc, "(1-65535)", &idx)) + VTY_GET_INTEGER ("Instance", ospf_instance_id, argv[idx]->arg); - table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); - if (! table) - return CMD_SUCCESS; + if (type < 0) + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); + return CMD_WARNING; + } + } - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (rib->type == ZEBRA_ROUTE_OSPF && rib->instance == instance) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } + if (vrf_all) + { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) + { + if ((zvrf = vrf->info) == NULL || + (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) + continue; + + do_show_ip_route (vty, zvrf_name (zvrf), AFI_IP, SAFI_UNICAST, uf, uj, tag, + longer_prefixes ? &p : NULL, supernets_only, type, ospf_instance_id); + } + } + else + { + vrf = vrf_lookup_by_id (vrf_id); + do_show_ip_route (vty, vrf->name, AFI_IP, SAFI_UNICAST, uf, uj, tag, + longer_prefixes ? &p : NULL, supernets_only, type, ospf_instance_id); + } return CMD_SUCCESS; } @@ -1900,294 +1764,6 @@ DEFUN (show_ip_route_summary_prefix, } -DEFUN (show_ip_route_vrf_all, - show_ip_route_vrf_all_cmd, - "show ip vrf all", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_ALL_CMD_HELP_STR) -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) - continue; - - /* Show all IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_vrf_all_tag, - show_ip_route_vrf_all_tag_cmd, - "show ip vrf all tag (1-4294967295)", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_ALL_CMD_HELP_STR - "Show only routes with tag\n" - "Tag value\n") -{ - int idx_number = 6; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - route_tag_t tag = 0; - bool uf = use_fib(argv[2]); - - if (argv[idx_number]->arg) - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_number]->arg, 0, 4294967295); - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) - continue; - - /* Show all IPv4 routes with matching tag value. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (rib->tag != tag) - continue; - - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_vrf_all_prefix_longer, - show_ip_route_vrf_all_prefix_longer_cmd, - "show ip vrf all A.B.C.D/M longer-prefixes", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_ALL_CMD_HELP_STR - "IP prefix /, e.g., 35.0.0.0/8\n" - "Show route matching the specified Network/Mask pair only\n") -{ - int idx_ipv4_prefixlen = 5; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct prefix p; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int ret; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p); - if (! ret) - { - vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); - return CMD_WARNING; - } - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) - continue; - - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (prefix_match (&p, &rn->p)) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_vrf_all_supernets, - show_ip_route_vrf_all_supernets_cmd, - "show ip vrf all supernets-only", - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_ALL_CMD_HELP_STR - "Show supernet entries only\n") -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - u_int32_t addr; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) - continue; - - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - - addr = ntohl (rn->p.u.prefix4.s_addr); - - if ((IN_CLASSC (addr) && rn->p.prefixlen < 24) - || (IN_CLASSB (addr) && rn->p.prefixlen < 16) - || (IN_CLASSA (addr) && rn->p.prefixlen < 8)) - { - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ip_route_vrf_all_protocol, - show_ip_route_vrf_all_protocol_cmd, - "show ip vrf all " FRR_IP_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IP forwarding table\n" - "IP routing table\n" - VRF_ALL_CMD_HELP_STR - FRR_IP_REDIST_HELP_STR_ZEBRA"\n") -{ - int type; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - char *proto = argv[argc - 1]->text; - type = proto_redistnum (AFI_IP, proto); - - if (type < 0) - { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); - return CMD_WARNING; - } - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP][SAFI_UNICAST]) == NULL) - continue; - - /* Show matched type IPv4 routes. */ - for (rn = route_top (table); rn; rn = route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (rib->type == type) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V4_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - DEFUN (show_ip_route_vrf_all_addr, show_ip_route_vrf_all_addr_cmd, "show ip route vrf all A.B.C.D", @@ -2978,278 +2554,101 @@ DEFUN (no_ipv6_route_ifname_flags, tag, distance, vrf, NULL); } +// dwalton duplicate to here DEFUN (show_ipv6_route, show_ipv6_route_cmd, - "show ipv6 [vrf NAME] [json]", + "show ipv6 [vrf NAME] [tag (1-4294967295)|X:X::X:X/M longer-prefixes|" FRR_IP6_REDIST_STR_ZEBRA "] [json]", SHOW_STR IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "Output JSON\n") -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; - vrf_id_t vrf_id = VRF_DEFAULT; - struct zebra_vrf *zvrf = NULL; - char buf[SRCDEST2STR_BUFFER]; - json_object *json = NULL; - json_object *json_prefix = NULL; - bool uf = use_fib(argv[2]); - - int vrf = (argc > 3 && strmatch (argv[3]->text, "vrf")); - int uj = vrf ? argc == 6 : argc == 4; - char *vrfname = vrf ? argv[4]->arg : NULL; - - if (vrf) - { - if (!(zvrf = zebra_vrf_lookup_by_name (vrfname))) - { - if (uj) - vty_out (vty, "{}%s", VTY_NEWLINE); - else - vty_out (vty, "vrf %s not defined%s", vrfname, VTY_NEWLINE); - return CMD_SUCCESS; - } - - if (zvrf_id (zvrf) == VRF_UNKNOWN) - { - if (uj) - vty_out (vty, "{}%s", VTY_NEWLINE); - else - vty_out (vty, "vrf %s inactive%s", vrfname, VTY_NEWLINE); - return CMD_SUCCESS; - } - else - vrf_id = zvrf_id (zvrf); - } - - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); - if (!table) - { - if (uj) - vty_out (vty, "{}%s", VTY_NEWLINE); - return CMD_SUCCESS; - } - - if (uj) - { - json = json_object_new_object(); - - /* Show all IPv6 route. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - { - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (!json_prefix) - json_prefix = json_object_new_array(); - vty_show_ip_route (vty, rn, rib, json_prefix); - } - - if (json_prefix) - { - srcdest_rnode2str (rn, buf, sizeof buf); - json_object_object_add(json, buf, json_prefix); - json_prefix = NULL; - } - } - - vty_out (vty, "%s%s", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY), VTY_NEWLINE); - json_object_free(json); - } - else - { - /* Show all IPv6 route. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - { - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - } - - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_tag, - show_ipv6_route_tag_cmd, - "show ipv6 [vrf NAME] tag (1-4294967295)", - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" + "IP forwarding table\n" + "IP routing table\n" VRF_CMD_HELP_STR "Show only routes with tag\n" - "Tag value\n") + "Tag value\n" + "IPv6 prefix\n" + "Show route matching the specified Network/Mask pair only\n" + FRR_IP6_REDIST_HELP_STR_ZEBRA + JSON_STR) { - int idx_vrf = 3; - int idx_name = 4; - int idx_tag = 6; + bool uf = use_fib(argv[2]); struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; + int vrf_all = 0; route_tag_t tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - bool uf = use_fib(argv[2]); - - if (strmatch(argv[idx_vrf]->text, "vrf")) - { - VRF_GET_ID (vrf_id, argv[idx_name]->arg); - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_tag]->arg, 0, 4294967295); - } - else - { - idx_tag -= 2; - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_tag]->arg, 0, 4294967295); - } - - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; - - /* Show all IPv6 routes with matching tag value. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (rib->tag != tag) - continue; - - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_prefix_longer, - show_ipv6_route_prefix_longer_cmd, - "show ipv6 [vrf NAME] X:X::X:X/M longer-prefixes", - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "IPv6 prefix\n" - "Show route matching the specified Network/Mask pair only\n") -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct prefix p; - int ret; - int first = 1; - vrf_id_t vrf_id = VRF_DEFAULT; - bool uf = use_fib(argv[2]); - - if (strmatch(argv[3]->text, "vrf")) - { - VRF_GET_ID (vrf_id, argv[4]->arg); - ret = str2prefix (argv[5]->arg, &p); - } - else - { - ret = str2prefix (argv[3]->arg, &p); - } - - if (! ret) - { - vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); - return CMD_WARNING; - } - - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; - - /* Show matched type IPv6 routes. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - struct prefix *p, *src_p; - srcdest_rnode_prefixes(rn, &p, &src_p); - - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (prefix_match (p, &rn->p)) - { - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_protocol, - show_ipv6_route_protocol_cmd, - "show ipv6 [vrf NAME] " FRR_IP6_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_CMD_HELP_STR - FRR_IP6_REDIST_HELP_STR_ZEBRA) -{ - int type; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - int first = 1; - vrf_id_t vrf_id = VRF_DEFAULT; - bool uf = use_fib(argv[2]); - + struct vrf *vrf; + struct zebra_vrf *zvrf; + int uj = use_json(argc, argv); int idx = 0; - if (argv_find (argv, argc, "NAME", &idx)) - VRF_GET_ID (vrf_id, argv[idx]->arg); + struct prefix p; + bool longer_prefixes = false; + bool supernets_only = false; + int type = 0; - char *proto = argv[argc - 1]->text; - type = proto_redistnum (AFI_IP6, proto); - - if (type < 0) + if (argv_find (argv, argc, "vrf", &idx)) { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); - return CMD_WARNING; + if (strmatch(argv[idx+1]->arg, "all")) + vrf_all = 1; + else + VRF_GET_ID (vrf_id, argv[idx+1]->arg); } - table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); - if (! table) - return CMD_SUCCESS; + if (argv_find (argv, argc, "tag", &idx)) + VTY_GET_INTEGER_RANGE("tag", tag, argv[idx+1]->arg, 0, 4294967295); - /* Show matched type IPv6 routes. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (rib->type == type) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } + else if (argv_find (argv, argc, "X:X::X:X/M", &idx)) + { + str2prefix (argv[idx]->arg, &p); + longer_prefixes = true; + } + + else + { + if (argv_find (argv, argc, "kernel", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "connected", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "static", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "ripng", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "ospf6", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "isis", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "bgp", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "nhrp", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "table", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + else if (argv_find (argv, argc, "vnc", &idx)) + type = proto_redistnum (AFI_IP6, argv[idx]->text); + + if (type < 0) + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); + return CMD_WARNING; + } + } + + if (vrf_all) + { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) + { + if ((zvrf = vrf->info) == NULL || + (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL) + continue; + + do_show_ip_route (vty, zvrf_name (zvrf), AFI_IP6, SAFI_UNICAST, uf, uj, tag, + longer_prefixes ? &p : NULL, supernets_only, type, 0); + } + } + else + { + vrf = vrf_lookup_by_id (vrf_id); + do_show_ip_route (vty, vrf->name, AFI_IP6, SAFI_UNICAST, uf, uj, tag, + longer_prefixes ? &p : NULL, supernets_only, type, 0); + } return CMD_SUCCESS; } @@ -3442,242 +2841,6 @@ DEFUN (show_ipv6_mroute, return CMD_SUCCESS; } - -DEFUN (show_ipv6_route_vrf_all, - show_ipv6_route_vrf_all_cmd, - "show ipv6 vrf all", - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_ALL_CMD_HELP_STR) -{ - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL) - continue; - - /* Show all IPv6 route. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_vrf_all_tag, - show_ipv6_route_vrf_all_tag_cmd, - "show ipv6 vrf all tag (1-4294967295)", - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_ALL_CMD_HELP_STR - "Show only routes with tag\n" - "Tag value\n") -{ - int idx_number = 6; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - route_tag_t tag = 0; - bool uf = use_fib(argv[2]); - - if (argv[idx_number]->arg) - VTY_GET_INTEGER_RANGE("tag", tag, argv[idx_number]->arg, 0, 4294967295); - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL) - continue; - - /* Show all IPv6 routes with matching tag value. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (rib->tag != tag) - continue; - - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_vrf_all_prefix_longer, - show_ipv6_route_vrf_all_prefix_longer_cmd, - "show ipv6 vrf all X:X::X:X/M longer-prefixes", - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_ALL_CMD_HELP_STR - "IPv6 prefix\n" - "Show route matching the specified Network/Mask pair only\n") -{ - int idx_ipv6_prefixlen = 5; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct prefix p; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int ret; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p); - if (! ret) - { - vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); - return CMD_WARNING; - } - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL) - continue; - - /* Show matched type IPv6 routes. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - { - struct prefix *p, *src_p; - srcdest_rnode_prefixes(rn, &p, &src_p); - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (prefix_match (p, &rn->p)) - { - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - -DEFUN (show_ipv6_route_vrf_all_protocol, - show_ipv6_route_vrf_all_protocol_cmd, - "show ipv6 vrf all " FRR_IP6_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IPv6 forwarding table\n" - "IPv6 routing table\n" - VRF_ALL_CMD_HELP_STR - FRR_IP6_REDIST_HELP_STR_ZEBRA) -{ - int type; - struct route_table *table; - struct route_node *rn; - struct rib *rib; - struct vrf *vrf; - struct zebra_vrf *zvrf; - int first = 1; - int vrf_header = 1; - bool uf = use_fib(argv[2]); - - char *proto = argv[argc - 1]->text; - type = proto_redistnum (AFI_IP6, proto); - - if (type < 0) - { - vty_out (vty, "Unknown route type%s", VTY_NEWLINE); - return CMD_WARNING; - } - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) - { - if ((zvrf = vrf->info) == NULL || - (table = zvrf->table[AFI_IP6][SAFI_UNICAST]) == NULL) - continue; - - /* Show matched type IPv6 routes. */ - for (rn = route_top (table); rn; rn = srcdest_route_next (rn)) - RNODE_FOREACH_RIB (rn, rib) - if (rib->type == type) - { - if (uf && !CHECK_FLAG(rib->status, RIB_ENTRY_SELECTED_FIB)) - continue; - if (first) - { - vty_out (vty, SHOW_ROUTE_V6_HEADER); - first = 0; - } - - if (vrf_header) - { - vty_out (vty, "%sVRF %s:%s", VTY_NEWLINE, zvrf_name (zvrf), VTY_NEWLINE); - vrf_header = 0; - } - vty_show_ip_route (vty, rn, rib, NULL); - } - vrf_header = 1; - } - - return CMD_SUCCESS; -} - DEFUN (show_ipv6_route_vrf_all_addr, show_ipv6_route_vrf_all_addr_cmd, "show ipv6 route vrf all X:X::X:X", @@ -4034,17 +3197,12 @@ zebra_vty_init (void) install_element (VIEW_NODE, &show_vrf_cmd); install_element (VIEW_NODE, &show_ip_route_cmd); - install_element (VIEW_NODE, &show_ip_route_ospf_instance_cmd); - install_element (VIEW_NODE, &show_ip_route_tag_cmd); install_element (VIEW_NODE, &show_ip_nht_cmd); install_element (VIEW_NODE, &show_ip_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_nht_cmd); install_element (VIEW_NODE, &show_ipv6_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ip_route_addr_cmd); install_element (VIEW_NODE, &show_ip_route_prefix_cmd); - install_element (VIEW_NODE, &show_ip_route_prefix_longer_cmd); - install_element (VIEW_NODE, &show_ip_route_protocol_cmd); - install_element (VIEW_NODE, &show_ip_route_supernets_cmd); install_element (VIEW_NODE, &show_ip_route_summary_cmd); install_element (VIEW_NODE, &show_ip_route_summary_prefix_cmd); @@ -4056,15 +3214,8 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_flags_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_cmd); - - install_element (VIEW_NODE, &show_ip_route_vrf_all_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_all_tag_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_addr_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_prefix_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_all_prefix_longer_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_all_protocol_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_all_supernets_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_summary_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_summary_prefix_cmd); @@ -4081,25 +3232,17 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &ipv6_nht_default_route_cmd); install_element (CONFIG_NODE, &no_ipv6_nht_default_route_cmd); install_element (VIEW_NODE, &show_ipv6_route_cmd); - install_element (VIEW_NODE, &show_ipv6_route_tag_cmd); install_element (VIEW_NODE, &show_ipv6_route_summary_cmd); install_element (VIEW_NODE, &show_ipv6_route_summary_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_protocol_cmd); install_element (VIEW_NODE, &show_ipv6_route_addr_cmd); install_element (VIEW_NODE, &show_ipv6_route_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_prefix_longer_cmd); - install_element (VIEW_NODE, &show_ipv6_mroute_cmd); /* Commands for VRF */ - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_tag_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_protocol_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_addr_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_prefix_longer_cmd); install_element (VIEW_NODE, &show_ipv6_mroute_vrf_all_cmd); } From 93b9c666177ac8a6e2709f0f17c6c9b4e863c58e Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:00:53 -0400 Subject: [PATCH 162/193] lib: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- lib/command.c | 6 ------ lib/command.h | 2 -- lib/vty.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/lib/command.c b/lib/command.c index ff921ff402..4912461adb 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1047,8 +1047,6 @@ node_parent ( enum node_type node ) { case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1416,8 +1414,6 @@ cmd_exit (struct vty *vty) case BGP_IPV4M_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1481,8 +1477,6 @@ DEFUN (config_end, case RIP_NODE: case RIPNG_NODE: case BGP_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: diff --git a/lib/command.h b/lib/command.h index d62f7655ee..223f028144 100644 --- a/lib/command.h +++ b/lib/command.h @@ -98,8 +98,6 @@ enum node_type BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */ BGP_IPV6_NODE, /* BGP IPv6 address family */ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */ - BGP_ENCAP_NODE, /* BGP ENCAP SAFI */ - BGP_ENCAPV6_NODE, /* BGP ENCAP SAFI */ BGP_VRF_POLICY_NODE, /* BGP VRF policy */ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */ diff --git a/lib/vty.c b/lib/vty.c index 36755b1d95..e7e0f17e67 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -737,8 +737,6 @@ vty_end_config (struct vty *vty) case BGP_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: From b61410ebd5b58175caf5a5fea12d585308790a99 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:09 -0400 Subject: [PATCH 163/193] vtysh: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- vtysh/vtysh.c | 56 --------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 337925c6e8..24ac9675e8 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -306,7 +306,6 @@ vtysh_execute_func (const char *line, int pager) if (ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON || ret == CMD_WARNING) { if ((saved_node == BGP_VPNV4_NODE || saved_node == BGP_VPNV6_NODE - || saved_node == BGP_ENCAP_NODE || saved_node == BGP_ENCAPV6_NODE || saved_node == BGP_IPV4_NODE || saved_node == BGP_IPV6_NODE || saved_node == BGP_IPV4M_NODE || saved_node == BGP_IPV6M_NODE || saved_node == BGP_EVPN_NODE) @@ -927,18 +926,6 @@ static struct cmd_node bgp_vpnv6_node = "%s(config-router-af)# " }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af)# " -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af)# " -}; - static struct cmd_node bgp_ipv4_node = { BGP_IPV4_NODE, @@ -1137,31 +1124,6 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } -DEFUNSH (VTYSH_BGPD, - address_family_encapv4, - address_family_encapv4_cmd, - "address-family [ipv4] ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - -DEFUNSH (VTYSH_BGPD, - address_family_encapv6, - address_family_encapv6_cmd, - "address-family [ipv6] encapv6", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUNSH (VTYSH_BGPD, address_family_ipv4, address_family_ipv4_cmd, @@ -1548,8 +1510,6 @@ vtysh_exit (struct vty *vty) break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: case BGP_IPV6_NODE: @@ -1614,8 +1574,6 @@ DEFUNSH (VTYSH_BGPD, || vty->node == BGP_IPV4M_NODE || vty->node == BGP_VPNV4_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE) vty->node = BGP_NODE; @@ -3140,8 +3098,6 @@ vtysh_init_vty (void) install_node (&zebra_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); install_node (&bgp_ipv6_node, NULL); @@ -3178,8 +3134,6 @@ vtysh_init_vty (void) vtysh_install_default (ZEBRA_NODE); vtysh_install_default (BGP_VPNV4_NODE); vtysh_install_default (BGP_VPNV6_NODE); - vtysh_install_default (BGP_ENCAP_NODE); - vtysh_install_default (BGP_ENCAPV6_NODE); vtysh_install_default (BGP_IPV4_NODE); vtysh_install_default (BGP_IPV4M_NODE); vtysh_install_default (BGP_IPV6_NODE); @@ -3245,10 +3199,6 @@ vtysh_init_vty (void) install_element (BGP_VPNV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4M_NODE, &vtysh_exit_bgpd_cmd); @@ -3298,8 +3248,6 @@ vtysh_init_vty (void) install_element (BGP_IPV4M_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV4_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV6_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6M_NODE, &vtysh_end_all_cmd); install_element (BGP_VRF_POLICY_NODE, &vtysh_end_all_cmd); @@ -3349,8 +3297,6 @@ vtysh_init_vty (void) install_element (CONFIG_NODE, &router_bgp_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); - install_element (BGP_NODE, &address_family_encapv4_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); #if defined(ENABLE_BGP_VNC) install_element (BGP_NODE, &vnc_vrf_policy_cmd); install_element (BGP_NODE, &vnc_defaults_cmd); @@ -3366,8 +3312,6 @@ vtysh_init_vty (void) install_element (BGP_NODE, &address_family_evpn_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV4_NODE, &exit_address_family_cmd); install_element (BGP_IPV4M_NODE, &exit_address_family_cmd); install_element (BGP_IPV6_NODE, &exit_address_family_cmd); From 5f69e7a7acc4418c41c9c4f94cc6bf21f614c103 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:54 -0400 Subject: [PATCH 164/193] bgpd: remove support for ipv4|6 encap safi config Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 77 ------------------------ bgpd/bgp_vty.c | 148 +---------------------------------------------- 2 files changed, 2 insertions(+), 223 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 8764050b16..977eb5fd4c 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -202,78 +202,6 @@ bgp_nlri_parse_encap( return 0; } - -/* TBD: these routes should probably all be host routes */ - -/* For testing purpose, static route of ENCAP. */ -DEFUN (encap_network, - encap_network_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_ipv4 = 1; - int idx_rd = 3; - return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - NULL, 0, NULL, NULL, NULL, NULL); -} - -/* For testing purpose, static route of ENCAP. */ -DEFUN (no_encap_network, - no_encap_network_cmd, - "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - NO_STR - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n" - "BGP tag\n" - "tag value\n") -{ - int idx_ipv4 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - 0, NULL, NULL, NULL); -} - -DEFUN (encapv6_network, - encapv6_network_cmd, - "network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 1; - int idx_rd = 3; - int idx_rmap = 5; - const char *rmap_str = (argc == 6) ? argv[idx_rmap]->arg : NULL; - return bgp_static_set_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, rmap_str, 0, NULL, - NULL, NULL, NULL); -} - -DEFUN (no_encapv6_network, - no_encapv6_network_cmd, - "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - NO_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); -} - static int show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { @@ -792,11 +720,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, void bgp_encap_init (void) { - install_element (BGP_ENCAP_NODE, &encap_network_cmd); - install_element (BGP_ENCAP_NODE, &no_encap_network_cmd); - install_element (BGP_ENCAPV6_NODE, &encapv6_network_cmd); - install_element (BGP_ENCAPV6_NODE, &no_encapv6_network_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1372e820f9..4d00fc963f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -71,7 +71,6 @@ bgp_node_afi (struct vty *vty) case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAPV6_NODE: afi = AFI_IP6; break; case BGP_EVPN_NODE: @@ -92,10 +91,6 @@ bgp_node_safi (struct vty *vty) safi_t safi; switch (vty->node) { - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: - safi = SAFI_ENCAP; - break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: safi = SAFI_MPLS_VPN; @@ -5656,7 +5651,7 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as, DEFUN_NOSH (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 []", + "address-family ipv4 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -5669,9 +5664,6 @@ DEFUN_NOSH (address_family_ipv4_safi, case SAFI_MULTICAST: vty->node = BGP_IPV4M_NODE; break; - case SAFI_ENCAP: - vty->node = BGP_ENCAP_NODE; - break; case SAFI_MPLS_VPN: vty->node = BGP_VPNV4_NODE; break; @@ -5689,7 +5681,7 @@ DEFUN_NOSH (address_family_ipv4_safi, DEFUN_NOSH (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 []", + "address-family ipv6 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -5702,9 +5694,6 @@ DEFUN_NOSH (address_family_ipv6_safi, case SAFI_MULTICAST: vty->node = BGP_IPV6M_NODE; break; - case SAFI_ENCAP: - vty->node = BGP_ENCAPV6_NODE; - break; case SAFI_MPLS_VPN: vty->node = BGP_VPNV6_NODE; break; @@ -5744,28 +5733,6 @@ DEFUN_NOSH (address_family_vpnv6, } #endif -DEFUN_NOSH (address_family_encap, - address_family_encap_cmd, - "address-family ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - - -DEFUN_NOSH (address_family_encapv6, - address_family_encapv6_cmd, - "address-family encapv6", - "Enter Address Family command mode\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUN_NOSH (address_family_evpn, address_family_evpn_cmd, "address-family ", @@ -5789,8 +5756,6 @@ DEFUN_NOSH (exit_address_family, || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_EVPN_NODE) vty->node = BGP_NODE; return CMD_SUCCESS; @@ -10094,20 +10059,6 @@ static struct cmd_node bgp_vpnv6_node = 1 }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af-encap)# ", - 1 -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af-encapv6)# ", - 1 -}; - static struct cmd_node bgp_evpn_node = { BGP_EVPN_NODE, @@ -10128,8 +10079,6 @@ bgp_vty_init (void) install_node (&bgp_ipv6_multicast_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_evpn_node, NULL); /* Install default VTY commands to new nodes. */ @@ -10140,8 +10089,6 @@ bgp_vty_init (void) install_default (BGP_IPV6M_NODE); install_default (BGP_VPNV4_NODE); install_default (BGP_VPNV6_NODE); - install_default (BGP_ENCAP_NODE); - install_default (BGP_ENCAPV6_NODE); install_default (BGP_EVPN_NODE); /* "bgp multiple-instance" commands. */ @@ -10354,8 +10301,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &neighbor_activate_cmd); /* "no neighbor activate" commands. */ @@ -10366,8 +10311,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_activate_cmd); /* "neighbor peer-group" set commands. @@ -10383,8 +10326,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &neighbor_set_peer_group_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_set_peer_group_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_set_peer_group_cmd); /* "no neighbor peer-group unset" commands. */ install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd); @@ -10394,8 +10335,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_set_peer_group_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_set_peer_group_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_set_peer_group_cmd); /* "neighbor softreconfiguration inbound" commands.*/ install_element (BGP_NODE, &neighbor_soft_reconfiguration_cmd); @@ -10412,10 +10351,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_soft_reconfiguration_cmd); /* "neighbor attribute-unchanged" commands. */ install_element (BGP_NODE, &neighbor_attr_unchanged_cmd); @@ -10433,12 +10368,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_EVPN_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_attr_unchanged_cmd); @@ -10461,10 +10390,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_nexthop_self_cmd); /* "neighbor next-hop-self force" commands. */ install_element (BGP_NODE, &neighbor_nexthop_self_force_cmd); @@ -10555,10 +10480,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_replace_as_cmd); install_element (BGP_VPNV6_NODE, &neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_remove_private_as_cmd); /* "neighbor send-community" commands.*/ install_element (BGP_NODE, &neighbor_send_community_cmd); @@ -10589,14 +10510,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_send_community_type_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_type_cmd); /* "neighbor route-reflector" commands.*/ install_element (BGP_NODE, &neighbor_route_reflector_client_cmd); @@ -10613,10 +10526,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_reflector_client_cmd); /* "neighbor route-server" commands.*/ install_element (BGP_NODE, &neighbor_route_server_client_cmd); @@ -10633,10 +10542,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_server_client_cmd); /* "neighbor addpath-tx-all-paths" commands.*/ install_element (BGP_NODE, &neighbor_addpath_tx_all_paths_cmd); @@ -10759,10 +10664,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_weight_cmd); /* "neighbor override-capability" commands. */ install_element (BGP_NODE, &neighbor_override_capability_cmd); @@ -10803,10 +10704,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_distribute_list_cmd); /* "neighbor prefix-list" commands. */ install_element (BGP_NODE, &neighbor_prefix_list_cmd); @@ -10823,10 +10720,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_prefix_list_cmd); /* "neighbor filter-list" commands. */ install_element (BGP_NODE, &neighbor_filter_list_cmd); @@ -10843,10 +10736,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_filter_list_cmd); /* "neighbor route-map" commands. */ install_element (BGP_NODE, &neighbor_route_map_cmd); @@ -10863,10 +10752,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_map_cmd); /* "neighbor unsuppress-map" commands. */ install_element (BGP_NODE, &neighbor_unsuppress_map_cmd); @@ -10883,10 +10768,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_unsuppress_map_cmd); /* "neighbor maximum-prefix" commands. */ install_element (BGP_NODE, &neighbor_maximum_prefix_cmd); @@ -10939,22 +10820,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_cmd); - /* "neighbor allowas-in" */ install_element (BGP_NODE, &neighbor_allowas_in_cmd); install_element (BGP_NODE, &no_neighbor_allowas_in_cmd); @@ -10970,10 +10835,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_allowas_in_cmd); /* address-family commands. */ install_element (BGP_NODE, &address_family_ipv4_safi_cmd); @@ -10983,9 +10844,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_vpnv6_cmd); #endif /* KEEP_OLD_VPN_COMMANDS */ - install_element (BGP_NODE, &address_family_encap_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); - install_element (BGP_NODE, &address_family_evpn_cmd); /* "exit-address-family" command. */ @@ -10995,8 +10853,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &exit_address_family_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_EVPN_NODE, &exit_address_family_cmd); /* "clear ip bgp commands" */ From 3c6ba3ec027027af64440d502fd779401b46a847 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:02:31 -0400 Subject: [PATCH 165/193] bgpd rfapi: remove ability to configure use of encap-safi (continue to use encap attribute) Signed-off-by: Lou Berger --- bgpd/rfapi/bgp_rfapi_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 4f46565900..fe1d272ade 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -291,10 +291,9 @@ bgp_rfapi_is_vnc_configured (struct bgp *bgp) DEFUN (vnc_advertise_un_method, vnc_advertise_un_method_cmd, - "vnc advertise-un-method ", + "vnc advertise-un-method encap-attr", VNC_CONFIG_STR "Method of advertising UN addresses\n" - "Via Encapsulation SAFI\n" "Via Tunnel Encap attribute (in VPN SAFI)\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); From 33c0d63f9cd85379ce858c98168cc9d1f03e1ae2 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:11:30 -0400 Subject: [PATCH 166/193] bgpd: remove encap safi show commands Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 526 ----------------------------------------------- bgpd/bgp_encap.h | 2 - bgpd/bgp_route.c | 17 +- bgpd/bgp_vty.c | 14 +- bgpd/bgp_vty.h | 3 +- 5 files changed, 7 insertions(+), 555 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 977eb5fd4c..53f9d43c60 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -202,533 +202,7 @@ bgp_nlri_parse_encap( return 0; } -static int -show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct attr *attr; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_ENCAP]); rn; - rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - if ((attr = rm->info) != NULL) - { - if (header) - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - vty_out (vty, "Route Distinguisher: "); - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "unknown RD type"); - } - - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - route_vty_out_tmp (vty, &rm->p, attr, SAFI_ENCAP, 0, NULL); - } - } - } - return CMD_SUCCESS; -} - -int -bgp_show_encap ( - struct vty *vty, - afi_t afi, - struct prefix_rd *prd, - enum bgp_show_type type, - void *output_arg, - int tags) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct bgp_info *ri; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - char v4_header_tag[] = " Network Next Hop In tag/Out tag%s"; - - unsigned long output_count = 0; - unsigned long total_count = 0; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if ((afi != AFI_IP) && (afi != AFI_IP6)) { - vty_out (vty, "Afi %d not supported%s", afi, VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[afi][SAFI_ENCAP]); rn; rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - for (ri = rm->info; ri; ri = ri->next) - { - total_count++; - if (type == bgp_show_type_neighbor) - { - union sockunion *su = output_arg; - - if (ri->peer->su_remote == NULL || ! sockunion_same(ri->peer->su_remote, su)) - continue; - } - if (header) - { - if (tags) - vty_out (vty, v4_header_tag, VTY_NEWLINE); - else - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - } - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - vty_out (vty, "Route Distinguisher: "); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "Unknown RD type"); - break; - } - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - if (tags) - route_vty_out_tag (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - else - route_vty_out (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - output_count++; - } - } - } - - if (output_count == 0) - { - vty_out (vty, "No prefixes displayed, %ld exist%s", total_count, VTY_NEWLINE); - } - else - vty_out (vty, "%sDisplayed %ld routes and %ld total paths%s", - VTY_NEWLINE, output_count, total_count, VTY_NEWLINE); - - return CMD_SUCCESS; -} - -DEFUN (show_bgp_ipv4_encap_rd, - show_bgp_ipv4_encap_rd_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd, - show_bgp_ipv6_encap_rd_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv4_encap_tags, - show_bgp_ipv4_encap_tags_cmd, - "show [ip] bgp ipv4 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_tags, - show_bgp_ipv6_encap_tags_cmd, - "show [ip] bgp ipv6 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_tags, - show_bgp_ipv4_encap_rd_tags_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_rd_tags, - show_bgp_ipv6_encap_rd_tags_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, - show_bgp_ipv4_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, - show_bgp_ipv6_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, - show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, - show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - void bgp_encap_init (void) { - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); - - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); } diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index 4d57fca79d..dd3c868e3f 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -25,7 +25,5 @@ extern void bgp_encap_init (void); extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); -extern int bgp_show_encap (struct vty *vty, afi_t afi, struct prefix_rd *prd, - enum bgp_show_type type, void *output_arg, int tags); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 13279f89b1..a4c8f0bd1b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7840,12 +7840,6 @@ bgp_show (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, return bgp_show_mpls_vpn(vty, afi, NULL, type, output_arg, 0, use_json); } - if (safi == SAFI_ENCAP) - { - return bgp_show_encap(vty, afi, NULL, type, output_arg, - 0); - } - table = bgp->rib[afi][safi]; @@ -8217,7 +8211,7 @@ bgp_show_lcommunity_list (struct vty *vty, struct bgp *bgp, const char *lcom, DEFUN (show_ip_bgp_large_community_list, show_ip_bgp_large_community_list_cmd, - "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", + "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", SHOW_STR IP_STR BGP_STR @@ -8227,7 +8221,6 @@ DEFUN (show_ip_bgp_large_community_list, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-community-list\n" "large-community-list number\n" "large-community-list name\n" @@ -8263,7 +8256,7 @@ DEFUN (show_ip_bgp_large_community_list, } DEFUN (show_ip_bgp_large_community, show_ip_bgp_large_community_cmd, - "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", + "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", SHOW_STR IP_STR BGP_STR @@ -8273,7 +8266,6 @@ DEFUN (show_ip_bgp_large_community, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-communities\n" "List of large-community numbers\n" JSON_STR) @@ -8429,8 +8421,6 @@ DEFUN (show_ip_bgp, if (safi == SAFI_MPLS_VPN) return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj); - else if (safi == SAFI_ENCAP) - return bgp_show_encap (vty, afi, NULL, bgp_show_type_normal, NULL, 0); else return bgp_show (vty, bgp, afi, safi, sh_type, NULL, uj); } @@ -9214,7 +9204,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show [ip] bgp [ WORD] [ []] " + "show [ip] bgp [ WORD] [ []] " "neighbors prefix-counts [json]", SHOW_STR IP_STR @@ -9225,7 +9215,6 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Detailed information on TCP and BGP neighbor connections\n" "Neighbor to display information about\n" "Neighbor to display information about\n" diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4d00fc963f..66689c8367 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -155,7 +155,7 @@ argv_find_and_parse_afi(struct cmd_token **argv, int argc, int *index, afi_t *af return ret; } -/* supports */ +/* supports */ safi_t bgp_vty_safi_from_arg(const char *safi_str) { @@ -164,8 +164,6 @@ bgp_vty_safi_from_arg(const char *safi_str) safi = SAFI_MULTICAST; else if (strncmp (safi_str, "u", 1) == 0) safi = SAFI_UNICAST; - else if (strncmp (safi_str, "e", 1) == 0) - safi = SAFI_ENCAP; else if (strncmp (safi_str, "v", 1) == 0) safi = SAFI_MPLS_VPN; return safi; @@ -193,12 +191,6 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t if (safi) *safi = SAFI_MPLS_VPN; } - else if (argv_find (argv, argc, "encap", index)) - { - ret = 1; - if (safi) - *safi = SAFI_ENCAP; - } else if (argv_find (argv, argc, "evpn", index)) { ret = 1; @@ -218,12 +210,12 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t * that is being parsed. * * The show commands are generally of the form: - * "show [ip] bgp [ WORD] [ []] ..." + * "show [ip] bgp [ WORD] [ []] ..." * * Since we use argv_find if the show command in particular doesn't have: * [ip] * [ WORD] - * [ []] + * [ []] * The command parsing should still be ok. * * vty -> The vty for the command so we can output some useful data in diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 33d24d530e..522eeabefb 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -28,9 +28,8 @@ struct bgp; #define BGP_AFI_CMD_STR "" #define BGP_AFI_HELP_STR "Address Family\nAddress Family\n" -#define BGP_SAFI_CMD_STR "" +#define BGP_SAFI_CMD_STR "" #define BGP_SAFI_HELP_STR \ - "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" From 796e5801cfb9ca0f0f841c4e9ff74dd2081a3729 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:15:45 -0400 Subject: [PATCH 167/193] bgpd: remove encap_safi rx processing Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 152 ---------------------------------------------- bgpd/bgp_encap.h | 1 - bgpd/bgp_packet.c | 2 - 3 files changed, 155 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 53f9d43c60..debd94d7ce 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -50,158 +50,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/rfapi/rfapi_backend.h" #endif -static void -ecom2prd(struct ecommunity *ecom, struct prefix_rd *prd) -{ - int i; - - memset(prd, 0, sizeof(struct prefix_rd)); - prd->family = AF_UNSPEC; - prd->prefixlen = 64; - - if (!ecom) - return; - - for (i = 0; i < (ecom->size * ECOMMUNITY_SIZE); i += ECOMMUNITY_SIZE) { - - uint8_t *ep; - - ep = ecom->val + i; - - switch (ep[0]) { - default: - continue; - - case 0x80: - case 0x81: - case 0x82: - if (ep[1] == 0x0) { - prd->val[1] = ep[0] & 0x03; - memcpy(prd->val + 2, ep + 2, 6); - return; - } - } - } -} - -int -bgp_nlri_parse_encap( - struct peer *peer, - struct attr *attr, - struct bgp_nlri *packet) -{ - u_char *pnt; - u_char *lim; - afi_t afi = packet->afi; - struct prefix p; - int psize = 0; - int prefixlen; - struct rd_as rd_as; - struct rd_ip rd_ip; - struct prefix_rd prd; - struct ecommunity *pEcom = NULL; - u_int16_t rdtype = 0xffff; - char buf[BUFSIZ]; - - /* Check peer status. */ - if (peer->status != Established) - return 0; - - /* Make prefix_rd */ - if (attr && attr->extra && attr->extra->ecommunity) - pEcom = attr->extra->ecommunity; - - ecom2prd(pEcom, &prd); - memset(&rd_as, 0, sizeof(rd_as)); - memset(&rd_ip, 0, sizeof(rd_ip)); - - if (pEcom) { - - rdtype = (prd.val[0] << 8) | prd.val[1]; - - /* Decode RD value. */ - if (rdtype == RD_TYPE_AS) - decode_rd_as (prd.val + 2, &rd_as); - else if (rdtype == RD_TYPE_IP) - decode_rd_ip (prd.val + 2, &rd_ip); - else if (rdtype == RD_TYPE_AS4) - decode_rd_as4 (prd.val + 2, &rd_as); - else - { - zlog_err ("Invalid RD type %d", rdtype); - } - - } - - /* - * NB: this code was based on the MPLS VPN code, which supported RDs. - * For the moment we are retaining the underlying RIB structure that - * keeps a per-RD radix tree, but since the RDs are not carried over - * the wire, we set the RD internally to 0. - */ - prd.family = AF_UNSPEC; - prd.prefixlen = 64; - memset(prd.val, 0, sizeof(prd.val)); - - pnt = packet->nlri; - lim = pnt + packet->length; - - for (; pnt < lim; pnt += psize) - { - /* Clear prefix structure. */ - memset (&p, 0, sizeof (struct prefix)); - - /* Fetch prefix length. */ - prefixlen = *pnt++; - p.family = afi2family(afi); - if (p.family == 0) { - /* bad afi, shouldn't happen */ - zlog_warn("%s: bad afi %d, dropping incoming route", __func__, afi); - continue; - } - psize = PSIZE (prefixlen); - - p.prefixlen = prefixlen; - memcpy (&p.u.prefix, pnt, psize); - - if (pnt + psize > lim) - return -1; - - - if (rdtype == RD_TYPE_AS) - zlog_info ("rd-as %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_IP) - zlog_info ("rd-ip %s:%u prefix %s/%d", inet_ntoa (rd_ip.ip), - rd_ip.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_AS4) - zlog_info ("rd-as4 %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else - zlog_info ("rd unknown, default to 0:0 prefix %s/%d", - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - - if (attr) { - bgp_update (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, 0, NULL); - } else { - bgp_withdraw (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, NULL); - } - } - - /* Packet length consistency check. */ - if (pnt != lim) - return -1; - - return 0; -} - void bgp_encap_init (void) { diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index dd3c868e3f..37ccf13190 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -24,6 +24,5 @@ #include "bgpd/bgp_route.h" extern void bgp_encap_init (void); -extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 661dce133c..9e81374694 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1347,8 +1347,6 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet, i return bgp_nlri_parse_ip (peer, mp_withdraw?NULL:attr, packet); case SAFI_MPLS_VPN: return bgp_nlri_parse_vpn (peer, mp_withdraw?NULL:attr, packet); - case SAFI_ENCAP: - return bgp_nlri_parse_encap (peer, mp_withdraw?NULL:attr, packet); case SAFI_EVPN: return bgp_nlri_parse_evpn (peer, attr, packet, mp_withdraw); } From ad5233c886e5e9418bc14fd7dafd8cd29fe7b214 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 23 May 2017 14:50:45 -0400 Subject: [PATCH 168/193] pimd: Allow secondary address comparisons to work The secondary address comparison done to determine if we are an RP for a specified address was comparing A.B.C.D/32 to A.B.C.D/0 because when we created the rp_info we were not setting the prefixlen Signed-off-by: Donald Sharp --- pimd/pim_rp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index d3d9beb053..3dde187081 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -98,6 +98,7 @@ pim_rp_init (void) str2prefix ("224.0.0.0/4", &rp_info->group); rp_info->group.family = AF_INET; rp_info->rp.rpf_addr.family = AF_INET; + rp_info->rp.rpf_addr.prefixlen = IPV4_MAX_PREFIXLEN; rp_info->rp.rpf_addr.u.prefix4.s_addr = INADDR_NONE; tail = rp_info; @@ -306,6 +307,7 @@ pim_rp_new (const char *rp, const char *group_range, const char *plist) } rp_info->rp.rpf_addr.family = AF_INET; + rp_info->rp.rpf_addr.prefixlen = IPV4_MAX_PREFIXLEN; result = inet_pton (rp_info->rp.rpf_addr.family, rp, &rp_info->rp.rpf_addr.u.prefix4); if (result <= 0) From 26a4b7c3c35f1fc1b0f72622d85330d95636a761 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:34:43 -0400 Subject: [PATCH 169/193] bgpd: remove encap safi vty related files bgp_encap.h|c Signed-off-by: Lou Berger --- bgpd/Makefile.am | 4 ++-- bgpd/bgp_encap.c | 56 ----------------------------------------------- bgpd/bgp_encap.h | 28 ------------------------ bgpd/bgp_packet.c | 2 -- bgpd/bgp_route.c | 1 - bgpd/bgpd.c | 2 -- vtysh/Makefile.am | 1 - 7 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 bgpd/bgp_encap.c delete mode 100644 bgpd/bgp_encap.h diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index b6ed9a4d6d..ad455edfcd 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -80,7 +80,7 @@ libbgp_a_SOURCES = \ bgp_mplsvpn.c bgp_nexthop.c \ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_mpath.c \ bgp_nht.c bgp_updgrp.c bgp_updgrp_packet.c bgp_updgrp_adv.c bgp_bfd.c \ - bgp_encap.c bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ + bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ bgp_evpn.c bgp_evpn_vty.c bgp_vpn.c noinst_HEADERS = \ @@ -91,7 +91,7 @@ noinst_HEADERS = \ bgp_ecommunity.h bgp_lcommunity.h \ bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \ bgp_advertise.h bgp_vty.h bgp_mpath.h bgp_nht.h \ - bgp_updgrp.h bgp_bfd.h bgp_encap.h bgp_encap_tlv.h bgp_encap_types.h \ + bgp_updgrp.h bgp_bfd.h bgp_encap_tlv.h bgp_encap_types.h \ $(BGP_VNC_RFAPI_HD) bgp_attr_evpn.h bgp_evpn.h bgp_evpn_vty.h bgp_vpn.h bgpd_SOURCES = bgp_main.c diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c deleted file mode 100644 index debd94d7ce..0000000000 --- a/bgpd/bgp_encap.c +++ /dev/null @@ -1,56 +0,0 @@ - -/* - * This file created by LabN Consulting, L.L.C. - * - * - * This file is based on bgp_mplsvpn.c which is Copyright (C) 2000 - * Kunihiro Ishiguro - * - */ - -/* - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#include - -#include "command.h" -#include "prefix.h" -#include "log.h" -#include "memory.h" -#include "stream.h" -#include "filter.h" - -#include "bgpd/bgpd.h" -#include "bgpd/bgp_table.h" -#include "bgpd/bgp_route.h" -#include "bgpd/bgp_attr.h" -#include "bgpd/bgp_ecommunity.h" -#include "bgpd/bgp_lcommunity.h" -#include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_vty.h" -#include "bgpd/bgp_encap.h" - -#if ENABLE_BGP_VNC -#include "bgpd/rfapi/rfapi_backend.h" -#endif - -void -bgp_encap_init (void) -{ -} diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h deleted file mode 100644 index 37ccf13190..0000000000 --- a/bgpd/bgp_encap.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright 2009-2015, LabN Consulting, L.L.C. - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as 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; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef _QUAGGA_BGP_ENCAP_H -#define _QUAGGA_BGP_ENCAP_H -#include "bgpd/bgp_route.h" - -extern void bgp_encap_init (void); -#include "bgp_encap_types.h" -#endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 9e81374694..77395bf859 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -50,8 +50,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_network.h" #include "bgpd/bgp_mplsvpn.h" #include "bgpd/bgp_evpn.h" -#include "bgpd/bgp_encap.h" -#include "bgpd/bgp_evpn.h" #include "bgpd/bgp_advertise.h" #include "bgpd/bgp_vty.h" #include "bgpd/bgp_updgrp.h" diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a4c8f0bd1b..38e696d11b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -53,7 +53,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_filter.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_advertise.h" diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 1da69c9f32..94433df2f3 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -61,7 +61,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #if ENABLE_BGP_VNC #include "bgpd/rfapi/bgp_rfapi_cfg.h" #include "bgpd/rfapi/rfapi_backend.h" @@ -7695,7 +7694,6 @@ bgp_init (void) bgp_route_map_init (); bgp_scan_vty_init(); bgp_mplsvpn_init (); - bgp_encap_init (); #if ENABLE_BGP_VNC rfapi_init (); #endif diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 9b81f99607..a8dbb8d71d 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -47,7 +47,6 @@ if BGPD vtysh_scan += $(top_srcdir)/bgpd/bgp_bfd.c vtysh_scan += $(top_srcdir)/bgpd/bgp_debug.c vtysh_scan += $(top_srcdir)/bgpd/bgp_dump.c -vtysh_scan += $(top_srcdir)/bgpd/bgp_encap.c vtysh_scan += $(top_srcdir)/bgpd/bgp_evpn_vty.c vtysh_scan += $(top_srcdir)/bgpd/bgp_filter.c vtysh_scan += $(top_srcdir)/bgpd/bgp_mplsvpn.c From b1ff4223c76d5f2d83dcdb1470fa188059b4211c Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:00:53 -0400 Subject: [PATCH 170/193] lib: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- lib/command.c | 6 ------ lib/command.h | 2 -- lib/vty.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/lib/command.c b/lib/command.c index 84d59f076c..eb163f6189 100644 --- a/lib/command.c +++ b/lib/command.c @@ -865,8 +865,6 @@ node_parent ( enum node_type node ) { case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1238,8 +1236,6 @@ cmd_exit (struct vty *vty) case BGP_IPV4L_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1305,8 +1301,6 @@ DEFUN (config_end, case RIPNG_NODE: case EIGRP_NODE: case BGP_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: diff --git a/lib/command.h b/lib/command.h index 35fb20f8b0..7894334dfc 100644 --- a/lib/command.h +++ b/lib/command.h @@ -101,8 +101,6 @@ enum node_type BGP_IPV6_NODE, /* BGP IPv6 address family */ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */ BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */ - BGP_ENCAP_NODE, /* BGP ENCAP SAFI */ - BGP_ENCAPV6_NODE, /* BGP ENCAP SAFI */ BGP_VRF_POLICY_NODE, /* BGP VRF policy */ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */ diff --git a/lib/vty.c b/lib/vty.c index e27f8d74ba..c500a45194 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -738,8 +738,6 @@ vty_end_config (struct vty *vty) case BGP_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: From ddb2927dffff973cb40bbccd4c63115fe4a099bc Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:09 -0400 Subject: [PATCH 171/193] vtysh: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- vtysh/vtysh.c | 56 --------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 2eee7a6897..ecd0b72e78 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -304,7 +304,6 @@ vtysh_execute_func (const char *line, int pager) if (ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON || ret == CMD_WARNING) { if ((saved_node == BGP_VPNV4_NODE || saved_node == BGP_VPNV6_NODE - || saved_node == BGP_ENCAP_NODE || saved_node == BGP_ENCAPV6_NODE || saved_node == BGP_IPV4_NODE || saved_node == BGP_IPV6_NODE || saved_node == BGP_IPV4M_NODE || saved_node == BGP_IPV4L_NODE || saved_node == BGP_IPV6L_NODE @@ -948,18 +947,6 @@ static struct cmd_node bgp_vpnv6_node = "%s(config-router-af)# " }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af)# " -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af)# " -}; - static struct cmd_node bgp_ipv4_node = { BGP_IPV4_NODE, @@ -1176,31 +1163,6 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } -DEFUNSH (VTYSH_BGPD, - address_family_encapv4, - address_family_encapv4_cmd, - "address-family [ipv4] ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - -DEFUNSH (VTYSH_BGPD, - address_family_encapv6, - address_family_encapv6_cmd, - "address-family [ipv6] encapv6", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUNSH (VTYSH_BGPD, address_family_ipv4, address_family_ipv4_cmd, @@ -1624,8 +1586,6 @@ vtysh_exit (struct vty *vty) break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: case BGP_IPV4L_NODE: @@ -1693,8 +1653,6 @@ DEFUNSH (VTYSH_BGPD, || vty->node == BGP_IPV4L_NODE || vty->node == BGP_VPNV4_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6L_NODE || vty->node == BGP_IPV6M_NODE) @@ -3273,8 +3231,6 @@ vtysh_init_vty (void) install_node (&zebra_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); install_node (&bgp_ipv4l_node, NULL); @@ -3314,8 +3270,6 @@ vtysh_init_vty (void) vtysh_install_default (ZEBRA_NODE); vtysh_install_default (BGP_VPNV4_NODE); vtysh_install_default (BGP_VPNV6_NODE); - vtysh_install_default (BGP_ENCAP_NODE); - vtysh_install_default (BGP_ENCAPV6_NODE); vtysh_install_default (BGP_IPV4_NODE); vtysh_install_default (BGP_IPV4M_NODE); vtysh_install_default (BGP_IPV4L_NODE); @@ -3386,10 +3340,6 @@ vtysh_init_vty (void) install_element (BGP_VPNV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4M_NODE, &vtysh_exit_bgpd_cmd); @@ -3445,8 +3395,6 @@ vtysh_init_vty (void) install_element (BGP_IPV4L_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV4_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV6_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6M_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6L_NODE, &vtysh_end_all_cmd); @@ -3498,8 +3446,6 @@ vtysh_init_vty (void) install_element (CONFIG_NODE, &router_bgp_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); - install_element (BGP_NODE, &address_family_encapv4_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); #if defined(ENABLE_BGP_VNC) install_element (BGP_NODE, &vnc_vrf_policy_cmd); install_element (BGP_NODE, &vnc_defaults_cmd); @@ -3517,8 +3463,6 @@ vtysh_init_vty (void) install_element (BGP_NODE, &address_family_evpn_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV4_NODE, &exit_address_family_cmd); install_element (BGP_IPV4M_NODE, &exit_address_family_cmd); install_element (BGP_IPV4L_NODE, &exit_address_family_cmd); From 5b1f0f29e74d7ac8ae663e27bfc0bb9c0ef27e81 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:54 -0400 Subject: [PATCH 172/193] bgpd: remove support for ipv4|6 encap safi config Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 77 ------------------------- bgpd/bgp_vty.c | 142 +---------------------------------------------- 2 files changed, 2 insertions(+), 217 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 572d9fdd1e..ad9c6100cd 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -196,78 +196,6 @@ bgp_nlri_parse_encap( return 0; } - -/* TBD: these routes should probably all be host routes */ - -/* For testing purpose, static route of ENCAP. */ -DEFUN (encap_network, - encap_network_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_ipv4 = 1; - int idx_rd = 3; - return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - NULL, 0, NULL, NULL, NULL, NULL); -} - -/* For testing purpose, static route of ENCAP. */ -DEFUN (no_encap_network, - no_encap_network_cmd, - "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - NO_STR - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n" - "BGP tag\n" - "tag value\n") -{ - int idx_ipv4 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - 0, NULL, NULL, NULL); -} - -DEFUN (encapv6_network, - encapv6_network_cmd, - "network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 1; - int idx_rd = 3; - int idx_rmap = 5; - const char *rmap_str = (argc == 6) ? argv[idx_rmap]->arg : NULL; - return bgp_static_set_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, rmap_str, 0, NULL, - NULL, NULL, NULL); -} - -DEFUN (no_encapv6_network, - no_encapv6_network_cmd, - "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - NO_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); -} - static int show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { @@ -786,11 +714,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, void bgp_encap_init (void) { - install_element (BGP_ENCAP_NODE, &encap_network_cmd); - install_element (BGP_ENCAP_NODE, &no_encap_network_cmd); - install_element (BGP_ENCAPV6_NODE, &encapv6_network_cmd); - install_element (BGP_ENCAPV6_NODE, &no_encapv6_network_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 5059104e92..b7ab8cc232 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -130,7 +130,6 @@ bgp_node_afi (struct vty *vty) case BGP_IPV6M_NODE: case BGP_IPV6L_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAPV6_NODE: afi = AFI_IP6; break; case BGP_EVPN_NODE: @@ -151,10 +150,6 @@ bgp_node_safi (struct vty *vty) safi_t safi; switch (vty->node) { - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: - safi = SAFI_ENCAP; - break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: safi = SAFI_MPLS_VPN; @@ -6345,7 +6340,7 @@ ALIAS_HIDDEN (no_neighbor_addpath_tx_bestpath_per_as, DEFUN_NOSH (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 []", + "address-family ipv4 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -6364,7 +6359,7 @@ DEFUN_NOSH (address_family_ipv4_safi, DEFUN_NOSH (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 []", + "address-family ipv6 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -6404,28 +6399,6 @@ DEFUN_NOSH (address_family_vpnv6, } #endif -DEFUN_NOSH (address_family_encap, - address_family_encap_cmd, - "address-family ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - - -DEFUN_NOSH (address_family_encapv6, - address_family_encapv6_cmd, - "address-family encapv6", - "Enter Address Family command mode\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUN_NOSH (address_family_evpn, address_family_evpn_cmd, "address-family ", @@ -6451,8 +6424,6 @@ DEFUN_NOSH (exit_address_family, || vty->node == BGP_IPV6M_NODE || vty->node == BGP_IPV6L_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_EVPN_NODE) vty->node = BGP_NODE; return CMD_SUCCESS; @@ -10903,20 +10874,6 @@ static struct cmd_node bgp_vpnv6_node = 1 }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af-encap)# ", - 1 -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af-encapv6)# ", - 1 -}; - static struct cmd_node bgp_evpn_node = { BGP_EVPN_NODE, @@ -10992,8 +10949,6 @@ bgp_vty_init (void) install_node (&bgp_ipv6_labeled_unicast_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_evpn_node, NULL); /* Install default VTY commands to new nodes. */ @@ -11006,8 +10961,6 @@ bgp_vty_init (void) install_default (BGP_IPV6L_NODE); install_default (BGP_VPNV4_NODE); install_default (BGP_VPNV6_NODE); - install_default (BGP_ENCAP_NODE); - install_default (BGP_ENCAPV6_NODE); install_default (BGP_EVPN_NODE); /* "bgp multiple-instance" commands. */ @@ -11234,8 +11187,6 @@ bgp_vty_init (void) install_element (BGP_IPV6L_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &neighbor_activate_cmd); /* "no neighbor activate" commands. */ @@ -11248,8 +11199,6 @@ bgp_vty_init (void) install_element (BGP_IPV6L_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_activate_cmd); /* "neighbor peer-group" set commands. */ @@ -11262,8 +11211,6 @@ bgp_vty_init (void) install_element (BGP_IPV6L_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_VPNV6_NODE, &neighbor_set_peer_group_hidden_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_set_peer_group_hidden_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_set_peer_group_hidden_cmd); /* "no neighbor peer-group unset" commands. */ install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd); @@ -11275,8 +11222,6 @@ bgp_vty_init (void) install_element (BGP_IPV6L_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_set_peer_group_hidden_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_set_peer_group_hidden_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_set_peer_group_hidden_cmd); /* "neighbor softreconfiguration inbound" commands.*/ install_element (BGP_NODE, &neighbor_soft_reconfiguration_hidden_cmd); @@ -11297,10 +11242,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_soft_reconfiguration_cmd); /* "neighbor attribute-unchanged" commands. */ install_element (BGP_NODE, &neighbor_attr_unchanged_hidden_cmd); @@ -11322,12 +11263,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_EVPN_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_attr_unchanged_cmd); @@ -11354,10 +11289,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_nexthop_self_cmd); /* "neighbor next-hop-self force" commands. */ install_element (BGP_NODE, &neighbor_nexthop_self_force_hidden_cmd); @@ -11472,10 +11403,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_replace_as_cmd); install_element (BGP_VPNV6_NODE, &neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_remove_private_as_cmd); /* "neighbor send-community" commands.*/ install_element (BGP_NODE, &neighbor_send_community_hidden_cmd); @@ -11514,14 +11441,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_send_community_type_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_type_cmd); /* "neighbor route-reflector" commands.*/ install_element (BGP_NODE, &neighbor_route_reflector_client_hidden_cmd); @@ -11542,10 +11461,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_reflector_client_cmd); /* "neighbor route-server" commands.*/ install_element (BGP_NODE, &neighbor_route_server_client_hidden_cmd); @@ -11566,10 +11481,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_server_client_cmd); /* "neighbor addpath-tx-all-paths" commands.*/ install_element (BGP_NODE, &neighbor_addpath_tx_all_paths_hidden_cmd); @@ -11714,10 +11625,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_weight_cmd); /* "neighbor override-capability" commands. */ install_element (BGP_NODE, &neighbor_override_capability_cmd); @@ -11762,10 +11669,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_distribute_list_cmd); /* "neighbor prefix-list" commands. */ install_element (BGP_NODE, &neighbor_prefix_list_hidden_cmd); @@ -11786,10 +11689,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_prefix_list_cmd); /* "neighbor filter-list" commands. */ install_element (BGP_NODE, &neighbor_filter_list_hidden_cmd); @@ -11810,10 +11709,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_filter_list_cmd); /* "neighbor route-map" commands. */ install_element (BGP_NODE, &neighbor_route_map_hidden_cmd); @@ -11834,10 +11729,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_map_cmd); /* "neighbor unsuppress-map" commands. */ install_element (BGP_NODE, &neighbor_unsuppress_map_hidden_cmd); @@ -11858,10 +11749,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_unsuppress_map_cmd); /* "neighbor maximum-prefix" commands. */ install_element (BGP_NODE, &neighbor_maximum_prefix_hidden_cmd); @@ -11928,22 +11815,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_cmd); - /* "neighbor allowas-in" */ install_element (BGP_NODE, &neighbor_allowas_in_hidden_cmd); install_element (BGP_NODE, &no_neighbor_allowas_in_hidden_cmd); @@ -11963,10 +11834,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_allowas_in_cmd); /* address-family commands. */ install_element (BGP_NODE, &address_family_ipv4_safi_cmd); @@ -11976,9 +11843,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_vpnv6_cmd); #endif /* KEEP_OLD_VPN_COMMANDS */ - install_element (BGP_NODE, &address_family_encap_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); - install_element (BGP_NODE, &address_family_evpn_cmd); /* "exit-address-family" command. */ @@ -11990,8 +11854,6 @@ bgp_vty_init (void) install_element (BGP_IPV6L_NODE, &exit_address_family_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_EVPN_NODE, &exit_address_family_cmd); /* "clear ip bgp commands" */ From 2fd1b54aa159e08d5a7bdfc3860118ab6c5878ec Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:02:31 -0400 Subject: [PATCH 173/193] bgpd rfapi: remove ability to configure use of encap-safi (continue to use encap attribute) Signed-off-by: Lou Berger --- bgpd/rfapi/bgp_rfapi_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 722948c737..6002046bcd 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -290,10 +290,9 @@ bgp_rfapi_is_vnc_configured (struct bgp *bgp) DEFUN (vnc_advertise_un_method, vnc_advertise_un_method_cmd, - "vnc advertise-un-method ", + "vnc advertise-un-method encap-attr", VNC_CONFIG_STR "Method of advertising UN addresses\n" - "Via Encapsulation SAFI\n" "Via Tunnel Encap attribute (in VPN SAFI)\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); From 6c8744af2da183970563fcfafbc567094bbbe8c5 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:58:10 -0400 Subject: [PATCH 174/193] bgpd: remove additional instance of BGP_ENCAP(v6)_NODE Signed-off-by: Lou Berger --- bgpd/bgp_vty.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index b7ab8cc232..6d8c705e37 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -81,9 +81,6 @@ bgp_node_type (afi_t afi, safi_t safi) case SAFI_MPLS_VPN: return BGP_VPNV4_NODE; break; - case SAFI_ENCAP: - return BGP_ENCAP_NODE; - break; } break; case AFI_IP6: @@ -101,9 +98,6 @@ bgp_node_type (afi_t afi, safi_t safi) case SAFI_MPLS_VPN: return BGP_VPNV6_NODE; break; - case SAFI_ENCAP: - return BGP_ENCAPV6_NODE; - break; } break; case AFI_L2VPN: From 375a2e67ad3a8de636116ad6b3f7e9680a00e976 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:11:30 -0400 Subject: [PATCH 175/193] bgpd: remove encap safi show commands Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 526 ----------------------------------------------- bgpd/bgp_encap.h | 2 - bgpd/bgp_route.c | 16 +- bgpd/bgp_vty.c | 14 +- bgpd/bgp_vty.h | 4 +- 5 files changed, 7 insertions(+), 555 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index ad9c6100cd..9369458130 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -196,533 +196,7 @@ bgp_nlri_parse_encap( return 0; } -static int -show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct attr *attr; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_ENCAP]); rn; - rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - if ((attr = rm->info) != NULL) - { - if (header) - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - vty_out (vty, "Route Distinguisher: "); - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "unknown RD type"); - } - - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - route_vty_out_tmp (vty, &rm->p, attr, SAFI_ENCAP, 0, NULL); - } - } - } - return CMD_SUCCESS; -} - -int -bgp_show_encap ( - struct vty *vty, - afi_t afi, - struct prefix_rd *prd, - enum bgp_show_type type, - void *output_arg, - int tags) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct bgp_info *ri; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - char v4_header_tag[] = " Network Next Hop In tag/Out tag%s"; - - unsigned long output_count = 0; - unsigned long total_count = 0; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if ((afi != AFI_IP) && (afi != AFI_IP6)) { - vty_out (vty, "Afi %d not supported%s", afi, VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[afi][SAFI_ENCAP]); rn; rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - for (ri = rm->info; ri; ri = ri->next) - { - total_count++; - if (type == bgp_show_type_neighbor) - { - union sockunion *su = output_arg; - - if (ri->peer->su_remote == NULL || ! sockunion_same(ri->peer->su_remote, su)) - continue; - } - if (header) - { - if (tags) - vty_out (vty, v4_header_tag, VTY_NEWLINE); - else - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - } - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - vty_out (vty, "Route Distinguisher: "); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "Unknown RD type"); - break; - } - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - if (tags) - route_vty_out_tag (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - else - route_vty_out (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - output_count++; - } - } - } - - if (output_count == 0) - { - vty_out (vty, "No prefixes displayed, %ld exist%s", total_count, VTY_NEWLINE); - } - else - vty_out (vty, "%sDisplayed %ld routes and %ld total paths%s", - VTY_NEWLINE, output_count, total_count, VTY_NEWLINE); - - return CMD_SUCCESS; -} - -DEFUN (show_bgp_ipv4_encap_rd, - show_bgp_ipv4_encap_rd_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd, - show_bgp_ipv6_encap_rd_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv4_encap_tags, - show_bgp_ipv4_encap_tags_cmd, - "show [ip] bgp ipv4 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_tags, - show_bgp_ipv6_encap_tags_cmd, - "show [ip] bgp ipv6 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_tags, - show_bgp_ipv4_encap_rd_tags_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_rd_tags, - show_bgp_ipv6_encap_rd_tags_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, - show_bgp_ipv4_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, - show_bgp_ipv6_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, - show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, - show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - void bgp_encap_init (void) { - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); - - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); } diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index 2805dd3e1d..ffaf2caa05 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -24,7 +24,5 @@ extern void bgp_encap_init (void); extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); -extern int bgp_show_encap (struct vty *vty, afi_t afi, struct prefix_rd *prd, - enum bgp_show_type type, void *output_arg, int tags); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index fc89bc046b..8f13c26c2d 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8059,12 +8059,6 @@ bgp_show (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, return bgp_show_mpls_vpn(vty, afi, NULL, type, output_arg, 0, use_json); } - if (safi == SAFI_ENCAP) - { - return bgp_show_encap(vty, afi, NULL, type, output_arg, - 0); - } - table = bgp->rib[afi][safi]; @@ -8448,7 +8442,7 @@ bgp_show_lcommunity_list (struct vty *vty, struct bgp *bgp, const char *lcom, DEFUN (show_ip_bgp_large_community_list, show_ip_bgp_large_community_list_cmd, - "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", + "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", SHOW_STR IP_STR BGP_STR @@ -8459,7 +8453,6 @@ DEFUN (show_ip_bgp_large_community_list, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-community-list\n" "large-community-list number\n" "large-community-list name\n" @@ -8495,7 +8488,7 @@ DEFUN (show_ip_bgp_large_community_list, } DEFUN (show_ip_bgp_large_community, show_ip_bgp_large_community_cmd, - "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", + "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", SHOW_STR IP_STR BGP_STR @@ -8506,7 +8499,6 @@ DEFUN (show_ip_bgp_large_community, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-communities\n" "List of large-community numbers\n" JSON_STR) @@ -8662,8 +8654,6 @@ DEFUN (show_ip_bgp, if (safi == SAFI_MPLS_VPN) return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj); - else if (safi == SAFI_ENCAP) - return bgp_show_encap (vty, afi, NULL, bgp_show_type_normal, NULL, 0); else return bgp_show (vty, bgp, afi, safi, sh_type, NULL, uj); } @@ -9451,7 +9441,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show [ip] bgp [ WORD] [ []] " + "show [ip] bgp [ WORD] [ []] " "neighbors prefix-counts [json]", SHOW_STR IP_STR diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 6d8c705e37..c2942b50dc 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -212,7 +212,7 @@ argv_find_and_parse_afi(struct cmd_token **argv, int argc, int *index, afi_t *af return ret; } -/* supports */ +/* supports */ safi_t bgp_vty_safi_from_arg(const char *safi_str) { @@ -221,8 +221,6 @@ bgp_vty_safi_from_arg(const char *safi_str) safi = SAFI_MULTICAST; else if (strncmp (safi_str, "u", 1) == 0) safi = SAFI_UNICAST; - else if (strncmp (safi_str, "e", 1) == 0) - safi = SAFI_ENCAP; else if (strncmp (safi_str, "v", 1) == 0) safi = SAFI_MPLS_VPN; else if (strncmp (safi_str, "l", 1) == 0) @@ -258,12 +256,6 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t if (safi) *safi = SAFI_MPLS_VPN; } - else if (argv_find (argv, argc, "encap", index)) - { - ret = 1; - if (safi) - *safi = SAFI_ENCAP; - } else if (argv_find (argv, argc, "evpn", index)) { ret = 1; @@ -283,12 +275,12 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t * that is being parsed. * * The show commands are generally of the form: - * "show [ip] bgp [ WORD] [ []] ..." + * "show [ip] bgp [ WORD] [ []] ..." * * Since we use argv_find if the show command in particular doesn't have: * [ip] * [ WORD] - * [ []] + * [ []] * The command parsing should still be ok. * * vty -> The vty for the command so we can output some useful data in diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index eae1f2d018..1bb9cfb712 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -28,10 +28,8 @@ struct bgp; #define BGP_AFI_CMD_STR "" #define BGP_AFI_HELP_STR "Address Family\nAddress Family\n" -#define BGP_SAFI_CMD_STR "" +#define BGP_SAFI_CMD_STR "" #define BGP_SAFI_HELP_STR \ - "Address Family modifier\n" \ - "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" \ From eedae495010527cdb026619bc83d7097995568db Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:15:45 -0400 Subject: [PATCH 176/193] bgpd: remove encap_safi rx processing Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 152 ---------------------------------------------- bgpd/bgp_encap.h | 1 - bgpd/bgp_packet.c | 2 - 3 files changed, 155 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 9369458130..d554f359a8 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -44,158 +44,6 @@ #include "bgpd/rfapi/rfapi_backend.h" #endif -static void -ecom2prd(struct ecommunity *ecom, struct prefix_rd *prd) -{ - int i; - - memset(prd, 0, sizeof(struct prefix_rd)); - prd->family = AF_UNSPEC; - prd->prefixlen = 64; - - if (!ecom) - return; - - for (i = 0; i < (ecom->size * ECOMMUNITY_SIZE); i += ECOMMUNITY_SIZE) { - - uint8_t *ep; - - ep = ecom->val + i; - - switch (ep[0]) { - default: - continue; - - case 0x80: - case 0x81: - case 0x82: - if (ep[1] == 0x0) { - prd->val[1] = ep[0] & 0x03; - memcpy(prd->val + 2, ep + 2, 6); - return; - } - } - } -} - -int -bgp_nlri_parse_encap( - struct peer *peer, - struct attr *attr, - struct bgp_nlri *packet) -{ - u_char *pnt; - u_char *lim; - afi_t afi = packet->afi; - struct prefix p; - int psize = 0; - int prefixlen; - struct rd_as rd_as; - struct rd_ip rd_ip; - struct prefix_rd prd; - struct ecommunity *pEcom = NULL; - u_int16_t rdtype = 0xffff; - char buf[BUFSIZ]; - - /* Check peer status. */ - if (peer->status != Established) - return 0; - - /* Make prefix_rd */ - if (attr && attr->extra && attr->extra->ecommunity) - pEcom = attr->extra->ecommunity; - - ecom2prd(pEcom, &prd); - memset(&rd_as, 0, sizeof(rd_as)); - memset(&rd_ip, 0, sizeof(rd_ip)); - - if (pEcom) { - - rdtype = (prd.val[0] << 8) | prd.val[1]; - - /* Decode RD value. */ - if (rdtype == RD_TYPE_AS) - decode_rd_as (prd.val + 2, &rd_as); - else if (rdtype == RD_TYPE_IP) - decode_rd_ip (prd.val + 2, &rd_ip); - else if (rdtype == RD_TYPE_AS4) - decode_rd_as4 (prd.val + 2, &rd_as); - else - { - zlog_err ("Invalid RD type %d", rdtype); - } - - } - - /* - * NB: this code was based on the MPLS VPN code, which supported RDs. - * For the moment we are retaining the underlying RIB structure that - * keeps a per-RD radix tree, but since the RDs are not carried over - * the wire, we set the RD internally to 0. - */ - prd.family = AF_UNSPEC; - prd.prefixlen = 64; - memset(prd.val, 0, sizeof(prd.val)); - - pnt = packet->nlri; - lim = pnt + packet->length; - - for (; pnt < lim; pnt += psize) - { - /* Clear prefix structure. */ - memset (&p, 0, sizeof (struct prefix)); - - /* Fetch prefix length. */ - prefixlen = *pnt++; - p.family = afi2family(afi); - if (p.family == 0) { - /* bad afi, shouldn't happen */ - zlog_warn("%s: bad afi %d, dropping incoming route", __func__, afi); - continue; - } - psize = PSIZE (prefixlen); - - p.prefixlen = prefixlen; - memcpy (&p.u.prefix, pnt, psize); - - if (pnt + psize > lim) - return -1; - - - if (rdtype == RD_TYPE_AS) - zlog_info ("rd-as %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_IP) - zlog_info ("rd-ip %s:%u prefix %s/%d", inet_ntoa (rd_ip.ip), - rd_ip.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_AS4) - zlog_info ("rd-as4 %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else - zlog_info ("rd unknown, default to 0:0 prefix %s/%d", - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - - if (attr) { - bgp_update (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, 0, NULL); - } else { - bgp_withdraw (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, NULL); - } - } - - /* Packet length consistency check. */ - if (pnt != lim) - return -1; - - return 0; -} - void bgp_encap_init (void) { diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index ffaf2caa05..08986e4b1a 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -23,6 +23,5 @@ #include "bgpd/bgp_route.h" extern void bgp_encap_init (void); -extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 126a920944..9d35702367 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1352,8 +1352,6 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet, i return bgp_nlri_parse_label (peer, mp_withdraw?NULL:attr, packet); case SAFI_MPLS_VPN: return bgp_nlri_parse_vpn (peer, mp_withdraw?NULL:attr, packet); - case SAFI_ENCAP: - return bgp_nlri_parse_encap (peer, mp_withdraw?NULL:attr, packet); case SAFI_EVPN: return bgp_nlri_parse_evpn (peer, attr, packet, mp_withdraw); } From 1ec1afd6cbff38e50bf5800a0503da71db7c836d Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:34:43 -0400 Subject: [PATCH 177/193] bgpd: remove encap safi vty related files bgp_encap.h|c Signed-off-by: Lou Berger --- bgpd/Makefile.am | 4 ++-- bgpd/bgp_encap.c | 50 ----------------------------------------------- bgpd/bgp_encap.h | 27 ------------------------- bgpd/bgp_packet.c | 2 -- bgpd/bgp_route.c | 1 - bgpd/bgpd.c | 2 -- vtysh/Makefile.am | 1 - 7 files changed, 2 insertions(+), 85 deletions(-) delete mode 100644 bgpd/bgp_encap.c delete mode 100644 bgpd/bgp_encap.h diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 4ea0455525..a57a66488f 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -80,7 +80,7 @@ libbgp_a_SOURCES = \ bgp_mplsvpn.c bgp_nexthop.c \ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_mpath.c \ bgp_nht.c bgp_updgrp.c bgp_updgrp_packet.c bgp_updgrp_adv.c bgp_bfd.c \ - bgp_encap.c bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ + bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ bgp_evpn.c bgp_evpn_vty.c bgp_vpn.c bgp_label.c noinst_HEADERS = \ @@ -91,7 +91,7 @@ noinst_HEADERS = \ bgp_ecommunity.h bgp_lcommunity.h \ bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \ bgp_advertise.h bgp_vty.h bgp_mpath.h bgp_nht.h \ - bgp_updgrp.h bgp_bfd.h bgp_encap.h bgp_encap_tlv.h bgp_encap_types.h \ + bgp_updgrp.h bgp_bfd.h bgp_encap_tlv.h bgp_encap_types.h \ $(BGP_VNC_RFAPI_HD) bgp_attr_evpn.h bgp_evpn.h bgp_evpn_vty.h \ bgp_vpn.h bgp_label.h diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c deleted file mode 100644 index d554f359a8..0000000000 --- a/bgpd/bgp_encap.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file created by LabN Consulting, L.L.C. - * - * This file is based on bgp_mplsvpn.c which is Copyright (C) 2000 - * Kunihiro Ishiguro - * - * This file is part of GNU Zebra. - * - * GNU Zebra is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * GNU Zebra 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 - -#include "command.h" -#include "prefix.h" -#include "log.h" -#include "memory.h" -#include "stream.h" -#include "filter.h" - -#include "bgpd/bgpd.h" -#include "bgpd/bgp_table.h" -#include "bgpd/bgp_route.h" -#include "bgpd/bgp_attr.h" -#include "bgpd/bgp_ecommunity.h" -#include "bgpd/bgp_lcommunity.h" -#include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_vty.h" -#include "bgpd/bgp_encap.h" - -#if ENABLE_BGP_VNC -#include "bgpd/rfapi/rfapi_backend.h" -#endif - -void -bgp_encap_init (void) -{ -} diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h deleted file mode 100644 index 08986e4b1a..0000000000 --- a/bgpd/bgp_encap.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * Copyright 2009-2015, LabN Consulting, L.L.C. - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as 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 - */ - -#ifndef _QUAGGA_BGP_ENCAP_H -#define _QUAGGA_BGP_ENCAP_H -#include "bgpd/bgp_route.h" - -extern void bgp_encap_init (void); -#include "bgp_encap_types.h" -#endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 9d35702367..da6bf5c3cb 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -50,8 +50,6 @@ #include "bgpd/bgp_network.h" #include "bgpd/bgp_mplsvpn.h" #include "bgpd/bgp_evpn.h" -#include "bgpd/bgp_encap.h" -#include "bgpd/bgp_evpn.h" #include "bgpd/bgp_advertise.h" #include "bgpd/bgp_vty.h" #include "bgpd/bgp_updgrp.h" diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 8f13c26c2d..7a328e79d7 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -54,7 +54,6 @@ #include "bgpd/bgp_filter.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_advertise.h" diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 655431b015..92a0cd6acc 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -61,7 +61,6 @@ #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #if ENABLE_BGP_VNC #include "bgpd/rfapi/bgp_rfapi_cfg.h" #include "bgpd/rfapi/rfapi_backend.h" @@ -7701,7 +7700,6 @@ bgp_init (void) bgp_route_map_init (); bgp_scan_vty_init(); bgp_mplsvpn_init (); - bgp_encap_init (); #if ENABLE_BGP_VNC rfapi_init (); #endif diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index bb6bbbe87e..29ffa7e22b 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -47,7 +47,6 @@ if BGPD vtysh_scan += $(top_srcdir)/bgpd/bgp_bfd.c vtysh_scan += $(top_srcdir)/bgpd/bgp_debug.c vtysh_scan += $(top_srcdir)/bgpd/bgp_dump.c -vtysh_scan += $(top_srcdir)/bgpd/bgp_encap.c vtysh_scan += $(top_srcdir)/bgpd/bgp_evpn_vty.c vtysh_scan += $(top_srcdir)/bgpd/bgp_filter.c vtysh_scan += $(top_srcdir)/bgpd/bgp_mplsvpn.c From dc207b2760bacb9c51da5a6ac6d9ab8636796a02 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 25 May 2017 04:09:52 +0000 Subject: [PATCH 178/193] ospf6d: default to dotted quad instead of ret NULL to fix coverity warning Signed-off-by: Quentin Young --- ospf6d/ospf6_area.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index bf98f704da..e652a71bb6 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -223,11 +223,10 @@ ospf6_area_create (u_int32_t area_id, struct ospf6 *o, int df) case OSPF6_AREA_FMT_DECIMAL: snprintf (oa->name, sizeof (oa->name), "%u", ntohl (area_id)); break; + default: case OSPF6_AREA_FMT_DOTTEDQUAD: inet_ntop (AF_INET, &area_id, oa->name, sizeof (oa->name)); break; - default: - return NULL; } oa->area_id = area_id; From 79878cf73ee400a367af0f70d4edc63715eaed65 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Wed, 24 May 2017 11:31:10 -0700 Subject: [PATCH 179/193] zebra: add bgp unnumbered labeled-unicast to zserv Prior to the fix, labels weren't getting installed in zebra nor were the ifindex values correctly set if labeled-unicast was used in conjunction with bgp unnumbered. Ticket: CM-16531 Signed-off-by: Don Slice Reviewed-by: CCR-6276 --- zebra/zserv.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/zebra/zserv.c b/zebra/zserv.c index 0a33b166cd..eb4d19d04c 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1397,7 +1397,7 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct { unsigned int i; struct stream *s; - struct in6_addr nexthop; + struct in6_addr nhop_addr; struct rib *rib; u_char message; u_char nexthop_num; @@ -1407,11 +1407,14 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct static struct in6_addr nexthops[MULTIPATH_NUM]; static unsigned int ifindices[MULTIPATH_NUM]; int ret; + static mpls_label_t labels[MULTIPATH_NUM]; + mpls_label_t label; + struct nexthop *nexthop; /* Get input stream. */ s = client->ibuf; - memset (&nexthop, 0, sizeof (struct in6_addr)); + memset (&nhop_addr, 0, sizeof (struct in6_addr)); /* Allocate new rib. */ rib = XCALLOC (MTYPE_RIB, sizeof (struct rib)); @@ -1452,11 +1455,19 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct switch (nexthop_type) { case NEXTHOP_TYPE_IPV6: - stream_get (&nexthop, s, 16); - if (nh_count < multipath_num) { - nexthops[nh_count++] = nexthop; - } - break; + stream_get (&nhop_addr, s, 16); + if (nh_count < MULTIPATH_NUM) + { + /* For labeled-unicast, each nexthop is followed by label. */ + if (CHECK_FLAG (message, ZAPI_MESSAGE_LABEL)) + { + label = (mpls_label_t)stream_getl (s); + labels[nh_count] = label; + } + nexthops[nh_count] = nhop_addr; + nh_count++; + } + break; case NEXTHOP_TYPE_IFINDEX: if (if_count < multipath_num) { ifindices[if_count++] = stream_getl (s); @@ -1472,18 +1483,18 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct for (i = 0; i < max_nh_if; i++) { if ((i < nh_count) && !IN6_IS_ADDR_UNSPECIFIED (&nexthops[i])) { - if ((i < if_count) && ifindices[i]) { - rib_nexthop_ipv6_ifindex_add (rib, &nexthops[i], ifindices[i]); - } - else { - rib_nexthop_ipv6_add (rib, &nexthops[i]); - } + if ((i < if_count) && ifindices[i]) + nexthop = rib_nexthop_ipv6_ifindex_add (rib, &nexthops[i], ifindices[i]); + else + nexthop = rib_nexthop_ipv6_add (rib, &nexthops[i]); + + if (CHECK_FLAG (message, ZAPI_MESSAGE_LABEL)) + nexthop_add_labels (nexthop, nexthop->nh_label_type, 1, &labels[i]); } else { - if ((i < if_count) && ifindices[i]) { + if ((i < if_count) && ifindices[i]) rib_nexthop_ifindex_add (rib, ifindices[i]); - } - } + } } } From 1ac33779aae7ddc99dd5e1fd7ecd0709689c9b36 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 25 May 2017 13:53:50 -0400 Subject: [PATCH 180/193] vtysh: Add back some missing bgp commands Signed-off-by: Donald Sharp --- vtysh/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 29ffa7e22b..10d51f6ace 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -50,6 +50,7 @@ vtysh_scan += $(top_srcdir)/bgpd/bgp_dump.c vtysh_scan += $(top_srcdir)/bgpd/bgp_evpn_vty.c vtysh_scan += $(top_srcdir)/bgpd/bgp_filter.c vtysh_scan += $(top_srcdir)/bgpd/bgp_mplsvpn.c +vtysh_scan += $(top_srcdir)/bgpd/bgp_nexthop.c vtysh_scan += $(top_srcdir)/bgpd/bgp_route.c vtysh_scan += $(top_srcdir)/bgpd/bgp_routemap.c vtysh_scan += $(top_srcdir)/bgpd/bgp_vty.c From 8755598a08fd60cc30a7ed0b76512498244d63df Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 25 May 2017 21:11:24 -0400 Subject: [PATCH 181/193] zebra: Store commonly used values instead of regenerating the ipv4_ll address used for 5549 routes does not need to be figured out every single time that we attempt to install/remove a route of that type. Signed-off-by: Donald Sharp --- zebra/kernel_netlink.c | 2 ++ zebra/rt_netlink.c | 27 +++++++++++++++++---------- zebra/rt_netlink.h | 1 + 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 3efad44acb..e23801169b 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -817,6 +817,8 @@ kernel_init (struct zebra_ns *zns) thread_add_read(zebrad.master, kernel_read, zns, zns->netlink.sock, &zns->t_netlink); } + + rt_netlink_init (); } void diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 3c4f3171ff..4f1131809a 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -102,6 +102,21 @@ struct gw_family_t union g_addr gate; }; +char ipv4_ll_buf[16] = "169.254.0.1"; +struct in_addr ipv4_ll; + +/* + * The ipv4_ll data structure is used for all 5549 + * additions to the kernel. Let's figure out the + * correct value one time instead for every + * install/remove of a 5549 type route + */ +void +rt_netlink_init (void) +{ + inet_pton (AF_INET, ipv4_ll_buf, &ipv4_ll); +} + static inline int is_selfroute(int proto) { if ((proto == RTPROT_BGP) || (proto == RTPROT_OSPF) || @@ -678,10 +693,6 @@ _netlink_route_build_singlepath( (nexthop->type == NEXTHOP_TYPE_IPV6 || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) { - char buf[16] = "169.254.0.1"; - struct in_addr ipv4_ll; - - inet_pton (AF_INET, buf, &ipv4_ll); rtmsg->rtm_flags |= RTNH_F_ONLINK; addattr_l (nlmsg, req_size, RTA_GATEWAY, &ipv4_ll, 4); addattr32 (nlmsg, req_size, RTA_OIF, nexthop->ifindex); @@ -696,7 +707,7 @@ _netlink_route_build_singlepath( if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug(" 5549: _netlink_route_build_singlepath() (%s): " "nexthop via %s if %u", - routedesc, buf, nexthop->ifindex); + routedesc, ipv4_ll_buf, nexthop->ifindex); return; } @@ -883,10 +894,6 @@ _netlink_route_build_multipath( (nexthop->type == NEXTHOP_TYPE_IPV6 || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) { - char buf[16] = "169.254.0.1"; - struct in_addr ipv4_ll; - - inet_pton (AF_INET, buf, &ipv4_ll); bytelen = 4; rtnh->rtnh_flags |= RTNH_F_ONLINK; rta_addattr_l (rta, NL_PKT_BUF_SIZE, RTA_GATEWAY, @@ -902,7 +909,7 @@ _netlink_route_build_multipath( if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug(" 5549: netlink_route_build_multipath() (%s): " "nexthop via %s if %u", - routedesc, buf, nexthop->ifindex); + routedesc, ipv4_ll_buf, nexthop->ifindex); return; } diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h index 0e305beb37..4ec5f18535 100644 --- a/zebra/rt_netlink.h +++ b/zebra/rt_netlink.h @@ -34,6 +34,7 @@ #define RTPROT_RIP 189 #define RTPROT_RIPNG 190 +void rt_netlink_init (void); extern void clear_nhlfe_installed (zebra_lsp_t *lsp); From 66d4272752e3d10fe26de78343ee888471dcbfdc Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 25 May 2017 21:22:03 -0400 Subject: [PATCH 182/193] zebra: Remove string operations from non-debug path Signed-off-by: Donald Sharp --- zebra/rt_netlink.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 4f1131809a..55d48f7c61 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -711,6 +711,12 @@ _netlink_route_build_singlepath( return; } + /* + * label_buf is *only* currently used within debugging. + * As such when we assign it we are guarding it inside + * a debug test. If you want to change this make sure + * you fix this assumption + */ label_buf[0] = '\0'; /* outgoing label - either as NEWDST (in the case of LSR) or as ENCAP * (in the case of LER) @@ -734,13 +740,16 @@ _netlink_route_build_singlepath( { bos = ((i == (nh_label->num_labels - 1)) ? 1 : 0); out_lse[i] = mpls_lse_encode (nh_label->label[i], 0, 0, bos); - if (!num_labels) - sprintf (label_buf, "label %d", nh_label->label[i]); - else - { - sprintf (label_buf1, "/%d", nh_label->label[i]); - strcat (label_buf, label_buf1); - } + if (IS_ZEBRA_DEBUG_KERNEL) + { + if (!num_labels) + sprintf (label_buf, "label %d", nh_label->label[i]); + else + { + sprintf (label_buf1, "/%d", nh_label->label[i]); + strcat (label_buf, label_buf1); + } + } num_labels++; } } @@ -913,6 +922,12 @@ _netlink_route_build_multipath( return; } + /* + * label_buf is *only* currently used within debugging. + * As such when we assign it we are guarding it inside + * a debug test. If you want to change this make sure + * you fix this assumption + */ label_buf[0] = '\0'; /* outgoing label - either as NEWDST (in the case of LSR) or as ENCAP * (in the case of LER) @@ -936,13 +951,16 @@ _netlink_route_build_multipath( { bos = ((i == (nh_label->num_labels - 1)) ? 1 : 0); out_lse[i] = mpls_lse_encode (nh_label->label[i], 0, 0, bos); - if (!num_labels) - sprintf (label_buf, "label %d", nh_label->label[i]); - else - { - sprintf (label_buf1, "/%d", nh_label->label[i]); - strcat (label_buf, label_buf1); - } + if (IS_ZEBRA_DEBUG_KERNEL) + { + if (!num_labels) + sprintf (label_buf, "label %d", nh_label->label[i]); + else + { + sprintf (label_buf1, "/%d", nh_label->label[i]); + strcat (label_buf, label_buf1); + } + } num_labels++; } } From c5f119c06dbf56887709912cf247cc7679ffc411 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 22 May 2017 15:52:30 +0000 Subject: [PATCH 183/193] *: do not take address of packed member May result in alignment errors on certain platforms Signed-off-by: Quentin Young --- bgpd/bgp_open.h | 4 +--- eigrpd/eigrp_fsm.c | 4 ++-- eigrpd/eigrp_interface.c | 4 ++-- eigrpd/eigrp_network.c | 38 +++++++++++++++++++------------------- eigrpd/eigrp_network.h | 4 ++-- eigrpd/eigrp_topology.c | 10 +++++----- eigrpd/eigrp_update.c | 2 +- eigrpd/eigrp_zebra.c | 2 +- isisd/isis_pdu.c | 3 ++- isisd/iso_checksum.c | 11 ++++------- isisd/iso_checksum.h | 2 +- 11 files changed, 40 insertions(+), 44 deletions(-) diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h index 459b966dd2..4a9bcb2f71 100644 --- a/bgpd/bgp_open.h +++ b/bgpd/bgp_open.h @@ -36,7 +36,6 @@ struct capability_mp_data safi_t safi; }; -#pragma pack(1) struct capability_orf_entry { struct capability_mp_data mpc; @@ -45,8 +44,7 @@ struct capability_orf_entry u_char type; u_char mode; } orfs[]; -} __attribute__ ((packed)); -#pragma pack() +}; struct capability_as4 { diff --git a/eigrpd/eigrp_fsm.c b/eigrpd/eigrp_fsm.c index ad4eb70181..44a4747588 100644 --- a/eigrpd/eigrp_fsm.c +++ b/eigrpd/eigrp_fsm.c @@ -434,8 +434,8 @@ int eigrp_fsm_event_keep_state(struct eigrp_fsm_action_message *msg) if (prefix->state == EIGRP_FSM_STATE_PASSIVE) { - if (!eigrp_metrics_is_same(&prefix->reported_metric, - &((struct eigrp_neighbor_entry *) prefix->entries->head->data)->total_metric)) + if (!eigrp_metrics_is_same(prefix->reported_metric, + ((struct eigrp_neighbor_entry *) prefix->entries->head->data)->total_metric)) { prefix->rdistance = prefix->fdistance = diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 7e38a8da59..9b2c8f363f 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -310,7 +310,7 @@ eigrp_if_up (struct eigrp_interface *ei) pe->nt = EIGRP_TOPOLOGY_TYPE_CONNECTED; pe->state = EIGRP_FSM_STATE_PASSIVE; - pe->fdistance = eigrp_calculate_metrics (eigrp, &metric); + pe->fdistance = eigrp_calculate_metrics (eigrp, metric); pe->req_action |= EIGRP_FSM_NEED_UPDATE; eigrp_prefix_entry_add (eigrp->topology_table, pe); listnode_add(eigrp->topology_changes_internalIPV4, pe); @@ -319,7 +319,7 @@ eigrp_if_up (struct eigrp_interface *ei) ne->ei = ei; ne->reported_metric = metric; ne->total_metric = metric; - ne->distance = eigrp_calculate_metrics (eigrp, &metric); + ne->distance = eigrp_calculate_metrics (eigrp, metric); ne->reported_distance = 0; ne->prefix = pe; ne->adv_router = eigrp->neighbor_self; diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index 45d91025d1..cfed11a9eb 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -387,29 +387,29 @@ eigrp_network_unset(struct eigrp *eigrp, struct prefix_ipv4 *p) } u_int32_t -eigrp_calculate_metrics(struct eigrp *eigrp, struct eigrp_metrics *metric) +eigrp_calculate_metrics(struct eigrp *eigrp, struct eigrp_metrics metric) { uint64_t temp_metric; temp_metric = 0; - if(metric->delay == EIGRP_MAX_METRIC) + if(metric.delay == EIGRP_MAX_METRIC) return EIGRP_MAX_METRIC; // EIGRP Metric = {K1*BW+[(K2*BW)/(256-load)]+(K3*delay)}*{K5/(reliability+K4)} if (eigrp->k_values[0]) - temp_metric += (eigrp->k_values[0] * metric->bandwith); + temp_metric += (eigrp->k_values[0] * metric.bandwith); if (eigrp->k_values[1]) - temp_metric += ((eigrp->k_values[1] * metric->bandwith) - / (256 - metric->load)); + temp_metric += ((eigrp->k_values[1] * metric.bandwith) + / (256 - metric.load)); if (eigrp->k_values[2]) - temp_metric += (eigrp->k_values[2] * metric->delay); + temp_metric += (eigrp->k_values[2] * metric.delay); if (eigrp->k_values[3] && !eigrp->k_values[4]) temp_metric *= eigrp->k_values[3]; if (!eigrp->k_values[3] && eigrp->k_values[4]) - temp_metric *= (eigrp->k_values[4] / metric->reliability); + temp_metric *= (eigrp->k_values[4] / metric.reliability); if (eigrp->k_values[3] && eigrp->k_values[4]) - temp_metric *= ((eigrp->k_values[4] / metric->reliability) + temp_metric *= ((eigrp->k_values[4] / metric.reliability) + eigrp->k_values[3]); if (temp_metric <= EIGRP_MAX_METRIC) @@ -432,21 +432,21 @@ eigrp_calculate_total_metrics(struct eigrp *eigrp, entry->total_metric.bandwith = entry->total_metric.bandwith > bw ? bw : entry->total_metric.bandwith; - return eigrp_calculate_metrics(eigrp, &entry->total_metric); + return eigrp_calculate_metrics(eigrp, entry->total_metric); } u_char -eigrp_metrics_is_same(struct eigrp_metrics *metric1, - struct eigrp_metrics *metric2) +eigrp_metrics_is_same(struct eigrp_metrics metric1, + struct eigrp_metrics metric2) { - if ((metric1->bandwith == metric2->bandwith) - && (metric1->delay == metric2->delay) - && (metric1->hop_count == metric2->hop_count) - && (metric1->load == metric2->load) - && (metric1->reliability == metric2->reliability) - && (metric1->mtu[0] == metric2->mtu[0]) - && (metric1->mtu[1] == metric2->mtu[1]) - && (metric1->mtu[2] == metric2->mtu[2])) + if ((metric1.bandwith == metric2.bandwith) + && (metric1.delay == metric2.delay) + && (metric1.hop_count == metric2.hop_count) + && (metric1.load == metric2.load) + && (metric1.reliability == metric2.reliability) + && (metric1.mtu[0] == metric2.mtu[0]) + && (metric1.mtu[1] == metric2.mtu[1]) + && (metric1.mtu[2] == metric2.mtu[2])) return 1; return 0; // if different diff --git a/eigrpd/eigrp_network.h b/eigrpd/eigrp_network.h index bcca2609a8..82ac455c96 100644 --- a/eigrpd/eigrp_network.h +++ b/eigrpd/eigrp_network.h @@ -43,9 +43,9 @@ extern int eigrp_if_drop_allspfrouters (struct eigrp *top, struct prefix *p, unsigned int ifindex); extern void eigrp_adjust_sndbuflen (struct eigrp *, unsigned int); -extern u_int32_t eigrp_calculate_metrics (struct eigrp *, struct eigrp_metrics *); +extern u_int32_t eigrp_calculate_metrics (struct eigrp *, struct eigrp_metrics); extern u_int32_t eigrp_calculate_total_metrics (struct eigrp *, struct eigrp_neighbor_entry *); -extern u_char eigrp_metrics_is_same(struct eigrp_metrics *,struct eigrp_metrics *); +extern u_char eigrp_metrics_is_same(struct eigrp_metrics, struct eigrp_metrics); extern void eigrp_external_routes_refresh (struct eigrp *, int); #endif /* EIGRP_NETWORK_H_ */ diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index d422b450ed..245b6adce8 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -423,24 +423,24 @@ eigrp_topology_update_distance(struct eigrp_fsm_action_message *msg) if (msg->data_type == EIGRP_TLV_IPv4_INT) { int_data = msg->data.ipv4_int_type; - if (eigrp_metrics_is_same(&int_data->metric,&entry->reported_metric)) + if (eigrp_metrics_is_same(int_data->metric, entry->reported_metric)) { return 0; // No change } change = entry->reported_distance - < eigrp_calculate_metrics(eigrp, &int_data->metric) ? 1 : + < eigrp_calculate_metrics(eigrp, int_data->metric) ? 1 : entry->reported_distance - > eigrp_calculate_metrics(eigrp, &int_data->metric) ? 2 : 3; // Increase : Decrease : No change + > eigrp_calculate_metrics(eigrp, int_data->metric) ? 2 : 3; // Increase : Decrease : No change entry->reported_metric = int_data->metric; entry->reported_distance = - eigrp_calculate_metrics(eigrp, &int_data->metric); + eigrp_calculate_metrics(eigrp, int_data->metric); entry->distance = eigrp_calculate_total_metrics(eigrp, entry); } else { ext_data = msg->data.ipv4_ext_data; - if (eigrp_metrics_is_same (&ext_data->metric, &entry->reported_metric)) + if (eigrp_metrics_is_same (ext_data->metric, entry->reported_metric)) return 0; } /* diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 98b2defea0..164907885b 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -344,7 +344,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * ne->reported_metric = tlv->metric; ne->reported_distance = eigrp_calculate_metrics(eigrp, - &tlv->metric); + tlv->metric); /* * Filtering */ diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index ba6ecf2452..2baad75265 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -509,7 +509,7 @@ eigrp_redistribute_set (struct eigrp *eigrp, int type, struct eigrp_metrics metr if (eigrp_is_type_redistributed (type)) { - if (eigrp_metrics_is_same(&metric, &eigrp->dmetric[type])) + if (eigrp_metrics_is_same(metric, eigrp->dmetric[type])) { eigrp->dmetric[type] = metric; } diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 69beade477..d62682b10f 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1315,7 +1315,8 @@ process_lsp (int level, struct isis_circuit *circuit, const u_char *ssnpa) /* Checksum sanity check - FIXME: move to correct place */ /* 12 = sysid+pdu+remtime */ if (iso_csum_verify (STREAM_PNT (circuit->rcv_stream) + 4, - pdu_len - 12, &hdr->checksum)) + pdu_len - 12, hdr->checksum, + offsetof(struct isis_link_state_hdr, checksum) - 4)) { zlog_debug ("ISIS-Upd (%s): LSP %s invalid LSP checksum 0x%04x", circuit->area->area_tag, diff --git a/isisd/iso_checksum.c b/isisd/iso_checksum.c index d036c0ba76..70b6b91edb 100644 --- a/isisd/iso_checksum.c +++ b/isisd/iso_checksum.c @@ -46,14 +46,14 @@ */ int -iso_csum_verify (u_char * buffer, int len, uint16_t * csum) +iso_csum_verify (u_char * buffer, int len, uint16_t csum, int offset) { u_int16_t checksum; u_int32_t c0; u_int32_t c1; - c0 = *csum & 0xff00; - c1 = *csum & 0x00ff; + c0 = csum & 0xff00; + c1 = csum & 0x00ff; /* * If both are zero return correct @@ -67,11 +67,8 @@ iso_csum_verify (u_char * buffer, int len, uint16_t * csum) if (c0 == 0 || c1 == 0) return 1; - /* Offset of checksum from the start of the buffer */ - int offset = (u_char *) csum - buffer; - checksum = fletcher_checksum(buffer, len, offset); - if (checksum == *csum) + if (checksum == csum) return 0; return 1; } diff --git a/isisd/iso_checksum.h b/isisd/iso_checksum.h index cca6ee24a4..50f6a7d560 100644 --- a/isisd/iso_checksum.h +++ b/isisd/iso_checksum.h @@ -23,6 +23,6 @@ #ifndef _ZEBRA_ISO_CSUM_H #define _ZEBRA_ISO_CSUM_H -int iso_csum_verify (u_char * buffer, int len, uint16_t * csum); +int iso_csum_verify (u_char * buffer, int len, uint16_t csum, int offset); #endif /* _ZEBRA_ISO_CSUM_H */ From 000fe2ca4c02010c7f9c63b9b86e7e29c9ceacd0 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 26 May 2017 15:21:36 +0000 Subject: [PATCH 184/193] bgpd: remove struct capability_orf_entry virtually unused Signed-off-by: Quentin Young --- bgpd/bgp_open.c | 23 ++++++++++++----------- bgpd/bgp_open.h | 10 ---------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 4374729668..cbec1a8320 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -266,7 +266,8 @@ static int bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr) { struct stream *s = BGP_INPUT (peer); - struct capability_orf_entry entry; + struct capability_mp_data mpc; + u_char num; iana_afi_t pkt_afi; afi_t afi; safi_t pkt_safi, safi; @@ -277,14 +278,14 @@ bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr) int i; /* ORF Entry header */ - bgp_capability_mp_data (s, &entry.mpc); - entry.num = stream_getc (s); - pkt_afi = entry.mpc.afi; - pkt_safi = entry.mpc.safi; + bgp_capability_mp_data (s, &mpc); + num = stream_getc (s); + pkt_afi = mpc.afi; + pkt_safi = mpc.safi; if (bgp_debug_neighbor_events(peer)) zlog_debug ("%s ORF Cap entry for afi/safi: %u/%u", - peer->host, entry.mpc.afi, entry.mpc.safi); + peer->host, mpc.afi, mpc.safi); /* Convert AFI, SAFI to internal values, check. */ if (bgp_map_afi_safi_iana2int (pkt_afi, pkt_safi, &afi, &safi)) @@ -295,20 +296,20 @@ bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr) return 0; } - entry.mpc.afi = pkt_afi; - entry.mpc.safi = safi; + mpc.afi = pkt_afi; + mpc.safi = safi; /* validate number field */ - if (CAPABILITY_CODE_ORF_LEN + (entry.num * 2) > hdr->length) + if (CAPABILITY_CODE_ORF_LEN + (num * 2) > hdr->length) { zlog_info ("%s ORF Capability entry length error," " Cap length %u, num %u", - peer->host, hdr->length, entry.num); + peer->host, hdr->length, num); bgp_notify_send (peer, BGP_NOTIFY_OPEN_ERR, BGP_NOTIFY_OPEN_MALFORMED_ATTR); return -1; } - for (i = 0 ; i < entry.num ; i++) + for (i = 0 ; i < num ; i++) { type = stream_getc(s); mode = stream_getc(s); diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h index 4a9bcb2f71..0b0d9023e0 100644 --- a/bgpd/bgp_open.h +++ b/bgpd/bgp_open.h @@ -36,16 +36,6 @@ struct capability_mp_data safi_t safi; }; -struct capability_orf_entry -{ - struct capability_mp_data mpc; - u_char num; - struct { - u_char type; - u_char mode; - } orfs[]; -}; - struct capability_as4 { uint32_t as4; From a1579fd393069430c3f21f092e82dec3510ba17a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 26 May 2017 14:05:35 -0400 Subject: [PATCH 185/193] zebra: Fix 64 bit number printf issues Signed-off-by: Donald Sharp --- zebra/zserv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zserv.c b/zebra/zserv.c index 0a33b166cd..1e3a36a261 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2830,7 +2830,7 @@ DEFUN (show_zebra, RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { struct zebra_vrf *zvrf = vrf->info; - vty_out (vty,"%-25s %10ld %10ld %10ld %10ld %10ld%s", + vty_out (vty,"%-25s %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 " %10" PRIu64 "%s", vrf->name, zvrf->installs, zvrf->removals, zvrf->neigh_updates, zvrf->lsp_installs, zvrf->lsp_removals, VTY_NEWLINE); From 901fda9830d7379d802f7c8db719e63c65e757ed Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 26 May 2017 16:19:08 -0400 Subject: [PATCH 186/193] nhrpd: Fix missing include for 'access_list_init' function Signed-off-by: Donald Sharp --- nhrpd/nhrp_vty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index ef8b6ee0a6..f62be74042 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -11,6 +11,7 @@ #include "command.h" #include "zclient.h" #include "stream.h" +#include "filter.h" #include "nhrpd.h" #include "netlink.h" From d911a12a4e42cbcd9081e24c2ce4bdaf717e2e8b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 27 May 2017 18:20:51 -0400 Subject: [PATCH 187/193] ripngd: Fix missing newlines at end of help strings Found by visual inspection and some squinting Signed-off-by: Donald Sharp --- ripngd/ripng_interface.c | 4 ++-- ripngd/ripngd.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 81b68ad9d7..41879b259b 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -949,7 +949,7 @@ DEFUN (ripng_network, ripng_network_cmd, "network IF_OR_ADDR", "RIPng enable on specified interface or network.\n" - "Interface or address") + "Interface or address\n") { int idx_if_or_addr = 1; int ret; @@ -979,7 +979,7 @@ DEFUN (no_ripng_network, "no network IF_OR_ADDR", NO_STR "RIPng enable on specified interface or network.\n" - "Interface or address") + "Interface or address\n") { int idx_if_or_addr = 2; int ret; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index a58b7c250d..f373598bea 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2170,7 +2170,7 @@ DEFUN (clear_ipv6_rip, "clear ipv6 ripng", CLEAR_STR IPV6_STR - "Clear IPv6 RIP database") + "Clear IPv6 RIP database\n") { struct route_node *rp; struct ripng_info *rinfo; @@ -2357,7 +2357,7 @@ DEFUN (no_ripng_aggregate_address, "no aggregate-address X:X::X:X/M", NO_STR "Delete aggregate RIPng route announcement\n" - "Aggregate network") + "Aggregate network\n") { int idx_ipv6_prefixlen = 2; int ret; @@ -2576,7 +2576,7 @@ DEFUN (show_ipv6_protocols, "show ipv6 protocols", SHOW_STR IPV6_STR - "Routing protocol information") + "Routing protocol information\n") { if (! ripng) return CMD_SUCCESS; From 8f5f09c8a12e1e0f623fbd50d4c3581cca3070c8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 27 May 2017 18:48:41 -0400 Subject: [PATCH 188/193] ripngd: Let ripng announce interface turned on for usage. Signed-off-by: Donald Sharp --- ripngd/ripng_interface.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 41879b259b..0bd4a0bd1b 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -755,16 +755,13 @@ ripng_enable_apply (struct interface *ifp) /* Update running status of the interface. */ if (ri->enable_network || ri->enable_interface) { - { - if (IS_RIPNG_DEBUG_EVENT) - zlog_debug ("RIPng turn on %s", ifp->name); + zlog_info ("RIPng INTERFACE ON %s", ifp->name); - /* Add interface wake up thread. */ - thread_add_timer(master, ripng_interface_wakeup, ifp, 1, - &ri->t_wakeup); + /* Add interface wake up thread. */ + thread_add_timer(master, ripng_interface_wakeup, ifp, 1, + &ri->t_wakeup); - ripng_connect_set (ifp, 1); - } + ripng_connect_set (ifp, 1); } else { From db215e1f4dd0ce3e80e0e00e1729d60f5fefc5b4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 29 May 2017 07:08:52 -0400 Subject: [PATCH 189/193] eigrpd: Fix network statement Signed-off-by: Donald Sharp --- eigrpd/eigrp_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 7e38a8da59..14829be31a 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -305,7 +305,7 @@ eigrp_if_up (struct eigrp_interface *ei) pe->serno = eigrp->serno; pe->destination_ipv4 = prefix_ipv4_new (); prefix_copy ((struct prefix *)pe->destination_ipv4, - (struct prefix *)&dest_addr); + (struct prefix *)dest_addr); pe->af = AF_INET; pe->nt = EIGRP_TOPOLOGY_TYPE_CONNECTED; From 4038e8046d5ac33e44809bd3b0ae4d872d9af213 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 29 May 2017 19:41:40 -0300 Subject: [PATCH 190/193] zebra: fix processing of labeled ipv6 routes We're incrementing nh_count twice for the same nexthop. Signed-off-by: Renato Westphal --- zebra/zserv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zserv.c b/zebra/zserv.c index 921e500304..e93299d622 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1609,7 +1609,7 @@ zread_ipv6_add (struct zserv *client, u_short length, struct zebra_vrf *zvrf) if (CHECK_FLAG (message, ZAPI_MESSAGE_LABEL)) { label = (mpls_label_t)stream_getl (s); - labels[nh_count++] = label; + labels[nh_count] = label; } nexthops[nh_count++] = nhop_addr; } From 6a2ef37ad0fdd24b2636666a40bf07b4df50aa5c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 29 May 2017 19:48:11 -0300 Subject: [PATCH 191/193] zebra: fix installation of ipv4 labeled unicast routes Rearrange the _netlink_route_build*() functions so the labels of the nexthops are always installed, even for IPv4 routes with IPv6 nexthops. Fixes Labeled Unicast with BGP Unnumbered. Signed-off-by: Renato Westphal --- zebra/rt_netlink.c | 91 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 55d48f7c61..f22f4acb08 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -689,28 +689,6 @@ _netlink_route_build_singlepath( mpls_lse_t out_lse[MPLS_MAX_LABELS]; char label_buf[100]; - if (rtmsg->rtm_family == AF_INET && - (nexthop->type == NEXTHOP_TYPE_IPV6 - || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) - { - rtmsg->rtm_flags |= RTNH_F_ONLINK; - addattr_l (nlmsg, req_size, RTA_GATEWAY, &ipv4_ll, 4); - addattr32 (nlmsg, req_size, RTA_OIF, nexthop->ifindex); - - if (nexthop->rmap_src.ipv4.s_addr && (cmd == RTM_NEWROUTE)) - addattr_l (nlmsg, req_size, RTA_PREFSRC, - &nexthop->rmap_src.ipv4, bytelen); - else if (nexthop->src.ipv4.s_addr && (cmd == RTM_NEWROUTE)) - addattr_l (nlmsg, req_size, RTA_PREFSRC, - &nexthop->src.ipv4, bytelen); - - if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug(" 5549: _netlink_route_build_singlepath() (%s): " - "nexthop via %s if %u", - routedesc, ipv4_ll_buf, nexthop->ifindex); - return; - } - /* * label_buf is *only* currently used within debugging. * As such when we assign it we are guarding it inside @@ -776,6 +754,28 @@ _netlink_route_build_singlepath( if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ONLINK)) rtmsg->rtm_flags |= RTNH_F_ONLINK; + if (rtmsg->rtm_family == AF_INET && + (nexthop->type == NEXTHOP_TYPE_IPV6 + || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) + { + rtmsg->rtm_flags |= RTNH_F_ONLINK; + addattr_l (nlmsg, req_size, RTA_GATEWAY, &ipv4_ll, 4); + addattr32 (nlmsg, req_size, RTA_OIF, nexthop->ifindex); + + if (nexthop->rmap_src.ipv4.s_addr && (cmd == RTM_NEWROUTE)) + addattr_l (nlmsg, req_size, RTA_PREFSRC, + &nexthop->rmap_src.ipv4, bytelen); + else if (nexthop->src.ipv4.s_addr && (cmd == RTM_NEWROUTE)) + addattr_l (nlmsg, req_size, RTA_PREFSRC, + &nexthop->src.ipv4, bytelen); + + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug(" 5549: _netlink_route_build_singlepath() (%s): " + "nexthop via %s %s if %u", + routedesc, ipv4_ll_buf, label_buf, nexthop->ifindex); + return; + } + if (nexthop->type == NEXTHOP_TYPE_IPV4 || nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) { @@ -801,6 +801,7 @@ _netlink_route_build_singlepath( inet_ntoa (nexthop->gate.ipv4), label_buf, nexthop->ifindex); } + if (nexthop->type == NEXTHOP_TYPE_IPV6 || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX) { @@ -899,29 +900,6 @@ _netlink_route_build_multipath( rtnh->rtnh_hops = 0; rta->rta_len += rtnh->rtnh_len; - if (rtmsg->rtm_family == AF_INET && - (nexthop->type == NEXTHOP_TYPE_IPV6 - || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) - { - bytelen = 4; - rtnh->rtnh_flags |= RTNH_F_ONLINK; - rta_addattr_l (rta, NL_PKT_BUF_SIZE, RTA_GATEWAY, - &ipv4_ll, bytelen); - rtnh->rtnh_len += sizeof (struct rtattr) + bytelen; - rtnh->rtnh_ifindex = nexthop->ifindex; - - if (nexthop->rmap_src.ipv4.s_addr) - *src = &nexthop->rmap_src; - else if (nexthop->src.ipv4.s_addr) - *src = &nexthop->src; - - if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug(" 5549: netlink_route_build_multipath() (%s): " - "nexthop via %s if %u", - routedesc, ipv4_ll_buf, nexthop->ifindex); - return; - } - /* * label_buf is *only* currently used within debugging. * As such when we assign it we are guarding it inside @@ -992,6 +970,29 @@ _netlink_route_build_multipath( if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ONLINK)) rtnh->rtnh_flags |= RTNH_F_ONLINK; + if (rtmsg->rtm_family == AF_INET && + (nexthop->type == NEXTHOP_TYPE_IPV6 + || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)) + { + bytelen = 4; + rtnh->rtnh_flags |= RTNH_F_ONLINK; + rta_addattr_l (rta, NL_PKT_BUF_SIZE, RTA_GATEWAY, + &ipv4_ll, bytelen); + rtnh->rtnh_len += sizeof (struct rtattr) + bytelen; + rtnh->rtnh_ifindex = nexthop->ifindex; + + if (nexthop->rmap_src.ipv4.s_addr) + *src = &nexthop->rmap_src; + else if (nexthop->src.ipv4.s_addr) + *src = &nexthop->src; + + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug(" 5549: netlink_route_build_multipath() (%s): " + "nexthop via %s %s if %u", + routedesc, ipv4_ll_buf, label_buf, nexthop->ifindex); + return; + } + if (nexthop->type == NEXTHOP_TYPE_IPV4 || nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) { From 8282ecff1785bfac02fa8791d130c76d4957a783 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Tue, 30 May 2017 08:30:57 -0300 Subject: [PATCH 192/193] bgpd: fix segfault with some show commands The following commands were causing bgpd to crash when vpnv4/vpnv6 static routes are configured: bgpd aborted: vtysh -c "show ip bgp view all ipv4 vpn json" bgpd aborted: vtysh -c "show ip bgp view all ipv4 vpn" bgpd aborted: vtysh -c "show ip bgp view all ipv6 vpn json" bgpd aborted: vtysh -c "show ip bgp view all ipv6 vpn" bgpd aborted: vtysh -c "show ip bgp vrf all ipv4 vpn json" bgpd aborted: vtysh -c "show ip bgp vrf all ipv4 vpn" bgpd aborted: vtysh -c "show ip bgp vrf all ipv6 vpn json" bgpd aborted: vtysh -c "show ip bgp vrf all ipv6 vpn" bgpd aborted: vtysh -c "show bgp view all ipv4 vpn json" bgpd aborted: vtysh -c "show bgp view all ipv4 vpn" bgpd aborted: vtysh -c "show bgp view all ipv6 vpn json" bgpd aborted: vtysh -c "show bgp view all ipv6 vpn" bgpd aborted: vtysh -c "show bgp vrf all ipv4 vpn json" bgpd aborted: vtysh -c "show bgp vrf all ipv4 vpn" bgpd aborted: vtysh -c "show bgp vrf all ipv6 vpn json" bgpd aborted: vtysh -c "show bgp vrf all ipv6 vpn" Problem found with the CLI fuzzer. Signed-off-by: Renato Westphal --- bgpd/bgp_route.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 7a328e79d7..fae7da881a 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8071,7 +8071,6 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi, { struct listnode *node, *nnode; struct bgp *bgp; - struct bgp_table *table; int is_first = 1; if (use_json) @@ -8097,9 +8096,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi, ? "Default" : bgp->name, VTY_NEWLINE); } - table = bgp->rib[afi][safi]; - bgp_show_table (vty, bgp, table, - bgp_show_type_normal, NULL, use_json); + bgp_show (vty, bgp, afi, safi, bgp_show_type_normal, NULL, use_json); } From 4dfee0ce4e08f587ceccfecfdd75d0b002cc4e5d Mon Sep 17 00:00:00 2001 From: Don Slice Date: Fri, 26 May 2017 17:05:18 +0000 Subject: [PATCH 193/193] bgpd: labeled-unicast issue changing from no import-check to using import-check Problem seen in testing import-check using labeled-unicast address-family. When transitioning from "no bgp network import-check" to "bgp network import-check", previously installed networks were not removed. This fix resolves this. Ticket: CM-16512 Signed-off-by: Don Slice --- bgpd/bgp_route.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 7a328e79d7..41ce7fb6d0 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3901,10 +3901,9 @@ bgp_static_update (struct bgp *bgp, struct prefix *p, /* Nexthop reachability check. */ if (bgp_flag_check (bgp, BGP_FLAG_IMPORT_CHECK) && - safi == SAFI_UNICAST) + (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST)) { - if (bgp_find_or_add_nexthop (bgp, afi, ri, NULL, 0) && - safi == SAFI_UNICAST) + if (bgp_find_or_add_nexthop (bgp, afi, ri, NULL, 0)) bgp_info_set_flag (rn, ri, BGP_INFO_VALID); else { @@ -3942,7 +3941,8 @@ bgp_static_update (struct bgp *bgp, struct prefix *p, new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_STATIC, 0, bgp->peer_self, attr_new, rn); /* Nexthop reachability check. */ - if (bgp_flag_check (bgp, BGP_FLAG_IMPORT_CHECK)) + if (bgp_flag_check (bgp, BGP_FLAG_IMPORT_CHECK) && + (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST)) { if (bgp_find_or_add_nexthop (bgp, afi, new, NULL, 0)) bgp_info_set_flag (rn, new, BGP_INFO_VALID);