diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 365c2fee4..b07d9ff3c 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1685,6 +1685,7 @@ struct aspath *aspath_reconcile_as4(struct aspath *aspath, " across 2/4 ASN boundary somewhere, broken.."); hops = seg->length; } + /* fallthru */ case AS_SEQUENCE: cpasns = MIN(seg->length, hops); hops -= seg->length; diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 5e117d767..dcaea737a 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -338,6 +338,7 @@ void bgp_timer_set(struct peer *peer) BGP_TIMER_OFF(peer->t_gr_restart); BGP_TIMER_OFF(peer->t_gr_stale); BGP_TIMER_OFF(peer->t_pmax_restart); + /* fallthru */ case Clearing: BGP_TIMER_OFF(peer->t_start); BGP_TIMER_OFF(peer->t_connect); diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 79a294bd4..29b59c432 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -387,7 +387,8 @@ int main(int argc, char **argv) break; case 'l': bgp_address = optarg; - /* listenon implies -n */ + /* listenon implies -n */ + /* fallthru */ case 'n': no_fib_flag = 1; break; diff --git a/debianpkg/Makefile.am b/debianpkg/Makefile.am index 5ab5b4c4f..6bb01dffb 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 3156c3672..0d02bc3dc 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 000000000..308328169 --- /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 000000000..163aaf8d8 --- /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 000000000..e69de29bb diff --git a/debianpkg/backports/ubuntu17.10/versionext b/debianpkg/backports/ubuntu17.10/versionext new file mode 100644 index 000000000..bfbeccd65 --- /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 29162e3b5..467bea971 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 04d28762a..a6a9077da 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/command_match.c b/lib/command_match.c index 24e850ad2..31b351e3f 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -403,6 +403,7 @@ enum matcher_rv command_complete(struct graph *graph, vector vline, trace_matcher("trivial_match\n"); if (exact_match_exists && !last_token) break; + /* fallthru */ case exact_match: trace_matcher("exact_match\n"); if (last_token) { diff --git a/lib/csv.c b/lib/csv.c index eadaaa371..fe6751c97 100644 --- a/lib/csv.c +++ b/lib/csv.c @@ -420,7 +420,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)) { diff --git a/lib/jhash.c b/lib/jhash.c index 8b646b8e2..729b74386 100644 --- a/lib/jhash.c +++ b/lib/jhash.c @@ -86,24 +86,34 @@ u_int32_t jhash(const void *key, u_int32_t length, u_int32_t initval) switch (len) { case 11: c += ((u_int32_t)k[10] << 24); + /* fallthru */ case 10: c += ((u_int32_t)k[9] << 16); + /* fallthru */ case 9: c += ((u_int32_t)k[8] << 8); + /* fallthru */ case 8: b += ((u_int32_t)k[7] << 24); + /* fallthru */ case 7: b += ((u_int32_t)k[6] << 16); + /* fallthru */ case 6: b += ((u_int32_t)k[5] << 8); + /* fallthru */ case 5: b += k[4]; + /* fallthru */ case 4: a += ((u_int32_t)k[3] << 24); + /* fallthru */ case 3: a += ((u_int32_t)k[2] << 16); + /* fallthru */ case 2: a += ((u_int32_t)k[1] << 8); + /* fallthru */ case 1: a += k[0]; }; @@ -138,6 +148,7 @@ u_int32_t jhash2(const u_int32_t *k, u_int32_t length, u_int32_t initval) switch (len) { case 2: b += k[1]; + /* fallthru */ case 1: a += k[0]; }; diff --git a/lib/workqueue.c b/lib/workqueue.c index 1789c6b7d..118bfced5 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -320,7 +320,7 @@ int work_queue_run(struct thread *thread) if (wq->spec.errorfunc) wq->spec.errorfunc(wq, item); } - /* fall through here is deliberate */ + /* fallthru */ case WQ_SUCCESS: default: { work_queue_item_remove(wq, node); diff --git a/nhrpd/nhrp_packet.c b/nhrpd/nhrp_packet.c index 36dbdfd77..0ba3f33d0 100644 --- a/nhrpd/nhrp_packet.c +++ b/nhrpd/nhrp_packet.c @@ -244,6 +244,7 @@ int nhrp_ext_reply(struct zbuf *zb, struct nhrp_packet_header *hdr, struct inter default: if (type & NHRP_EXTENSION_FLAG_COMPULSORY) goto err; + /* fallthru */ case NHRP_EXTENSION_FORWARD_TRANSIT_NHS: case NHRP_EXTENSION_REVERSE_TRANSIT_NHS: /* Supported compulsory extensions, and any diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c index 3cc91a908..06d48a2d1 100644 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -134,7 +134,7 @@ static void nhrp_peer_ifp_notify(struct notifier_block *n, unsigned long cmd) nhrp_vc_notify_add(p->vc, &p->vc_notifier, nhrp_peer_vc_notify); __nhrp_peer_check(p); } - /* Fall-through to post config update */ + /* fallthru */ case NOTIFY_INTERFACE_ADDRESS_CHANGED: notifier_call(&p->notifier_list, NOTIFY_PEER_IFCONFIG_CHANGED); break; @@ -687,6 +687,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p, struct nhrp_packet_parser *pp /* FIXME: RFC says to just copy, but not * append our selves to the transit NHS list */ goto err; + /* fallthru */ case NHRP_EXTENSION_RESPONDER_ADDRESS: /* Supported compulsory extensions, and any * non-compulsory that is not explicitly handled, @@ -849,6 +850,7 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb) /* FIXME: send error-indication */ } } + /* fallthru */ case NHRP_ROUTE_OFF_NBMA: if (packet_types[hdr->type].handler) { packet_types[hdr->type].handler(&pp); diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index a19c3f407..79674b72d 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1446,7 +1446,7 @@ static void ospf6_brouter_debug_print(struct ospf6_route *brouter) char brouter_name[16]; char area_name[16]; char destination[64]; - char installed[16], changed[16]; + char installed[64], changed[64]; struct timeval now, res; char id[16], adv_router[16]; char capa[16], options[16]; diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 0e10ab15e..f4b2f4090 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -468,7 +468,7 @@ void ospf6_lsa_show(struct vty *vty, struct ospf6_lsa *lsa) char adv_router[64], id[64]; struct ospf6_lsa_handler *handler; struct timeval now, res; - char duration[16]; + char duration[64]; assert(lsa && lsa->header); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 93c85b58d..3da455e79 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -369,7 +369,7 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh, return; } /* else fall through to ExStart */ - + /* fallthru */ case OSPF6_NEIGHBOR_EXSTART: /* if neighbor obeys us as our slave, schedule negotiation_done and process LSA Headers. Otherwise, ignore this message */ @@ -565,7 +565,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh, return; } /* else fall through to ExStart */ - + /* fallthru */ case OSPF6_NEIGHBOR_EXSTART: /* If the neighbor is Master, act as Slave. Schedule negotiation_done diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index b7fd20cb8..9693c4b05 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -587,10 +587,10 @@ int inactivity_timer(struct thread *thread) static void ospf6_neighbor_show(struct vty *vty, struct ospf6_neighbor *on) { char router_id[16]; - char duration[16]; + char duration[64]; struct timeval res; char nstate[16]; - char deadtime[16]; + char deadtime[64]; long h, m, s; /* Router-ID (Name) */ @@ -645,7 +645,7 @@ static void ospf6_neighbor_show_drchoice(struct vty *vty, { char router_id[16]; char drouter[16], bdrouter[16]; - char duration[16]; + char duration[64]; struct timeval now, res; /* diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 88dd7b218..1c414b35c 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -43,7 +43,7 @@ unsigned char conf_debug_ospf6_route = 0; static char *ospf6_route_table_name(struct ospf6_route_table *table) { - static char name[32]; + static char name[64]; switch (table->scope_type) { case OSPF6_SCOPE_TYPE_GLOBAL: { switch (table->table_type) { @@ -946,7 +946,7 @@ void ospf6_route_show(struct vty *vty, struct ospf6_route *route) { int i; char destination[PREFIX2STR_BUFFER], nexthop[64]; - char duration[16]; + char duration[64]; const char *ifname; struct timeval now, res; struct listnode *node; @@ -992,7 +992,7 @@ void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route) char destination[PREFIX2STR_BUFFER], nexthop[64]; char area_id[16], id[16], adv_router[16], capa[16], options[16]; struct timeval now, res; - char duration[16]; + char duration[64]; struct listnode *node; struct ospf6_nexthop *nh; diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c index 3affa12a9..e7b93b638 100644 --- a/ospf6d/ospf6_snmp.c +++ b/ospf6d/ospf6_snmp.c @@ -712,7 +712,8 @@ static u_char *ospfv3GeneralGroup(struct variable *v, oid *name, size_t *length, case OSPFv3REFERENCEBANDWIDTH: if (ospf6) return SNMP_INTEGER(ospf6->ref_bandwidth); - /* Otherwise, like for "not implemented". */ + /* Otherwise, like for "not implemented". */ + /* fallthru */ case OSPFv3RESTARTSUPPORT: case OSPFv3RESTARTINTERVAL: case OSPFv3RESTARTSTRICTLSACHECKING: diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index ad501f688..24fe8ac72 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -988,6 +988,7 @@ static int ospf_vl_set_params(struct ospf_vl_data *vl_data, struct vertex *v) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "found back link through VL"); + /* fallthru */ case LSA_LINK_TYPE_TRANSIT: case LSA_LINK_TYPE_POINTOPOINT: if (!IPV4_ADDR_SAME(&vl_data->peer_addr, diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index a112f7095..201e725cf 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -110,6 +110,7 @@ static void nsm_timer_set(struct ospf_neighbor *nbr) case NSM_Down: OSPF_NSM_TIMER_OFF(nbr->t_inactivity); OSPF_NSM_TIMER_OFF(nbr->t_hello_reply); + /* fallthru */ case NSM_Attempt: case NSM_Init: case NSM_TwoWay: diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index df7bac4db..a0393652a 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1129,6 +1129,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi, /* Neighbour has a more recent LSA, we must request it */ ospf_ls_request_add(nbr, new); + /* fallthru */ case 0: /* If we have a copy of this LSA, it's either less * recent @@ -1310,6 +1311,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh, through to case ExStart below. */ if (nbr->state != NSM_ExStart) break; + /* fallthru */ case NSM_ExStart: /* Initial DBD */ if ((IS_SET_DD_ALL(dd->flags) == OSPF_DD_FLAG_ALL) diff --git a/zebra/test_main.c b/zebra/test_main.c index 69fc5fd40..3d277dbaf 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -223,6 +223,7 @@ int main(int argc, char **argv) break; case 'b': batch_mode = 1; + break; case 'd': daemon_mode = 1; break;