diff --git a/COMMUNITY.md b/COMMUNITY.md index 9539c7e572..0cc8e8d1ce 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -1,10 +1,14 @@ # 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) + +![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. @@ -39,14 +43,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 +122,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 +137,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 +148,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 +176,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 +207,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 +231,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/bgpd/bgpd.c b/bgpd/bgpd.c index e8bdd08a44..50d4126337 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); 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; 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/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 diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index 803dc923ea..b6c871b6e4 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; } diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index d836840283..8662eb4259 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3097,8 +3097,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) { diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index bc0f2c7e58..95792d5aa1 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; } 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 diff --git a/render_md.py b/render_md.py new file mode 100644 index 0000000000..d2d1fb4805 --- /dev/null +++ b/render_md.py @@ -0,0 +1,25 @@ +#!/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')) diff --git a/zebra/interface.c b/zebra/interface.c index ff9c0a3019..91dbe52764 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)