From 4765f35eb0463b08cfdd2b58c9ecf821d358a18a Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 29 Nov 2016 10:44:17 +0100 Subject: [PATCH 01/11] build: improve COMMUNITY.md formatting Add a render_md.py helper to convert it to HTML (needs python "markdown" module installed). Signed-off-by: David Lamparter --- COMMUNITY.md | 33 +++++++++++++++++++-------------- render_md.py | 24 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 render_md.py diff --git a/COMMUNITY.md b/COMMUNITY.md index 9539c7e572..80478ceffe 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -1,10 +1,11 @@ # Developing for PROJECT (DRAFT) +[TOC] ## Git Structure The master Git for PROJECT resides on Github at -https://github.com/PROJECT/XXX +[https://github.com/PROJECT/XXX](https://github.com/PROJECT/XXX) There are 3 main branches for development and a release branch for each major release. @@ -39,14 +40,14 @@ preference on Markdown. ## Before Submitting your changes -* Format code (see Code Styling requirements) -* Verify and acknowledge license (see License for contributions) +* Format code (see [Code Styling requirements](#code-styling-requirements)) +* Verify and acknowledge license (see [License for contributions](#license-for-contributions)) * Test building with various configurations: - * `buildtest.sh` + * `buildtest.sh` * Verify building source distribution: - * `make dist` (and try rebuilding from the resulting tar file) + * `make dist` (and try rebuilding from the resulting tar file) * Run DejaGNU unit tests: - * `make test` + * `make test` * Document Regression Runs and plans for continued maintenance of the feature ### Changelog @@ -118,7 +119,7 @@ website](http://www.linuxfoundation.org/content/how-participate-linux-community- to be a helpful resource. -#### Code submission - Github Pull Request (Strongly Preferred) +### Code submission - Github Pull Request (Strongly Preferred) Preferred submission of code is by using a Github Pull Request against the Develop branch. Code submitted by Pull Request will have an email generated to @@ -133,7 +134,7 @@ Further (manual) code review and discussion happens after the merge into the develop branch. -#### Code submission - Mailing Patch to PROJECT-Devel list +### Code submission - Mailing Patch to PROJECT-Devel list As an alternative submission, a patch can be mailed to the PROJECT-Devel mailing list. Preferred way to send the patch is using git send-mail. Patches @@ -144,7 +145,7 @@ the patch is then merged into the develop branch. Further (manual) code review and discussion happens after the merge into the develop branch. -Sending patch to mailing list +#### Sending patch to mailing list The recommended way to send the patch (or series of NN patches) to the list is by using ‘git send-email’ as follows (assuming they are the most recent NN @@ -172,10 +173,11 @@ and will allow your changes to merge faster * You should automatically receive an email with the test results within less than 2 hrs of the submission. If you don’t get the email, then check status on the github pull request (if submitted by pull request) or on - Patchwork at https://patchwork.PROJECT.org (if submitted as patch to - mailing list). + Patchwork at + [https://patchwork.PROJECT.org](https://patchwork.PROJECT.org) (if + submitted as patch to mailing list). * Please notify PROJECT-Devel mailing list if you think something doesn’t - work + work * If the tests failed: * In general, expect the community to ignore the submission until the tests pass. @@ -202,8 +204,9 @@ and will allow your changes to merge faster ### File header required for new files added -New files need to have a Copyright header (see License for contributions above) -added to the file. Preferred form of the header is as follows: +New files need to have a Copyright header (see [License for +contributions](#license-for-contributions) above) added to the file. Preferred +form of the header is as follows: ``` /* @@ -225,6 +228,8 @@ added to the file. Preferred form of the header is as follows: Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include ``` ### Adding Copyright claims to already existing file diff --git a/render_md.py b/render_md.py new file mode 100644 index 0000000000..a819c784e8 --- /dev/null +++ b/render_md.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# written 2016 by David Lamparter, placed in Public Domain. +import sys, markdown + +template = ''' +%s + +''' + +md = markdown.Markdown(extensions=['extra', 'toc']) + +for fn in sys.argv[1:]: + with open(fn, 'r') as ifd: + with open('%s.html' % (fn), 'w') as ofd: + ofd.write((template % (md.convert(ifd.read().decode('UTF-8')))).encode('UTF-8')) From 487f230202efbf74572cf2d16045de90ab28c780 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 29 Nov 2016 12:47:11 -0500 Subject: [PATCH 02/11] ospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp Ticket: CM-13712 (cherry picked from commit 367b138748e894bbfaae36d1cf7c90eafebfebc9) Signed-off-by: David Lamparter --- ospfd/ospf_bfd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index c87bcb0afb..9ad8508510 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -369,10 +369,16 @@ DEFUN (ip_ospf_bfd, "Enables BFD support\n") { struct interface *ifp = (struct interface *) vty->index; + struct ospf_if_params *params; + struct bfd_info *bfd_info; assert (ifp); - ospf_bfd_if_param_set (ifp, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, - BFD_DEF_DETECT_MULT, 1); + params = IF_DEF_PARAMS (ifp); + bfd_info = params->bfd_info; + + if (!bfd_info || ! CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG)) + ospf_bfd_if_param_set (ifp, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, + BFD_DEF_DETECT_MULT, 1); return CMD_SUCCESS; } From fa86975d474cc246c5236077bef366f5f0f0644d Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 29 Nov 2016 12:47:12 -0500 Subject: [PATCH 03/11] bgpd: fix "show ip bgp" column alignment The "Weight" column is off: BGP table version is 0, local router ID is 10.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 4.1.1.2/32 9.9.9.2 0 32768 ? *> 4.1.1.4/32 9.9.9.2 0 32768 ? Displayed 2 out of 2 total prefixes Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp (cherry picked from commit 65c7395b07e8c592c847d4a1e22fc89ddf448341) Signed-off-by: David Lamparter --- 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 8520466995..23ecefa6e2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6254,7 +6254,7 @@ route_vty_out (struct vty *vty, struct prefix *p, if (json_paths) json_object_int_add(json_path, "med", attr->med); else - vty_out (vty, "%10u ", attr->med); + vty_out (vty, "%10u", attr->med); else if (!json_paths) vty_out (vty, " "); @@ -6264,7 +6264,7 @@ route_vty_out (struct vty *vty, struct prefix *p, if (json_paths) json_object_int_add(json_path, "localpref", attr->local_pref); else - vty_out (vty, "%7u ", attr->local_pref); + vty_out (vty, "%7u", attr->local_pref); else if (!json_paths) vty_out (vty, " "); @@ -6437,12 +6437,12 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, struct attr *attr, safi_t } #endif /* HAVE_IPV6 */ if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC)) - vty_out (vty, "%10u ", attr->med); + vty_out (vty, "%10u", attr->med); else vty_out (vty, " "); if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF)) - vty_out (vty, "%7u ", attr->local_pref); + vty_out (vty, "%7u", attr->local_pref); else vty_out (vty, " "); From 6d19ff21152f79e063bc437424756aa07ae0fde6 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 29 Nov 2016 20:31:43 +0100 Subject: [PATCH 04/11] build: drop TODO from redhat/quagga.spec.in Fixes: 955026c8... "build: ditch outdated documents, including HACKING" Signed-off-by: David Lamparter --- redhat/quagga.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat/quagga.spec.in b/redhat/quagga.spec.in index 4c35a8bf68..207889d923 100644 --- a/redhat/quagga.spec.in +++ b/redhat/quagga.spec.in @@ -489,7 +489,7 @@ rm -rf %{buildroot} %doc */*.sample* AUTHORS COPYING %doc doc/quagga.html %doc doc/mpls -%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO +%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES %if 0%{?quagga_user:1} %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga From 0cad6e2653d8b00e8c073765756224fa7bb62e59 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 Nov 2016 08:23:11 -0500 Subject: [PATCH 05/11] ospfd: Fix memory leak when not using json When doing a show command under ospf, if not using json we would have a small memory leak in show_ip_ospf_common. Signed-off-by: Donald Sharp (cherry picked from commit 50750712b1ac8364e290c67782eaf371025dc59e) Signed-off-by: David Lamparter --- ospfd/ospf_vty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index b0946600ba..43a443421f 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3299,8 +3299,10 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) json_object *json_areas = NULL; if (use_json) - json = json_object_new_object(); - json_areas = json_object_new_object(); + { + json = json_object_new_object(); + json_areas = json_object_new_object(); + } if (ospf->instance) { From 94d95cde35b09388d5e1d23ae44b129be0b14673 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 Nov 2016 08:23:12 -0500 Subject: [PATCH 06/11] pimd: Fix large integer display of drpriority When displaying drpriority you can enter unsigned integer values from 1-2^32. The display was turning the unsigned value into a signed value and thus we were displaying the wrong value. Ticket: CM-13787 Signed-off-by: Donald Sharp Reviewed-by: David Ahern (cherry picked from commit db17265f1025e3ec578998ad537c33b49ed33cde) Signed-off-by: David Lamparter --- 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 f1c8930856..037a00c4da 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -148,7 +148,7 @@ int pim_interface_config_write(struct vty *vty) /* IF ip pim drpriority */ if (pim_ifp->pim_dr_priority != PIM_DEFAULT_DR_PRIORITY) { - vty_out(vty, " ip pim drpriority %d%s", pim_ifp->pim_dr_priority, + vty_out(vty, " ip pim drpriority %u%s", pim_ifp->pim_dr_priority, VTY_NEWLINE); ++writes; } From 34620e24b5d8fcb0d66f77dfb39bcd8da636564a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 1 Dec 2016 09:11:12 -0500 Subject: [PATCH 07/11] bgpd: Fix crashes when no default bgp instance is configured. The vnc code assumes that bgp must have a default instance. This code change checks to make sure that we do before proceeding. It makes no assurances that vnc will behave correctly without a default instance. Signed-off-by: Donald Sharp Signed-off-by: David Lamparter --- bgpd/rfapi/rfapi_import.c | 3 ++- bgpd/rfapi/vnc_import_bgp.c | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index 8783024f16..77da4f9eed 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -4414,7 +4414,8 @@ rfapiProcessPeerDown (struct peer *peer) */ bgp = bgp_get_default (); /* assume 1 instance for now */ - assert (bgp); + if (!bgp) + return; h = bgp->rfapi; assert (h); diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c index 4215ce2bf7..dc2640ab9e 100644 --- a/bgpd/rfapi/vnc_import_bgp.c +++ b/bgpd/rfapi/vnc_import_bgp.c @@ -208,12 +208,17 @@ prefix_bag_free (void *pb) static void print_rhn_list (const char *tag1, const char *tag2) { - struct bgp *bgp = bgp_get_default (); - struct skiplist *sl = bgp->rfapi->resolve_nve_nexthop; + struct bgp *bgp; + struct skiplist *sl; struct skiplistnode *p; struct prefix_bag *pb; int count = 0; + bgp = bgp_get_default (); + if (!bgp) + return; + + sl = bgp->frapi->resolve_nve_nexthop; if (!sl) { zlog_debug ("%s: %s: RHN List is empty", (tag1 ? tag1 : ""), @@ -251,6 +256,8 @@ vnc_rhnck (char *tag) struct skiplistnode *p; bgp = bgp_get_default (); + if (!bgp) + return; sl = bgp->rfapi->resolve_nve_nexthop; if (!sl) @@ -1798,6 +1805,9 @@ vnc_import_bgp_exterior_add_route_it ( struct bgp *bgp_default = bgp_get_default (); afi_t afi = family2afi (prefix->family); + if (!bgp_default) + return; + h = bgp_default->rfapi; hc = bgp_default->rfapi_cfg; @@ -1992,6 +2002,9 @@ vnc_import_bgp_exterior_del_route ( afi_t afi = family2afi (prefix->family); struct bgp *bgp_default = bgp_get_default (); + if (!bgp_default) + return; + memset (&pfx_orig_nexthop, 0, sizeof (struct prefix)); /* keep valgrind happy */ h = bgp_default->rfapi; From ff999357fd95690c8105b9da24aa39a2b7ce51a6 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 28 Nov 2016 16:47:13 -0200 Subject: [PATCH 08/11] bgpd: fix invalid memory access in peer_free() We shoult not call bgp_unlock() before calling bgp_delete_connected_nexthop() in the peer_free() function. Otherwise, if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes an invalid pointer in the bgp_delete_connected_nexthop() function. To fix this, move the call to bgp_unlock() to the end of peer_free(). Bug exposed by commit 37d361e ("bgpd: plug several memleaks"). Signed-off-by: Renato Westphal Signed-off-by: David Lamparter --- bgpd/bgpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 7554b512e8..7675df226b 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1018,8 +1018,6 @@ peer_free (struct peer *peer) { assert (peer->status == Deleted); - bgp_unlock(peer->bgp); - /* this /ought/ to have been done already through bgp_stop earlier, * but just to be sure.. */ @@ -1085,6 +1083,8 @@ peer_free (struct peer *peer) bfd_info_free(&(peer->bfd_info)); + bgp_unlock(peer->bgp); + memset (peer, 0, sizeof (struct peer)); XFREE (MTYPE_BGP_PEER, peer); From aa86a160f4c1cc068c547f4e9f7df5003b532454 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 7 Nov 2016 13:37:25 +0100 Subject: [PATCH 09/11] zebra: check ZEBRA_IFC_REAL on if_up Only connected routes which have ZEBRA_IFC_REAL set should be redistributed. Signed-off-by: Christian Franke Signed-off-by: David Lamparter --- zebra/interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zebra/interface.c b/zebra/interface.c index b87f61f920..68edd30de3 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -512,9 +512,10 @@ if_install_connected (struct interface *ifp) { for (ALL_LIST_ELEMENTS (ifp->connected, node, next, ifc)) { - p = ifc->address; - zebra_interface_address_add_update (ifp, ifc); + if (CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL)) + zebra_interface_address_add_update (ifp, ifc); + p = ifc->address; if (p->family == AF_INET) connected_up_ipv4 (ifp, ifc); else if (p->family == AF_INET6) From 9b7939d945e52a16735330ecb2034c8459ff8f0e Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 1 Dec 2016 17:16:24 +0100 Subject: [PATCH 10/11] build: COMMUNITY.md: add git branch diagram Signed-off-by: David Lamparter --- COMMUNITY.md | 3 +++ doc/git_branches.svg | 3 +++ render_md.py | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 doc/git_branches.svg diff --git a/COMMUNITY.md b/COMMUNITY.md index 80478ceffe..0cc8e8d1ce 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -7,6 +7,9 @@ The master Git for PROJECT resides on Github at [https://github.com/PROJECT/XXX](https://github.com/PROJECT/XXX) +![git branches continually merging to the left from 3 lanes; float-right](doc/git_branches.svg +"git branch mechanics") + There are 3 main branches for development and a release branch for each major release. diff --git a/doc/git_branches.svg b/doc/git_branches.svg new file mode 100644 index 0000000000..3943eeacc8 --- /dev/null +++ b/doc/git_branches.svg @@ -0,0 +1,3 @@ + + +1.0ReleaseBranchMaster(Stable)Develop1.1ReleaseBranchVersion 1.0.a1Version 1.1.a1Version 1.1.a2Version 1.1.b1Patch Email (Patchwork)Github Pull RequestGithub Pull RequestPatch Email (Patchwork)Patch Email (Patchwork)Github Pull RequestGithub Pull RequestGithub Pull RequestPatch Email (Patchwork)Github Pull RequestGithub Pull RequestGithub Pull RequestGithub Pull RequestGithub Pull RequestGithub Pull RequestVersion 1.0.a2Version 1.0.b1Version 1.0.0Version 1.1.0Version 1.1.1Version 1.1.2 diff --git a/render_md.py b/render_md.py index a819c784e8..d2d1fb4805 100644 --- a/render_md.py +++ b/render_md.py @@ -8,9 +8,10 @@ body { max-width: 45em; margin: auto; margin-top: 2em; margin-bottom: 2em; pre, code { font-family:Fira Mono,monospace; } pre > code { display: block; padding:0.5em; border:1px solid black; background-color:#eee; color:#000; } -h2 { margin-top: 3em; text-decoration: underline; } -h3 { margin-top: 2em; font-weight: normal; font-style: italic; } +h2 { clear: both; margin-top: 3em; text-decoration: underline; } +h3 { clear: both; margin-top: 2em; font-weight: normal; font-style: italic; } h4 { font-weight: normal; font-style: italic; } +img[alt~="float-right"] { float:right; margin-left:2em; margin-bottom:2em; } %s From db2d8df649d1e8ed26f28eb04bbd6fe3768a17cc Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 1 Dec 2016 17:18:57 +0100 Subject: [PATCH 11/11] lib: replace MIT license with ISC Since other parts (e.g. ldpd) use the ISC license, and the ISC license is just a simplified form of the MIT license, just move things over and reduce the number of different licenses we have in use here. Signed-off-by: David Lamparter --- lib/memory.c | 26 ++++++++++---------------- lib/memory.h | 26 ++++++++++---------------- lib/qobj.h | 26 ++++++++++---------------- 3 files changed, 30 insertions(+), 48 deletions(-) diff --git a/lib/memory.c b/lib/memory.c index 99b191c2be..f17915486c 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -1,23 +1,17 @@ /* * Copyright (c) 2015-16 David Lamparter, for NetDEF, Inc. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include diff --git a/lib/memory.h b/lib/memory.h index d287f229f7..477a6162dc 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -1,23 +1,17 @@ /* * Copyright (c) 2015-16 David Lamparter, for NetDEF, Inc. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _QUAGGA_MEMORY_H diff --git a/lib/qobj.h b/lib/qobj.h index 4a5c0c01ed..4c326731ed 100644 --- a/lib/qobj.h +++ b/lib/qobj.h @@ -1,23 +1,17 @@ /* * Copyright (c) 2015-16 David Lamparter, for NetDEF, Inc. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _QOBJ_H