diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 1f0662bfb0..e80889500f 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1667,7 +1667,11 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, /* * NOTE: intentional fall through * - for consistency in rx processing + * + * The following comment is to signal GCC this intention + * and supress the warning */ + /* FALLTHRU */ case BGP_ATTR_NHLEN_IPV4: stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN); /* Probably needed for RFC 2283 */ diff --git a/debianpkg/Makefile.am b/debianpkg/Makefile.am index 5ab5b4c4fc..6bb01dffba 100644 --- a/debianpkg/Makefile.am +++ b/debianpkg/Makefile.am @@ -29,6 +29,10 @@ EXTRA_DIST = README.Debian README.Maintainer \ backports/ubuntu16.04/debian/source/format \ backports/ubuntu16.04/exclude \ backports/ubuntu16.04/versionext \ + backports/ubuntu17.10/debian/control \ + backports/ubuntu17.10/debian/source/format \ + backports/ubuntu17.10/exclude \ + backports/ubuntu17.10/versionext \ frr-doc.docs frr-doc.info frr-doc.install \ frr-doc.lintian-overrides frr.conf \ frr.dirs frr.docs frr.install \ diff --git a/debianpkg/README.deb_build.md b/debianpkg/README.deb_build.md index 3156c3672d..0d02bc3dc2 100644 --- a/debianpkg/README.deb_build.md +++ b/debianpkg/README.deb_build.md @@ -1,21 +1,26 @@ Building your own FRRouting Debian Package ========================================== -(Tested on Ubuntu 12.04, 14.04, 16.04 and Debian 8) +(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9) + +**Note:** If you try to build for a different distro, then it will most likely +fail because of the missing backport. See debianpkg/backports/README about +adding a new backport. 1. Follow the package installation as outlined in doc/Building_on_XXXX.md (XXXX refers your OS Distribution) to install the required build packages 2. Install the following additional packages: - apt-get install realpath equivs groff fakeroot debhelper + apt-get install realpath equivs groff fakeroot debhelper devscripts 3. Checkout FRR under a **unpriviledged** user account git clone https://github.com/frrouting/frr.git frr + cd frr + # git checkout - if different branch than master 4. Run Bootstrap and make distribution tar.gz - cd frr ./bootstrap.sh ./configure --with-pkg-extra-version=-MyDebPkgVersion make dist @@ -44,7 +49,7 @@ Building your own FRRouting Debian Package and multiple `frr_*.debian.tar.xz` and `frr_*.dsc` for the debian package source on each backport supported distribution -6. Create a new directory to build the package and populate with package src +7. Create a new directory to build the package and populate with package src mkdir frrpkg cd frrpkg @@ -53,12 +58,21 @@ Building your own FRRouting Debian Package . /etc/os-release tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz -7. Build Debian Package Dependencies and install them as needed +8. Build Debian Package Dependencies and install them as needed sudo mk-build-deps --install debian/control -8. Build Debian Package +9. Build Debian Package + Building with standard options: + + debuild -b -uc -us + + Or change some options: + (see `rules` file for available options) + + export WANT_BGP_VNC=1 + export WANT_WANT_CUMULUS_MODE=1 debuild -b -uc -us DONE. @@ -83,7 +97,7 @@ allowed. sudo update-rc.d frr defaults - - On `systemd` based systems (Debian 8, Ubuntu 14.04, 16.04) + - On `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10) sudo systemctl enable frr @@ -93,7 +107,7 @@ allowed. sudo invoke-rc.d frr start - - on `systemd` based systems (Debian 8, Ubuntu 14.04, 16.04) + - on `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10) sudo systemctl start frr diff --git a/debianpkg/backports/ubuntu17.10/debian/control b/debianpkg/backports/ubuntu17.10/debian/control new file mode 100644 index 0000000000..692501db18 --- /dev/null +++ b/debianpkg/backports/ubuntu17.10/debian/control @@ -0,0 +1,54 @@ +Source: frr +Section: net +Priority: optional +Maintainer: Nobody +Uploaders: Nobody +XSBC-Original-Maintainer: +Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), imagemagick, ghostscript, groff, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr +Standards-Version: 3.9.6 +Homepage: http://www.frrouting.org/ + +Package: frr +Architecture: any +Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute2 | iproute, ${misc:Depends}, libc-ares2 +Pre-Depends: adduser +Conflicts: zebra, zebra-pj, quagga +Replaces: zebra, zebra-pj +Suggests: snmpd +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon forked from Quagga + FRR is free software which manages TCP/IP based routing protocols. + It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, RIPng, + PIM and LDP as well as the IPv6 versions of these. + . + FRR is a fork of Quagga with an open community model. The main git + lives on https://github.com/frrouting/frr.git + +Package: frr-dbg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, frr (= ${binary:Version}) +Priority: optional +Section: debug +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (debug symbols) + This package provides debugging symbols for all binary packages built + from frr source package. It's highly recommended to have this package + installed before reporting any FRR crashes to either FRR developers or + Debian package maintainers. + +Package: frr-doc +Section: net +Architecture: all +Depends: ${misc:Depends} +Suggests: frr +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (documentation) + This package includes info files for frr, a free software which manages + TCP/IP based routing protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, + IS-IS, RIPv1, RIPv2, RIPng, PIM and LDP as well as the IPv6 versions of these. + +Package: frr-pythontools +Section: net +Architecture: all +Depends: ${misc:Depends}, frr (= ${binary:Version}), python (>= 2.7), python-ipaddr +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (Python Tools) + This package includes info files for frr, a free software which manages + TCP/IP based routing protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, + IS-IS, RIPv1, RIPv2, RIPng, PIM and LDP as well as the IPv6 versions of these. diff --git a/debianpkg/backports/ubuntu17.10/debian/source/format b/debianpkg/backports/ubuntu17.10/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/ubuntu17.10/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/ubuntu17.10/exclude b/debianpkg/backports/ubuntu17.10/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/ubuntu17.10/versionext b/debianpkg/backports/ubuntu17.10/versionext new file mode 100644 index 0000000000..bfbeccd653 --- /dev/null +++ b/debianpkg/backports/ubuntu17.10/versionext @@ -0,0 +1 @@ +-1~ubuntu17.10+1 diff --git a/debianpkg/frr.preinst b/debianpkg/frr.preinst index 29162e3b56..467bea9718 100644 --- a/debianpkg/frr.preinst +++ b/debianpkg/frr.preinst @@ -30,7 +30,7 @@ fi # frr and as such we need to intelligently # check to see if the frr user is in the frrvty # group. -if ! /usr/bin/id frr | grep &>/dev/null 'frrvty'; then +if ! id frr | grep &>/dev/null 'frrvty'; then usermod -a -G frrvty frr >/dev/null fi diff --git a/debianpkg/rules b/debianpkg/rules index 04d28762aa..a6a9077da1 100755 --- a/debianpkg/rules +++ b/debianpkg/rules @@ -190,7 +190,7 @@ override_dh_systemd_enable: # backports SRCPKG = frr -KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 +KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10 DEBIAN_VERSION := $(shell dh_testdir && \ dpkg-parsechangelog -c1 < debian/changelog | \ sed -rn 's/^Version: ?//p') diff --git a/lib/csv.c b/lib/csv.c index 27d0fe4029..e6a5eae2e2 100644 --- a/lib/csv.c +++ b/lib/csv.c @@ -424,7 +424,7 @@ void csv_clone_record(csv_t *csv, csv_record_t *in_rec, csv_record_t **out_rec) void csv_remove_record(csv_t *csv, csv_record_t *rec) { - csv_field_t *fld, *p_fld; + csv_field_t *fld = NULL, *p_fld; /* first check if rec belongs to this csv */ if (!csv_is_record_valid(csv, rec)) {