diff options
140 files changed, 2166 insertions, 1894 deletions
diff --git a/.gitignore b/.gitignore index 05fcd6ce4b..bf6df9ad60 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ /aclocal.m4 /libtool /libtool.orig +/changelog-auto /Makefile /Makefile.in diff --git a/Makefile.am b/Makefile.am index 9e6c53d87c..6e3c2a4181 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,7 +124,6 @@ include watchfrr/subdir.am include qpb/subdir.am include fpm/subdir.am include tools/subdir.am -include debianpkg/subdir.am include solaris/subdir.am include bgpd/subdir.am @@ -170,6 +169,8 @@ EXTRA_DIST += \ m4/README.txt \ m4/libtool-whole-archive.patch \ config.version \ + changelog-auto \ + changelog-auto.in \ \ python/clidef.py \ python/clippy/__init__.py \ diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 12ba16bc82..afd5d814a0 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1294,7 +1294,7 @@ static void _shop_key(struct bfd_session *bs, const struct bfd_shop_key *shop); static void _shop_key2(struct bfd_session *bs, const struct bfd_shop_key *shop); static void _mhop_key(struct bfd_session *bs, const struct bfd_mhop_key *mhop); -static void _bfd_free(struct hash_backet *hb, +static void _bfd_free(struct hash_bucket *hb, void *arg __attribute__((__unused__))); /* BFD hash for our discriminator. */ @@ -1516,7 +1516,7 @@ void bfd_initialize(void) "BFD multihop hop hash"); } -static void _bfd_free(struct hash_backet *hb, +static void _bfd_free(struct hash_bucket *hb, void *arg __attribute__((__unused__))) { struct bfd_session *bs = hb->data; diff --git a/bfdd/bfd.h b/bfdd/bfd.h index a65c47c06f..7451ca82a3 100644 --- a/bfdd/bfd.h +++ b/bfdd/bfd.h @@ -557,7 +557,7 @@ bool bfd_mhop_insert(struct bfd_session *bs); bool bfd_vrf_insert(struct bfd_vrf *vrf); bool bfd_iface_insert(struct bfd_iface *iface); -typedef void (*hash_iter_func)(struct hash_backet *hb, void *arg); +typedef void (*hash_iter_func)(struct hash_bucket *hb, void *arg); void bfd_id_iterate(hash_iter_func hif, void *arg); void bfd_shop_iterate(hash_iter_func hif, void *arg); void bfd_mhop_iterate(hash_iter_func hif, void *arg); diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 6bdfc384e8..0041f9cc2e 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -52,7 +52,7 @@ static int bfdd_write_config(struct vty *vty); static int bfdd_peer_write_config(struct vty *vty); static void _bfdd_peer_write_config(struct vty *vty, struct bfd_session *bs); -static void _bfdd_peer_write_config_iter(struct hash_backet *hb, void *arg); +static void _bfdd_peer_write_config_iter(struct hash_bucket *hb, void *arg); static int bfd_configure_peer(struct bfd_peer_cfg *bpc, bool mhop, const struct sockaddr_any *peer, const struct sockaddr_any *local, @@ -65,13 +65,13 @@ static struct json_object *_peer_json_header(struct bfd_session *bs); static void _display_peer_json(struct vty *vty, struct bfd_session *bs); static void _display_peer(struct vty *vty, struct bfd_session *bs); static void _display_all_peers(struct vty *vty, bool use_json); -static void _display_peer_iter(struct hash_backet *hb, void *arg); -static void _display_peer_json_iter(struct hash_backet *hb, void *arg); +static void _display_peer_iter(struct hash_bucket *hb, void *arg); +static void _display_peer_json_iter(struct hash_bucket *hb, void *arg); static void _display_peer_counter(struct vty *vty, struct bfd_session *bs); static struct json_object *__display_peer_counters_json(struct bfd_session *bs); static void _display_peer_counters_json(struct vty *vty, struct bfd_session *bs); -static void _display_peer_counter_iter(struct hash_backet *hb, void *arg); -static void _display_peer_counter_json_iter(struct hash_backet *hb, void *arg); +static void _display_peer_counter_iter(struct hash_bucket *hb, void *arg); +static void _display_peer_counter_json_iter(struct hash_bucket *hb, void *arg); static void _display_peers_counter(struct vty *vty, bool use_json); static struct bfd_session * _find_peer_or_error(struct vty *vty, int argc, struct cmd_token **argv, @@ -538,7 +538,7 @@ static void _display_peer_json(struct vty *vty, struct bfd_session *bs) json_object_free(jo); } -static void _display_peer_iter(struct hash_backet *hb, void *arg) +static void _display_peer_iter(struct hash_bucket *hb, void *arg) { struct vty *vty = arg; struct bfd_session *bs = hb->data; @@ -546,7 +546,7 @@ static void _display_peer_iter(struct hash_backet *hb, void *arg) _display_peer(vty, bs); } -static void _display_peer_json_iter(struct hash_backet *hb, void *arg) +static void _display_peer_json_iter(struct hash_bucket *hb, void *arg) { struct json_object *jo = arg, *jon = NULL; struct bfd_session *bs = hb->data; @@ -621,7 +621,7 @@ static void _display_peer_counters_json(struct vty *vty, struct bfd_session *bs) json_object_free(jo); } -static void _display_peer_counter_iter(struct hash_backet *hb, void *arg) +static void _display_peer_counter_iter(struct hash_bucket *hb, void *arg) { struct vty *vty = arg; struct bfd_session *bs = hb->data; @@ -629,7 +629,7 @@ static void _display_peer_counter_iter(struct hash_backet *hb, void *arg) _display_peer_counter(vty, bs); } -static void _display_peer_counter_json_iter(struct hash_backet *hb, void *arg) +static void _display_peer_counter_json_iter(struct hash_bucket *hb, void *arg) { struct json_object *jo = arg, *jon = NULL; struct bfd_session *bs = hb->data; @@ -970,7 +970,7 @@ DEFUN_NOSH(show_debugging_bfd, return CMD_SUCCESS; } -static void _bfdd_peer_write_config_iter(struct hash_backet *hb, void *arg) +static void _bfdd_peer_write_config_iter(struct hash_bucket *hb, void *arg) { struct vty *vty = arg; struct bfd_session *bs = hb->data; diff --git a/bfdd/control.c b/bfdd/control.c index 554a5a8d80..40f4f4d3be 100644 --- a/bfdd/control.c +++ b/bfdd/control.c @@ -65,7 +65,7 @@ static void control_handle_notify_add(struct bfd_control_socket *bcs, struct bfd_control_msg *bcm); static void control_handle_notify_del(struct bfd_control_socket *bcs, struct bfd_control_msg *bcm); -static void _control_handle_notify(struct hash_backet *hb, void *arg); +static void _control_handle_notify(struct hash_bucket *hb, void *arg); static void control_handle_notify(struct bfd_control_socket *bcs, struct bfd_control_msg *bcm); static void control_response(struct bfd_control_socket *bcs, uint16_t id, @@ -630,7 +630,7 @@ static struct bfd_session *_notify_find_peer(struct bfd_peer_cfg *bpc) return bs_peer_find(bpc); } -static void _control_handle_notify(struct hash_backet *hb, void *arg) +static void _control_handle_notify(struct hash_bucket *hb, void *arg) { struct bfd_control_socket *bcs = arg; struct bfd_session *bs = hb->data; diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 9521a9e912..51833394d9 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -2077,14 +2077,14 @@ void aspath_print_vty(struct vty *vty, const char *format, struct aspath *as, vty_out(vty, "%s", suffix); } -static void aspath_show_all_iterator(struct hash_backet *backet, +static void aspath_show_all_iterator(struct hash_bucket *bucket, struct vty *vty) { struct aspath *as; - as = (struct aspath *)backet->data; + as = (struct aspath *)bucket->data; - vty_out(vty, "[%p:%u] (%ld) ", (void *)backet, backet->key, as->refcnt); + vty_out(vty, "[%p:%u] (%ld) ", (void *)bucket, bucket->key, as->refcnt); vty_out(vty, "%s\n", as->str); } @@ -2092,7 +2092,7 @@ static void aspath_show_all_iterator(struct hash_backet *backet, `show [ip] bgp paths' command. */ void aspath_print_all_vty(struct vty *vty) { - hash_iterate(ashash, (void (*)(struct hash_backet *, + hash_iterate(ashash, (void (*)(struct hash_bucket *, void *))aspath_show_all_iterator, vty); } diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index aa271da07f..e731af754c 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -592,9 +592,9 @@ static void attrhash_finish(void) attrhash = NULL; } -static void attr_show_all_iterator(struct hash_backet *backet, struct vty *vty) +static void attr_show_all_iterator(struct hash_bucket *bucket, struct vty *vty) { - struct attr *attr = backet->data; + struct attr *attr = bucket->data; vty_out(vty, "attr[%ld] nexthop %s\n", attr->refcnt, inet_ntoa(attr->nexthop)); @@ -605,7 +605,7 @@ static void attr_show_all_iterator(struct hash_backet *backet, struct vty *vty) void attr_show_all(struct vty *vty) { - hash_iterate(attrhash, (void (*)(struct hash_backet *, + hash_iterate(attrhash, (void (*)(struct hash_bucket *, void *))attr_show_all_iterator, vty); } diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index bf162b201a..1471bd9829 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -3604,9 +3604,9 @@ static int delete_withdraw_vni_routes(struct bgp *bgp, struct bgpevpn *vpn) * router-id. The routes in the per-VNI table are used to create routes in * the global table and schedule them. */ -static void update_router_id_vni(struct hash_backet *backet, struct bgp *bgp) +static void update_router_id_vni(struct hash_bucket *bucket, struct bgp *bgp) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; /* Skip VNIs with configured RD. */ if (is_rd_configured(vpn)) @@ -3622,9 +3622,9 @@ static void update_router_id_vni(struct hash_backet *backet, struct bgp *bgp) * the router-id and is done only on the global route table, the routes * are needed in the per-VNI table to re-advertise with new router id. */ -static void withdraw_router_id_vni(struct hash_backet *backet, struct bgp *bgp) +static void withdraw_router_id_vni(struct hash_bucket *bucket, struct bgp *bgp) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; /* Skip VNIs with configured RD. */ if (is_rd_configured(vpn)) @@ -3637,9 +3637,9 @@ static void withdraw_router_id_vni(struct hash_backet *backet, struct bgp *bgp) * Create RT-3 for a VNI and schedule for processing and advertisement. * This is invoked upon flooding mode changing to head-end replication. */ -static void create_advertise_type3(struct hash_backet *backet, void *data) +static void create_advertise_type3(struct hash_bucket *bucket, void *data) { - struct bgpevpn *vpn = backet->data; + struct bgpevpn *vpn = bucket->data; struct bgp *bgp = data; struct prefix_evpn p; @@ -3656,9 +3656,9 @@ static void create_advertise_type3(struct hash_backet *backet, void *data) * Delete RT-3 for a VNI and schedule for processing and withdrawal. * This is invoked upon flooding mode changing to drop BUM packets. */ -static void delete_withdraw_type3(struct hash_backet *backet, void *data) +static void delete_withdraw_type3(struct hash_bucket *bucket, void *data) { - struct bgpevpn *vpn = backet->data; + struct bgpevpn *vpn = bucket->data; struct bgp *bgp = data; struct prefix_evpn p; @@ -4088,9 +4088,9 @@ static void evpn_mpattr_encode_type5(struct stream *s, struct prefix *p, /* * Cleanup specific VNI upon EVPN (advertise-all-vni) being disabled. */ -static void cleanup_vni_on_disable(struct hash_backet *backet, struct bgp *bgp) +static void cleanup_vni_on_disable(struct hash_bucket *bucket, struct bgp *bgp) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; /* Remove EVPN routes and schedule for processing. */ delete_routes_for_vni(bgp, vpn); @@ -4104,9 +4104,9 @@ static void cleanup_vni_on_disable(struct hash_backet *backet, struct bgp *bgp) /* * Free a VNI entry; iterator function called during cleanup. */ -static void free_vni_entry(struct hash_backet *backet, struct bgp *bgp) +static void free_vni_entry(struct hash_bucket *bucket, struct bgp *bgp) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; delete_all_vni_routes(bgp, vpn); bgp_evpn_free(bgp, vpn); @@ -4175,9 +4175,9 @@ static void bgp_evpn_handle_export_rt_change_for_vrf(struct bgp *bgp_vrf) /* * Handle autort change for a given VNI. */ -static void update_autort_vni(struct hash_backet *backet, struct bgp *bgp) +static void update_autort_vni(struct hash_bucket *bucket, struct bgp *bgp) { - struct bgpevpn *vpn = backet->data; + struct bgpevpn *vpn = bucket->data; if (!is_import_rt_configured(vpn)) { if (is_vni_live(vpn)) @@ -4483,7 +4483,7 @@ void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw) * L2-VNIs */ hash_iterate(bgp->vnihash, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))withdraw_router_id_vni, bgp); } else { @@ -4497,7 +4497,7 @@ void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw) * new RD */ hash_iterate(bgp->vnihash, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))update_router_id_vni, bgp); } @@ -4509,7 +4509,7 @@ void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw) void bgp_evpn_handle_autort_change(struct bgp *bgp) { hash_iterate(bgp->vnihash, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void*))update_autort_vni, bgp); } @@ -5382,10 +5382,10 @@ int bgp_evpn_local_macip_add(struct bgp *bgp, vni_t vni, struct ethaddr *mac, return 0; } -static void link_l2vni_hash_to_l3vni(struct hash_backet *backet, +static void link_l2vni_hash_to_l3vni(struct hash_bucket *bucket, struct bgp *bgp_vrf) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; struct bgp *bgp_def = NULL; bgp_def = bgp_get_default(); @@ -5471,7 +5471,7 @@ int bgp_evpn_local_l3vni_add(vni_t l3vni, vrf_id_t vrf_id, struct ethaddr *rmac, /* link all corresponding l2vnis */ hash_iterate(bgp_def->vnihash, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))link_l2vni_hash_to_l3vni, bgp_vrf); @@ -5804,7 +5804,7 @@ void bgp_evpn_flood_control_change(struct bgp *bgp) */ void bgp_evpn_cleanup_on_disable(struct bgp *bgp) { - hash_iterate(bgp->vnihash, (void (*)(struct hash_backet *, + hash_iterate(bgp->vnihash, (void (*)(struct hash_bucket *, void *))cleanup_vni_on_disable, bgp); } @@ -5816,7 +5816,7 @@ void bgp_evpn_cleanup_on_disable(struct bgp *bgp) void bgp_evpn_cleanup(struct bgp *bgp) { hash_iterate(bgp->vnihash, - (void (*)(struct hash_backet *, void *))free_vni_entry, + (void (*)(struct hash_bucket *, void *))free_vni_entry, bgp); hash_free(bgp->import_rt_hash); diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index a3d8b8a647..8437c4024e 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -149,11 +149,11 @@ static void display_vrf_import_rt(struct vty *vty, struct vrf_irt_node *irt, } } -static void show_vrf_import_rt_entry(struct hash_backet *backet, void *args[]) +static void show_vrf_import_rt_entry(struct hash_bucket *bucket, void *args[]) { json_object *json = NULL; struct vty *vty = NULL; - struct vrf_irt_node *irt = (struct vrf_irt_node *)backet->data; + struct vrf_irt_node *irt = (struct vrf_irt_node *)bucket->data; vty = (struct vty *)args[0]; json = (struct json_object *)args[1]; @@ -256,11 +256,11 @@ static void display_import_rt(struct vty *vty, struct irt_node *irt, } } -static void show_import_rt_entry(struct hash_backet *backet, void *args[]) +static void show_import_rt_entry(struct hash_bucket *bucket, void *args[]) { json_object *json = NULL; struct vty *vty = NULL; - struct irt_node *irt = (struct irt_node *)backet->data; + struct irt_node *irt = (struct irt_node *)bucket->data; vty = args[0]; json = args[1]; @@ -709,9 +709,9 @@ static void show_vni_routes(struct bgp *bgp, struct bgpevpn *vpn, int type, } } -static void show_vni_routes_hash(struct hash_backet *backet, void *arg) +static void show_vni_routes_hash(struct hash_bucket *bucket, void *arg) { - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; struct vni_walk_ctx *wctx = arg; struct vty *vty = wctx->vty; json_object *json = wctx->json; @@ -835,7 +835,7 @@ static void show_l3vni_entry(struct vty *vty, struct bgp *bgp, } } -static void show_es_entry(struct hash_backet *backet, void *args[]) +static void show_es_entry(struct hash_bucket *bucket, void *args[]) { char buf[ESI_STR_LEN]; char buf1[RD_ADDRSTRLEN]; @@ -845,7 +845,7 @@ static void show_es_entry(struct hash_backet *backet, void *args[]) json_object *json = args[1]; json_object *json_vteps = NULL; struct listnode *node = NULL; - struct evpnes *es = (struct evpnes *)backet->data; + struct evpnes *es = (struct evpnes *)bucket->data; if (json) { json_vteps = json_object_new_array(); @@ -877,14 +877,14 @@ static void show_es_entry(struct hash_backet *backet, void *args[]) } } -static void show_vni_entry(struct hash_backet *backet, void *args[]) +static void show_vni_entry(struct hash_bucket *bucket, void *args[]) { struct vty *vty; json_object *json; json_object *json_vni = NULL; json_object *json_import_rtl = NULL; json_object *json_export_rtl = NULL; - struct bgpevpn *vpn = (struct bgpevpn *)backet->data; + struct bgpevpn *vpn = (struct bgpevpn *)bucket->data; char buf1[10]; char buf2[RD_ADDRSTRLEN]; char rt_buf[25]; @@ -1969,7 +1969,7 @@ static void evpn_show_vrf_import_rts(struct vty *vty, struct bgp *bgp_def, args[1] = json; hash_iterate(bgp_def->vrf_import_rt_hash, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))show_vrf_import_rt_entry, args); } @@ -1987,7 +1987,7 @@ static void evpn_show_import_rts(struct vty *vty, struct bgp *bgp, hash_iterate( bgp->import_rt_hash, - (void (*)(struct hash_backet *, void *))show_import_rt_entry, + (void (*)(struct hash_bucket *, void *))show_import_rt_entry, args); } @@ -2008,7 +2008,7 @@ static void evpn_show_routes_vni_all(struct vty *vty, struct bgp *bgp, wctx.vty = vty; wctx.vtep_ip = vtep_ip; wctx.json = json; - hash_iterate(bgp->vnihash, (void (*)(struct hash_backet *, + hash_iterate(bgp->vnihash, (void (*)(struct hash_bucket *, void *))show_vni_routes_hash, &wctx); } @@ -2552,7 +2552,7 @@ static void evpn_show_all_es(struct vty *vty, struct bgp *bgp, args[0] = vty; args[1] = json; hash_iterate(bgp->esihash, - (void (*)(struct hash_backet *, void *))show_es_entry, + (void (*)(struct hash_bucket *, void *))show_es_entry, args); } @@ -2612,7 +2612,7 @@ static void evpn_show_all_vnis(struct vty *vty, struct bgp *bgp, args[0] = vty; args[1] = json; hash_iterate(bgp->vnihash, - (void (*)(struct hash_backet *, void *))show_vni_entry, + (void (*)(struct hash_bucket *, void *))show_vni_entry, args); /* print all L3 VNIs */ diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c index 910c8a7372..c2f0baff76 100644 --- a/bgpd/bgp_keepalives.c +++ b/bgpd/bgp_keepalives.c @@ -85,7 +85,7 @@ static void pkat_del(void *pkat) * * @return maximum time to wait until next update (0 if infinity) */ -static void peer_process(struct hash_backet *hb, void *arg) +static void peer_process(struct hash_bucket *hb, void *arg) { struct pkat *pkat = hb->data; diff --git a/bgpd/bgp_mac.c b/bgpd/bgp_mac.c index 24f93e4373..4a408df858 100644 --- a/bgpd/bgp_mac.c +++ b/bgpd/bgp_mac.c @@ -106,10 +106,10 @@ struct bgp_mac_find_internal { const char *ifname; }; -static void bgp_mac_find_ifp_internal(struct hash_backet *backet, void *arg) +static void bgp_mac_find_ifp_internal(struct hash_bucket *bucket, void *arg) { struct bgp_mac_find_internal *bmfi = arg; - struct bgp_self_mac *bsm = backet->data; + struct bgp_self_mac *bsm = bucket->data; struct listnode *node; char *name; @@ -331,10 +331,10 @@ bool bgp_mac_entry_exists(struct prefix *p) return true; } -static void bgp_mac_show_mac_entry(struct hash_backet *backet, void *arg) +static void bgp_mac_show_mac_entry(struct hash_bucket *bucket, void *arg) { struct vty *vty = arg; - struct bgp_self_mac *bsm = backet->data; + struct bgp_self_mac *bsm = bucket->data; struct listnode *node; char *name; char buf_mac[ETHER_ADDR_STRLEN]; diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 70d3d7b69c..de97b73c72 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -184,10 +184,10 @@ struct bgp_addr { struct list *ifp_name_list; }; -static void show_address_entry(struct hash_backet *backet, void *args) +static void show_address_entry(struct hash_bucket *bucket, void *args) { struct vty *vty = (struct vty *)args; - struct bgp_addr *addr = (struct bgp_addr *)backet->data; + struct bgp_addr *addr = (struct bgp_addr *)bucket->data; char *name; struct listnode *node; @@ -204,7 +204,7 @@ static void show_address_entry(struct hash_backet *backet, void *args) void bgp_nexthop_show_address_hash(struct vty *vty, struct bgp *bgp) { hash_iterate(bgp->address_hash, - (void (*)(struct hash_backet *, void *))show_address_entry, + (void (*)(struct hash_bucket *, void *))show_address_entry, vty); } diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index c63eb83c1b..4c51db8e14 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -72,9 +72,9 @@ struct bgp_pbr_rule_unique { struct bgp_pbr_rule *bpr_found; }; -static int bgp_pbr_rule_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_rule_walkcb(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_rule *bpr = (struct bgp_pbr_rule *)backet->data; + struct bgp_pbr_rule *bpr = (struct bgp_pbr_rule *)bucket->data; struct bgp_pbr_rule_unique *bpru = (struct bgp_pbr_rule_unique *) arg; uint32_t unique = bpru->unique; @@ -86,9 +86,9 @@ static int bgp_pbr_rule_walkcb(struct hash_backet *backet, void *arg) return HASHWALK_CONTINUE; } -static int bgp_pbr_action_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_action_walkcb(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_action *bpa = (struct bgp_pbr_action *)backet->data; + struct bgp_pbr_action *bpa = (struct bgp_pbr_action *)bucket->data; struct bgp_pbr_action_unique *bpau = (struct bgp_pbr_action_unique *) arg; uint32_t unique = bpau->unique; @@ -100,10 +100,10 @@ static int bgp_pbr_action_walkcb(struct hash_backet *backet, void *arg) return HASHWALK_CONTINUE; } -static int bgp_pbr_match_entry_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_match_entry_walkcb(struct hash_bucket *bucket, void *arg) { struct bgp_pbr_match_entry *bpme = - (struct bgp_pbr_match_entry *)backet->data; + (struct bgp_pbr_match_entry *)bucket->data; struct bgp_pbr_match_entry_unique *bpmeu = (struct bgp_pbr_match_entry_unique *)arg; uint32_t unique = bpmeu->unique; @@ -120,9 +120,9 @@ struct bgp_pbr_match_ipsetname { struct bgp_pbr_match *bpm_found; }; -static int bgp_pbr_match_pername_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_match_pername_walkcb(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)backet->data; + struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)bucket->data; struct bgp_pbr_match_ipsetname *bpmi = (struct bgp_pbr_match_ipsetname *)arg; char *ipset_name = bpmi->ipsetname; @@ -135,9 +135,9 @@ static int bgp_pbr_match_pername_walkcb(struct hash_backet *backet, void *arg) return HASHWALK_CONTINUE; } -static int bgp_pbr_match_iptable_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_match_iptable_walkcb(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)backet->data; + struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)bucket->data; struct bgp_pbr_match_iptable_unique *bpmiu = (struct bgp_pbr_match_iptable_unique *)arg; uint32_t unique = bpmiu->unique; @@ -154,9 +154,9 @@ struct bgp_pbr_match_unique { struct bgp_pbr_match *bpm_found; }; -static int bgp_pbr_match_walkcb(struct hash_backet *backet, void *arg) +static int bgp_pbr_match_walkcb(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)backet->data; + struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)bucket->data; struct bgp_pbr_match_unique *bpmu = (struct bgp_pbr_match_unique *) arg; uint32_t unique = bpmu->unique; @@ -1504,9 +1504,9 @@ struct bgp_pbr_rule_remain { struct bgp_pbr_rule *bpr_found; }; -static int bgp_pbr_get_same_rule(struct hash_backet *backet, void *arg) +static int bgp_pbr_get_same_rule(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_rule *r1 = (struct bgp_pbr_rule *)backet->data; + struct bgp_pbr_rule *r1 = (struct bgp_pbr_rule *)bucket->data; struct bgp_pbr_rule_remain *ctxt = (struct bgp_pbr_rule_remain *)arg; struct bgp_pbr_rule *r2; @@ -1543,9 +1543,9 @@ static int bgp_pbr_get_same_rule(struct hash_backet *backet, void *arg) return HASHWALK_CONTINUE; } -static int bgp_pbr_get_remaining_entry(struct hash_backet *backet, void *arg) +static int bgp_pbr_get_remaining_entry(struct hash_bucket *bucket, void *arg) { - struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)backet->data; + struct bgp_pbr_match *bpm = (struct bgp_pbr_match *)bucket->data; struct bgp_pbr_match_entry_remain *bpmer = (struct bgp_pbr_match_entry_remain *)arg; struct bgp_pbr_match *bpm_temp; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 230df715de..ad983da498 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11695,10 +11695,10 @@ DEFUN (clear_ip_bgp_dampening_address_mask, NULL, 0); } -static void show_bgp_peerhash_entry(struct hash_backet *backet, void *arg) +static void show_bgp_peerhash_entry(struct hash_bucket *bucket, void *arg) { struct vty *vty = arg; - struct peer *peer = backet->data; + struct peer *peer = bucket->data; char buf[SU_ADDRSTRLEN]; vty_out(vty, "\tPeer: %s %s\n", peer->host, diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 2e2ad88314..b74dc33ea4 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -1393,9 +1393,9 @@ static int updgrp_policy_update_walkcb(struct update_group *updgrp, void *arg) return UPDWALK_CONTINUE; } -static int update_group_walkcb(struct hash_backet *backet, void *arg) +static int update_group_walkcb(struct hash_bucket *bucket, void *arg) { - struct update_group *updgrp = backet->data; + struct update_group *updgrp = bucket->data; struct updwalk_context *wctx = arg; int ret = (*wctx->cb)(updgrp, wctx->context); return ret; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c21532a24d..2aa4e3ecd4 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -7613,10 +7613,10 @@ DEFUN (show_bgp_mac_hash, return CMD_SUCCESS; } -static void show_tip_entry(struct hash_backet *backet, void *args) +static void show_tip_entry(struct hash_bucket *bucket, void *args) { struct vty *vty = (struct vty *)args; - struct tip_addr *tip = (struct tip_addr *)backet->data; + struct tip_addr *tip = (struct tip_addr *)bucket->data; vty_out(vty, "addr: %s, count: %d\n", inet_ntoa(tip->addr), tip->refcnt); @@ -7629,7 +7629,7 @@ static void bgp_show_martian_nexthops(struct vty *vty, struct bgp *bgp) vty_out(vty, "Tunnel-ip database:\n"); hash_iterate(bgp->tip_hash, - (void (*)(struct hash_backet *, void *))show_tip_entry, + (void (*)(struct hash_bucket *, void *))show_tip_entry, vty); } @@ -7784,7 +7784,7 @@ DEFUN (show_bgp_memory, if ((count = mtype_stats_alloc(MTYPE_HASH_BACKET))) vty_out(vty, "%ld hash buckets, using %s of memory\n", count, mtype_memstr(memstrbuf, sizeof(memstrbuf), - count * sizeof(struct hash_backet))); + count * sizeof(struct hash_bucket))); if ((count = mtype_stats_alloc(MTYPE_BGP_REGEXP))) vty_out(vty, "%ld compiled regexes, using %s of memory\n", count, mtype_memstr(memstrbuf, sizeof(memstrbuf), @@ -11196,12 +11196,12 @@ DEFUN (show_ip_bgp_paths, #include "hash.h" -static void community_show_all_iterator(struct hash_backet *backet, +static void community_show_all_iterator(struct hash_bucket *bucket, struct vty *vty) { struct community *com; - com = (struct community *)backet->data; + com = (struct community *)bucket->data; vty_out(vty, "[%p] (%ld) %s\n", (void *)com, com->refcnt, community_str(com, false)); } @@ -11218,19 +11218,19 @@ DEFUN (show_ip_bgp_community_info, vty_out(vty, "Address Refcnt Community\n"); hash_iterate(community_hash(), - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))community_show_all_iterator, vty); return CMD_SUCCESS; } -static void lcommunity_show_all_iterator(struct hash_backet *backet, +static void lcommunity_show_all_iterator(struct hash_bucket *bucket, struct vty *vty) { struct lcommunity *lcom; - lcom = (struct lcommunity *)backet->data; + lcom = (struct lcommunity *)bucket->data; vty_out(vty, "[%p] (%ld) %s\n", (void *)lcom, lcom->refcnt, lcommunity_str(lcom, false)); } @@ -11247,7 +11247,7 @@ DEFUN (show_ip_bgp_lcommunity_info, vty_out(vty, "Address Refcnt Large-community\n"); hash_iterate(lcommunity_hash(), - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))lcommunity_show_all_iterator, vty); diff --git a/bgpd/valgrind.supp b/bgpd/valgrind.supp index 28c3f82749..7a25c88363 100644 --- a/bgpd/valgrind.supp +++ b/bgpd/valgrind.supp @@ -6,8 +6,4 @@ fun:dlopen@@GLIBC_2.2.5 fun:ly_load_plugins_dir fun:ly_load_plugins - fun:ly_ctx_new - fun:yang_init - fun:frr_init - fun:main } diff --git a/debianpkg/changelog.in b/changelog-auto.in index 8f3f4753de..127d7fe147 100644 --- a/debianpkg/changelog.in +++ b/changelog-auto.in @@ -1,4 +1,49 @@ -frr (@VERSION@) RELEASED; urgency=medium +frr (@VERSION@-0) UNRELEASED; urgency=medium + + * autoconf changelog entry -- for git autobuilds only. + remove and replace when creating releases! + (tools/tarsource.sh will handle this) + + -- FRRouting-Dev <dev@lists.frrouting.org> Thu, 25 Oct 2018 16:36:50 +0200 + +frr (6.0-2) testing; urgency=medium + + * add install-info to build deps + * remove trailing whitespace from control + * cleanup tcp-zebra configure options + * drop unused SMUX client OID MIBs + * remove /proc check + * remove --enable-poll + * remove libtool .la files + * drop texlive-latex-base, texlive-generic-recommended build deps + * consistently allow python2 or python3 + * remove bad USE_* options, add WERROR + * drop libncurses5 dep + * remove backports mechanism + * use better dependency for pythontools (binNMU compatible) + * remove bogus shlib:Depends on frr-dbg + * create frr-snmp and frr-rpki-rtrlib + * make frr-pythontools a "Recommends:" + * use redistclean target + * update to Debian Policy version 4.2.1 + * raise debhelper compat level to 9 + * ditch development-only files + * modernise dh_missing and use fail mode + * disable zeromq and FPM + * always install /etc/init.d/frr + * put frr-doc package in 'doc' section + * install HTML docs, drop tools/ + * fix install for {frr,rfptest,ospfclient} + * add watch file + * change python dependency and shebang to python3:any + * use set -e in maintscripts + * put myself in as maintainer + * update copyright file + * closes: #863249 + + -- David Lamparter <equinox-debian@diac24.net> Thu, 25 Oct 2018 16:36:50 +0200 + +frr (6.0-1) RELEASED; urgency=medium * New Enabled: PIM draft Unnumbered @@ -7,7 +52,7 @@ frr (@VERSION@) RELEASED; urgency=medium frr (3.0-1) RELEASED; urgency=medium * Added Debian 9 Backport - + -- FRRouting-Dev <dev@lists.frrouting.org> Mon, 16 Oct 2017 03:28:00 -0700 frr (3.0-0) RELEASED; urgency=medium @@ -28,7 +73,7 @@ frr (3.0-0) RELEASED; urgency=medium * New Enabled: PIM Sparse Mode * New Enabled: NHRP RFC 2332 * New Enabled: Label Manager - * Switched from hardening-wrapper to dpkg-buildflags. + * Switched from hardening-wrapper to dpkg-buildflags. -- FRRouting-Dev <dev@lists.frrouting.org> Fri, 13 Oct 2017 16:17:26 -0700 @@ -66,7 +111,7 @@ quagga (0.99.24+cl3u3) RELEASED; urgency=medium quagga (0.99.23.1-1+cl3u2) RELEASED; urgency=medium - * New Enabled: VRF - See Documentation for how to use + * New Enabled: VRF - See Documentation for how to use * New Enabled: Improved interface statistics * New Enabled: Various vtysh improvements * New Enabled: Numerous compile warnings and SA fixes @@ -84,7 +129,7 @@ quagga (0.99.23.1-1+cl3u2) RELEASED; urgency=medium * New Enabled: BGP default keepalive to 3s and holdtime to 9s * New Enabled: OSPF spf timers are now '0 50 5000' by default * New Enabled: BGP hostname is displayed by default - * New Enabled: BGP 'no-as-set' is the default for + * New Enabled: BGP 'no-as-set' is the default for 'bgp as-path multipath-relax" * New Enabled: RA is on by default if using 5549 on an interface * New Enabled: peer-group restrictions relaxed, update-groups determine @@ -108,11 +153,11 @@ quagga (0.99.23.1-1+cl3u2) RELEASED; urgency=medium * Closes: CM-9974 Get route counts right for show ip route summary * Closes: CM-9786 BGP memory leak in peer hostname * Closes: CM-9340 BGP: Ensure correct sequence of processing at exit - * Closes: CM-9270 ripd: Fix crash when a default route is passed to rip - * Closes: CM-9255 BGPD crash around bgp_config_write () + * Closes: CM-9270 ripd: Fix crash when a default route is passed to rip + * Closes: CM-9255 BGPD crash around bgp_config_write () * Closes: CM-9134 ospf6d: Fix for crash when non area 0 network entered first - * Closes: CM-8934 OSPFv3: Check area before scheduling SPF + * Closes: CM-8934 OSPFv3: Check area before scheduling SPF * Closes: CM-8514 zebra: Crash upon disabling a link * Closes: CM-8295 BGP crash in group_announce_route_walkcb * Closes: CM-8191 BGP: crash in update_subgroup_merge() @@ -148,15 +193,15 @@ quagga (0.99.22.4-4) unstable; urgency=medium quagga (0.99.22.4-3) unstable; urgency=low - * Added status to init script (thanks to Peter J. Holzer). Closes: #730625 + * Added status to init script (thanks to Peter J. Holzer). Closes: #730625 * Init script now sources /lib/lsb/init-functions. - * Switched from hardening-wrapper to dpkg-buildflags. + * Switched from hardening-wrapper to dpkg-buildflags. -- Christian Hammers <ch@debian.org> Wed, 01 Jan 2014 19:12:01 +0100 quagga (0.99.22.4-2) unstable; urgency=low - * Fixed typo in package description (thanks to Davide Prina). + * Fixed typo in package description (thanks to Davide Prina). Closes: #625860 * Added Italian Debconf translation (thanks to Beatrice Torracca) Closes: #729798 @@ -171,15 +216,15 @@ quagga (0.99.22.4-1) unstable; urgency=high the OSPF API-server (exporting the LSDB and allowing announcement of Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads to an exploitable stack overflow. - + For this condition to occur, the following two conditions must be true: - Quagga is configured with --enable-opaque-lsa - ospfd is started with the "-a" command line option - + If either of these does not hold, the relevant code is not executed and the issue does not get triggered." Closes: #726724 - + * New upstream release - ospfd: protect vs. VU#229804 (malformed Router-LSA) (Quagga is said to be non-vulnerable but still adds some protection) @@ -188,7 +233,7 @@ quagga (0.99.22.4-1) unstable; urgency=high quagga (0.99.22.1-2) unstable; urgency=low - * Added autopkgtests (thanks to Yolanda Robla). Closes: #710147 + * Added autopkgtests (thanks to Yolanda Robla). Closes: #710147 * Added "status" command to init script (thanks to James Andrewartha). Closes: #690013 * Added "libsnmp-dev" to Build-Deps. There not needed for the official @@ -196,7 +241,7 @@ quagga (0.99.22.1-2) unstable; urgency=low SNMP feature (which for licence reasons cannot be done by Debian). Thanks to Ben Winslow). Closes: #694852 * Changed watchquagga_options to an array so that quotes can finally - be used as expected. Closes: #681088 + be used as expected. Closes: #681088 * Fixed bug that prevented restarting only the watchquagga daemon (thanks to Harald Kappe). Closes: #687124 @@ -215,7 +260,7 @@ quagga (0.99.22.1-1) unstable; urgency=low quagga (0.99.22-1) unstable; urgency=low - * New upstream release. + * New upstream release. - [bgpd] The semantics of default-originate route-map have changed. The route-map is now used to advertise the default route conditionally. The old behaviour which allowed to set attributes on the originated @@ -227,7 +272,7 @@ quagga (0.99.22-1) unstable; urgency=low - [isisd] is in "beta" state. - [ospf6d] is in "alpha/experimental" state - More changes are documented in the upstream changelog! - * debian/watch: Adjusted to new savannah.gnu.org site, thanks to Bart + * debian/watch: Adjusted to new savannah.gnu.org site, thanks to Bart Martens. * debian/patches/99_CVE-2012-1820_bgp_capability_orf.diff removed as its in the changelog. @@ -274,7 +319,7 @@ quagga (0.99.21-1) unstable; urgency=low - [babeld] a new routing daemon implementing the BABEL ad-hoc mesh routing protocol has been merged. - [isisd] a major overhaul has been picked up. Please note that isisd is - STILL NOT SUITABLE FOR PRODUCTION USE. + STILL NOT SUITABLE FOR PRODUCTION USE. - a lot of bugs have been fixed * Added watchquagga daemon. * Added DEP-3 conforming patch comments. @@ -309,7 +354,7 @@ quagga (0.99.20-2) unstable; urgency=low * Bumped standards version to 0.9.2. * Migrated to "dh" build system. - * Added quagga-dbg package. + * Added quagga-dbg package. -- Christian Hammers <ch@debian.org> Fri, 14 Oct 2011 23:59:26 +0200 @@ -317,7 +362,7 @@ quagga (0.99.20-1) unstable; urgency=low * New upstream release: "The primary focus of this release is a fix of SEGV regression in ospfd, - which was introduced in 0.99.19. It also features a series of minor + which was introduced in 0.99.19. It also features a series of minor improvements, including better RFC compliance in bgpd, better support of FreeBSD and some enhancements to isisd." * Fixes off-by-one bug (removed 20_ospf6_area_argv.dpatch). Closes: #519488 @@ -342,7 +387,7 @@ quagga (0.99.18-1) unstable; urgency=low * SECURITY: "This release fixes 2 denial of services in bgpd, which can be remotely triggered by malformed AS-Pathlimit or Extended-Community attributes. - These issues have been assigned CVE-2010-1674 and CVE-2010-1675. + These issues have been assigned CVE-2010-1674 and CVE-2010-1675. Support for AS-Pathlimit has been removed with this release." * Added Brazilian Portuguese debconf translation. Closes: #617735 * Changed section for quagga-doc from "doc" to "net". @@ -352,7 +397,7 @@ quagga (0.99.18-1) unstable; urgency=low quagga (0.99.17-4) unstable; urgency=low - * Added comment to init script (thanks to Marc Haber). Closes: #599524 + * Added comment to init script (thanks to Marc Haber). Closes: #599524 -- Christian Hammers <ch@debian.org> Thu, 13 Jan 2011 23:53:29 +0100 @@ -365,7 +410,7 @@ quagga (0.99.17-3) unstable; urgency=low quagga (0.99.17-2) unstable; urgency=low - * Added Danisch Debconf translation (thanks to Joe Dalton). Closes: #596259 + * Added Danisch Debconf translation (thanks to Joe Dalton). Closes: #596259 -- Christian Hammers <ch@debian.org> Sat, 18 Sep 2010 12:20:07 +0200 @@ -384,7 +429,7 @@ quagga (0.99.17-1) unstable; urgency=high quagga (0.99.16-1) unstable; urgency=low - * New upstream release. Closes: #574527 + * New upstream release. Closes: #574527 * Added chrpath to debian/rules to fix rpath problems that lintian spottet. -- Christian Hammers <ch@debian.org> Sun, 21 Mar 2010 17:05:40 +0100 @@ -401,16 +446,16 @@ quagga (0.99.15-1) unstable; urgency=low * New upstream release "This fixes some annoying little ospfd and ospf6d regressions, which made - 0.99.14 a bit of a problem release (...) This release still contains a - regression in the "no ip address ..." command, at least on Linux. - See bug #486, which contains a workaround patch. This release should be + 0.99.14 a bit of a problem release (...) This release still contains a + regression in the "no ip address ..." command, at least on Linux. + See bug #486, which contains a workaround patch. This release should be considered a 1.0.0 release candidate. Please test this release as widely as possible." - * Fixed wrong port number in zebra.8 (thanks to Thijs Kinkhorst). + * Fixed wrong port number in zebra.8 (thanks to Thijs Kinkhorst). Closes: #517860 - * Added Russian Debconf tanslation (thanks to Yuri Kozlov). + * Added Russian Debconf tanslation (thanks to Yuri Kozlov). Closes: #539464 - * Removed so-version in build-dep to libreadline-dev on request of + * Removed so-version in build-dep to libreadline-dev on request of Matthias Klose. * Added README.source with reference to dpatch as suggested by lintian. * Bumped standards versionto 3.8.3. @@ -431,8 +476,8 @@ quagga (0.99.14-1) unstable; urgency=low quagga (0.99.13-2) unstable; urgency=low - * Added Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #510714 + * Added Japanese Debconf translation (thanks to Hideki Yamane). + Closes: #510714 * When checking for obsoleted config options in preinst, print filename where it occures (thanks to Michael Bussmann). Closes: #339489 @@ -456,7 +501,7 @@ quagga (0.99.12-1) unstable; urgency=high "This release fixes an urgent bug in bgpd where it could hit an assert if it received a long AS_PATH with a 4-byte ASN." Noteworthy bugfixes: + [bgpd] Fix bgp ipv4/ipv6 accept handling - + [bgpd] AS4 bugfix by Chris Caputo + + [bgpd] AS4 bugfix by Chris Caputo + [bgpd] Allow accepted peers to progress even if realpeer is in Connect + [ospfd] Switch Fletcher checksum back to old ospfd version @@ -481,7 +526,7 @@ quagga (0.99.10-1) unstable; urgency=medium + bgpd: 4-Byte AS Number support + Sessions were incorrectly reset if a partial AS-Pathlimit attribute was received. - + Advertisement of Multi-Protocol prefixes (i.e. non-IPv4) had been + + Advertisement of Multi-Protocol prefixes (i.e. non-IPv4) had been broken in the 0.99.9 release. Closes: #467656 -- Christian Hammers <ch@debian.org> Tue, 08 Jul 2008 23:32:42 +0200 @@ -516,7 +561,7 @@ quagga (0.99.9-3) unstable; urgency=low Closes: #428574 * debian/control: (thanks to Marco Rodrigues) + Bump Standards-Version to 3.7.3 (no changes needed). - + Add Homepage field. + + Add Homepage field. -- Christian Hammers <ch@debian.org> Mon, 28 Jan 2008 22:29:18 +0100 @@ -546,7 +591,7 @@ quagga (0.99.9-1) unstable; urgency=high quagga (0.99.8-1) unstable; urgency=low - * New upstream version. + * New upstream version. -- Christian Hammers <ch@debian.org> Fri, 17 Aug 2007 00:07:04 +0200 @@ -572,7 +617,7 @@ quagga (0.99.7-2) unstable; urgency=low quagga (0.99.7-1) unstable; urgency=low - * New upstream release. Closes: #421553 + * New upstream release. Closes: #421553 -- Christian Hammers <ch@debian.org> Mon, 30 Apr 2007 14:22:34 +0200 @@ -586,7 +631,7 @@ quagga (0.99.6-5) unstable; urgency=high * SECURITY: The bgpd daemon was vulnerable to a Denial-of-Service. Configured peers - could cause a Quagga bgpd to, typically, assert() and abort. The DoS + could cause a Quagga bgpd to, typically, assert() and abort. The DoS could be triggered by peers by sending an UPDATE message with a crafted, malformed Multi-Protocol reachable/unreachable NLRI attribute. This is CVE-2007-1995 and Quagga Bug#354. Closes: #418323 @@ -595,8 +640,8 @@ quagga (0.99.6-5) unstable; urgency=high quagga (0.99.6-4) unstable; urgency=low - * Improved note in README.Debian for SNMP self-builders (thanks to Matthias - Wamser). Closes: #414788 + * Improved note in README.Debian for SNMP self-builders (thanks to Matthias + Wamser). Closes: #414788 -- Christian Hammers <ch@debian.org> Wed, 14 Mar 2007 02:18:57 +0100 @@ -623,7 +668,7 @@ quagga (0.99.6-1) unstable; urgency=low quagga (0.99.5-5) unstable; urgency=high * Changed Depends on adduser to Pre-Depends to avoid uninstallability - in certain cases (thanks to Steve Langasek, Lucas Nussbaum). + in certain cases (thanks to Steve Langasek, Lucas Nussbaum). Closes: #398562 -- Christian Hammers <ch@debian.org> Wed, 15 Nov 2006 17:46:34 +0100 @@ -631,7 +676,7 @@ quagga (0.99.5-5) unstable; urgency=high quagga (0.99.5-4) unstable; urgency=low * Added default PAM file and some explanations regarding PAM authentication - of vtysh which could prevent the start at boot-time when used wrong. + of vtysh which could prevent the start at boot-time when used wrong. Now PAM permits anybody to access the vtysh tool (a malicious user could build his own vtysh without PAM anyway) and the access is controled by the read/write permissions of the vtysh socket which are only granted to @@ -652,7 +697,7 @@ quagga (0.99.5-3) unstable; urgency=medium quagga (0.99.5-2) unstable; urgency=medium - * Added LSB info section to initscript. + * Added LSB info section to initscript. * Removed unnecessary depends to libncurses5 to make checklib happy. The one to libcap should remain though as it is just temporarily unused. @@ -699,7 +744,7 @@ quagga (0.99.4-1) unstable; urgency=low quagga (0.99.3-3) unstable; urgency=low - * Added CVE numbers for the security patch in 0.99.3-2. + * Added CVE numbers for the security patch in 0.99.3-2. -- Christian Hammers <ch@debian.org> Sat, 6 May 2006 17:14:22 +0200 @@ -711,7 +756,7 @@ quagga (0.99.3-2) unstable; urgency=high CVE-2006-2223 - missing configuration to disable RIPv1 or require plaintext or MD5 authentication CVE-2006-2224 - lack of enforcement of RIPv2 authentication requirements - Closes: #365940 + Closes: #365940 * First amd64 upload. -- Christian Hammers <ch@debian.org> Thu, 4 May 2006 00:22:09 +0200 @@ -742,7 +787,7 @@ quagga (0.99.1-7) unstable; urgency=low quagga (0.99.1-6) unstable; urgency=low - * Fixed debconf dependency as requested by Joey Hess. + * Fixed debconf dependency as requested by Joey Hess. -- Christian Hammers <ch@debian.org> Mon, 26 Sep 2005 20:47:35 +0200 @@ -862,7 +907,7 @@ quagga (0.98.3-2) unstable; urgency=low quagga (0.98.3-1) unstable; urgency=low - * New upstream release. + * New upstream release. Mmost notably fixes last regression in bgpd (reannounce of prefixes with changed attributes works again), race condition in netlink handling while using IPv6, MTU changes handling in ospfd and several @@ -881,9 +926,9 @@ quagga (0.98.2-1) unstable; urgency=medium * Quoting the upstream announcement: The 0.98.1 release unfortunately was a brown paper bag release with - respect to ospfd. [...] 0.98.2 has been released, with one crucial change - to fix the unfortunate mistake in 0.98.1, which caused problems if - ospfd became DR. + respect to ospfd. [...] 0.98.2 has been released, with one crucial change + to fix the unfortunate mistake in 0.98.1, which caused problems if + ospfd became DR. * Note: the upstream tarball had a strange problem, apparently redhat.spec was twice in it? At least debuild gave a strange error message so I unpacked it by hand. No changes were made to the .orig.tar.gz! @@ -906,7 +951,7 @@ quagga (0.98.1-1) unstable; urgency=medium quagga (0.98.0-3) unstable; urgency=low - * Fixed problem in init script. Closes: #290317 + * Fixed problem in init script. Closes: #290317 * Removed obsolete "smux peer enable" patch. -- Christian Hammers <ch@debian.org> Fri, 14 Jan 2005 17:37:27 +0100 @@ -928,7 +973,7 @@ quagga (0.98.0-1) unstable; urgency=low quagga (0.97.5-1) unstable; urgency=low - * New upstream version. + * New upstream version. * Added Czech debconf translation (thanks to Miroslav Kure). Closes: #287293 * Added Brazilian debconf translation (thanks to Andre Luis Lopes). @@ -938,7 +983,7 @@ quagga (0.97.5-1) unstable; urgency=low quagga (0.97.4-2) unstable; urgency=low - * Fixed quagga.info build problem. + * Fixed quagga.info build problem. -- Christian Hammers <ch@debian.org> Wed, 5 Jan 2005 22:38:01 +0100 @@ -972,7 +1017,7 @@ quagga (0.97.2-4) unstable; urgency=low * Added Portuguese debconf translation (thanks to Andre Luis Lopes). Closes: #279352 - * Disabled ospfapi server by default on recommendation of Paul Jakma. + * Disabled ospfapi server by default on recommendation of Paul Jakma. -- Christian Hammers <ch@debian.org> Sun, 7 Nov 2004 15:07:05 +0100 @@ -988,14 +1033,14 @@ quagga (0.97.2-2) unstable; urgency=low suggestion from Paul Jakma. Still not perfect though. * Fixed upstream vtysh.conf.sample file. * "ip ospf network broadcast" is now saved correctly. Closes: #244116 - * Daemon options are now in /etc/quagga/debian.conf to be user + * Daemon options are now in /etc/quagga/debian.conf to be user configurable (thanks to Simon Raven and Hasso Tepper). Closes: #266715 -- Christian Hammers <ch@debian.org> Tue, 26 Oct 2004 23:35:45 +0200 quagga (0.97.2-1) unstable; urgency=low - * New upstream version. + * New upstream version. Closes: #254541 * Fixed warning on unmodular kernels (thanks to Christoph Biedl). Closes: #277973 @@ -1011,7 +1056,7 @@ quagga (0.97.1-2) unstable; urgency=low quagga (0.97.1-1) unstable; urgency=low - * New upstream version. + * New upstream version. * Removed some obsolete files from debian/patches. * Added patch from upstream bug 113. Closes: #254541 * Added patch from upstream that fixes a compilation problem in the @@ -1047,7 +1092,7 @@ quagga (0.96.5-10) unstable; urgency=medium quagga (0.96.5-9) unstable; urgency=low * Rewrote the documentation chapter about SNMP support. Closes: #195653 - * Added MPLS docs. + * Added MPLS docs. -- Christian Hammers <ch@debian.org> Thu, 29 Jul 2004 21:01:52 +0200 @@ -1074,7 +1119,7 @@ quagga (0.96.5-7) unstable; urgency=low quagga (0.96.5-6) unstable; urgency=low - * Try to load the capability module as it is needed now. + * Try to load the capability module as it is needed now. -- Christian Hammers <ch@debian.org> Tue, 8 Jun 2004 23:25:29 +0200 @@ -1103,9 +1148,9 @@ quagga (0.96.5-3) unstable; urgency=low quagga (0.96.5-2) unstable; urgency=low * New upstream version. - * New md5 patch version (thanks to Niklas Jakobsson and Hasso Tepper). + * New md5 patch version (thanks to Niklas Jakobsson and Hasso Tepper). Closes: #250985 - * Fixes info file generation (thanks to Peder Chr. Norgaard). + * Fixes info file generation (thanks to Peder Chr. Norgaard). Closes: #250992 * Added catalan debconf translation (thanks to Aleix Badia i Bosch). Closes: #250118 @@ -1136,14 +1181,14 @@ quagga (0.96.4x-10) unstable; urgency=low started to require it. See: CAN-2004-0230, http://www.us-cert.gov/cas/techalerts/TA04-111A.html * PATCHES: - This release contains the MD5 patch from Hasso Tepper. It also seems to + This release contains the MD5 patch from Hasso Tepper. It also seems to required a kernel patch. See /usr/share/doc/quagga/README.Debian.MD5. -- Christian Hammers <ch@debian.org> Thu, 29 Apr 2004 01:01:38 +0200 quagga (0.96.4x-9) unstable; urgency=low - * Fixed daemon loading order (thanks to Matt Kemner). + * Fixed daemon loading order (thanks to Matt Kemner). * Fixed typo in init script (thanks to Charlie Brett). Closes: #238582 -- Christian Hammers <ch@debian.org> Sun, 4 Apr 2004 15:32:18 +0200 @@ -1151,7 +1196,7 @@ quagga (0.96.4x-9) unstable; urgency=low quagga (0.96.4x-8) unstable; urgency=low * Patched upstream source so that quagga header files end up in - /usr/include/quagga/. Closes: #233792 + /usr/include/quagga/. Closes: #233792 -- Christian Hammers <ch@debian.org> Mon, 23 Feb 2004 01:42:53 +0100 @@ -1164,8 +1209,8 @@ quagga (0.96.4x-7) unstable; urgency=low quagga (0.96.4x-6) unstable; urgency=low - * Added dependency to iproute. - * Initscript now checks not only for the pid file but also for the + * Added dependency to iproute. + * Initscript now checks not only for the pid file but also for the daemons presence (thanks to Phil Gregory). Closes: #224389 * Added my patch to configure file permissions. @@ -1182,13 +1227,13 @@ quagga (0.96.4x-5) unstable; urgency=low obscure whitespaces inside an C macro. (Thanks to Marc Haber). Closes: #223529 * Now uses /usr/bin/pager. Closes: #204070 - * Added note about the "official woody backports" on my homepage. + * Added note about the "official woody backports" on my homepage. -- Christian Hammers <ch@debian.org> Mon, 15 Dec 2003 20:39:06 +0100 quagga (0.96.4x-4) unstable; urgency=high - * SECURITY: + * SECURITY: Fixes another bug that was originally reported against Zebra. . http://rhn.redhat.com/errata/RHSA-2003-307.html @@ -1210,7 +1255,7 @@ quagga (0.96.4x-3) unstable; urgency=low * Made the directory (but not the config/log files!) world accessible again on user request (thanks to Anand Kumria)). Closes: #213129 * No longer providing sample configuration in /etc/quagga/. They are - now only available in /usr/share/doc/quagga/ to avoid accidently + now only available in /usr/share/doc/quagga/ to avoid accidently using them without changing the adresses (thanks to Marc Haber). Closes: #215918 @@ -1219,13 +1264,13 @@ quagga (0.96.4x-3) unstable; urgency=low quagga (0.96.4x-2) unstable; urgency=low * Fixed permission problem with pidfile (thanks to Kir Kostuchenko). - Closes: #220938 + Closes: #220938 -- Christian Hammers <ch@debian.org> Sun, 16 Nov 2003 14:24:08 +0100 quagga (0.96.4x-1) unstable; urgency=low - * Reupload of 0.96.4. Last upload-in-a-hurry produced a totally + * Reupload of 0.96.4. Last upload-in-a-hurry produced a totally crappy .tar.gz file. Closes: #220621 -- Christian Hammers <ch@debian.org> Fri, 14 Nov 2003 19:45:57 +0100 @@ -1235,7 +1280,7 @@ quagga (0.96.4-1) unstable; urgency=high * SECURITY: Remote DoS of protocol daemons. Fix for a remote triggerable crash in vty layer. The management ports ("telnet myrouter ospfd") should not be open to the internet! - + * New upstream version. - OSPF bugfixes. - Some improvements for bgp and rip. @@ -1252,7 +1297,7 @@ quagga (0.96.3-3) unstable; urgency=low quagga (0.96.3-2) unstable; urgency=low - * Readded GNOME-PRODUCT-ZEBRA-MIB. + * Readded GNOME-PRODUCT-ZEBRA-MIB. -- Christian Hammers <ch@debian.org> Thu, 23 Oct 2003 06:17:03 +0200 diff --git a/configure.ac b/configure.ac index 157dad33a9..fcfc4bd2fb 100755 --- a/configure.ac +++ b/configure.ac @@ -2157,6 +2157,7 @@ AC_SUBST([CFG_LIBYANG_PLUGINS]) AC_DEFINE_UNQUOTED([MODULE_PATH], ["$CFG_MODULE"], [path to modules]) AC_DEFINE_UNQUOTED([YANG_MODELS_PATH], ["$CFG_YANGMODELS"], [path to YANG data models]) AC_DEFINE_UNQUOTED([LIBYANG_PLUGINS_PATH], ["$CFG_LIBYANG_PLUGINS"], [path to libyang plugins]) +AC_DEFINE_UNQUOTED([WATCHFRR_SH_PATH], ["${CFG_SBIN%/}/watchfrr.sh"], [path to watchfrr.sh]) dnl ------------------------------------ dnl Enable RPKI and add librtr to libs @@ -2196,9 +2197,9 @@ AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile]) AC_CONFIG_FILES([ config.version + changelog-auto redhat/frr.spec solaris/Makefile - debianpkg/changelog alpine/APKBUILD snapcraft/snapcraft.yaml lib/version.h diff --git a/debianpkg/README.Debian b/debian/README.Debian index cd7be5e801..47a353310d 100644 --- a/debianpkg/README.Debian +++ b/debian/README.Debian @@ -22,6 +22,36 @@ which itself is a fork of Zebra. Zebra was developed by Kunihiro Ishiguro. +* Build Profiles used in the upstream debian/ +============================================= + +The following Build Profiles have been added: + +- pkg.frr.nortrlib (pkg.frr.rtrlib) + controls whether the RPKI module is built. + Will be enabled by default at some point, adds some extra dependencies. + +- pkg.frr.nosnmp (pkg.frr.snmp) + controls whether the SNMP module is built, see below for license issues. + Will remain default-off as long as the license issue persists. + +- pkg.frr.nosystemd + Disables both systemd unit file installation as well as watchfrr sd_notify + support at startup. Removes libsystemd dependency. + +Note that all options have a "no" form; if you want to have your decision +be sticky regardless of changes to what it defaults to, then always use one +of the two. For example, all occurrences of <pkg.frr.rtrlib> will at some +point be replaced with <!pkg.frr.nortrlib>. + +The main frr package has the exact same contents regardless of rtrlib or snmp +choices. The options only control frr-snmp and frr-rpki-rtrlib packages. + +The main frr package does NOT have the same contents if pkg.frr.nosystemd is +used. This option should only be used for systems that do not have systemd, +e.g. Ubuntu 14.04. + + * Why has SNMP support been disabled? ===================================== FRR used to link against the NetSNMP libraries to provide SNMP @@ -43,12 +73,20 @@ during the last days before the Sarge release :-( It is allowed by the used licence mix that you fetch the sources and build FRR yourself with SNMP with - <remove the "grep ^smux" block at the end of debian/frr.preinst> - # export WANT_SNMP=1 - # apt-get -b source frr + # apt-get -b source -Ppkg.frr.snmp frr Just distributing it in binary form, linked against OpenSSL, is forbidden. +* Debian Policy compliance notes +================================ + +- 4.15 Reproducibility + FRR build is reproducible as outlined in version 4.2.1 of the Policy, but + won't be reproducible when the build directory is varied. This is because + configure parameters are burned into the executables which includes CFLAGS + like -fdebug-prefix-map=/build/directory/... + + * Daemon selection: =================== diff --git a/debianpkg/README.Maintainer b/debian/README.Maintainer index 84b68e1949..9030022c5e 100644 --- a/debianpkg/README.Maintainer +++ b/debian/README.Maintainer @@ -1,4 +1,14 @@ # +# TODO +# + +- check that tests/{control,daemons} actually do something useful and sensible +- /usr/share/doc/frr-doc should be named just frr? +- debian/watch pgpsigurlmangle / signing-key +- multiarch for DSOs? +- frr try-restart + +# # To check if the patches still apply on new upstream versions: # for i in debian/patches/*.diff; do echo -e "#\n# $i\n#"; patch --fuzz=3 --dry-run -p1 < $i; done diff --git a/debian/changelog b/debian/changelog new file mode 120000 index 0000000000..021c52c2f3 --- /dev/null +++ b/debian/changelog @@ -0,0 +1 @@ +../changelog-auto
\ No newline at end of file diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000000..ec635144f6 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000..ab2df20432 --- /dev/null +++ b/debian/control @@ -0,0 +1,131 @@ +Source: frr +Section: net +Priority: optional +Maintainer: David Lamparter <equinox-debian@diac24.net> +Uploaders: FRRouting-dev <dev@lists.frrouting.org> +Build-Depends: + autotools-dev, + bison, + chrpath, + debhelper (>= 9), + debhelper (>= 9.20160709) <!pkg.frr.nosystemd> | dh-systemd <!pkg.frr.nosystemd>, + dh-autoreconf, + flex, + gawk, + install-info, + libc-ares-dev, + libcap-dev, + libjson-c-dev | libjson0-dev, + libpam0g-dev | libpam-dev, + libpcre3-dev, + libpython3-dev, + libreadline-dev, + librtr-dev <!pkg.frr.nortrlib>, + libsnmp-dev, + libssh-dev <!pkg.frr.nortrlib>, + libsystemd-dev <!pkg.frr.nosystemd>, + libyang-dev (>= 0.16.74), + pkg-config, + python3, + python3-dev, + python3-sphinx, + python3-pytest <!nocheck>, + texinfo (>= 4.7) +Standards-Version: 4.2.1 +Homepage: https://www.frrouting.org/ +Vcs-Browser: https://github.com/FRRouting/frr/ +Vcs-Git: https://github.com/FRRouting/frr.git + +Package: frr +Architecture: linux-any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + iproute2 | iproute, + logrotate (>= 3.2-11) +Pre-Depends: adduser +Recommends: frr-pythontools +Suggests: frr-doc +Conflicts: + zebra, + zebra-pj, + pimd, + quagga, + quagga-bgpd, + quagga-core, + quagga-isisd, + quagga-ospf6d, + quagga-ospfd, + quagga-pimd, + quagga-ripd, + quagga-ripngd +Replaces: zebra, zebra-pj +Description: FRRouting suite of internet protocols (BGP, OSPF, IS-IS, ...) + FRRouting implements the routing protocols commonly used in the + internet and private networks to exchange information between routers. + Both IP and IPv6 are supported, as are BGP, OSPF, IS-IS, BABEL, EIGRP, + RIP, LDP, BFD, PIM and NHRP protocols. + . + These protocols are used to turn your system into a dynamic router, + exchanging information about available connections with other routers + in a standards-compliant way. The actual packet forwarding + functionality is provided by the OS kernel. + . + FRRouting is a fork of Quagga with an open community model. The main + git lives on https://github.com/frrouting/frr.git and the project name + is commonly abbreviated as "FRR." + +Package: frr-snmp +Architecture: linux-any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + frr (= ${binary:Version}) +Recommends: snmpd +Description: FRRouting suite - SNMP support + Adds SNMP support to FRR's daemons by attaching to net-snmp's snmpd + through the AgentX protocol. Provides read-only access to current + routing state through standard SNMP MIBs. + +Package: frr-rpki-rtrlib +Architecture: linux-any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + frr (= ${binary:Version}) +Description: FRRouting suite - BGP RPKI support (rtrlib) + Adds RPKI support to FRR's bgpd, allowing validation of BGP routes + against cryptographic information stored in WHOIS databases. This is + used to prevent hijacking of networks on the wider internet. It is only + relevant to internet service providers using their own autonomous system + number. +Build-Profiles: <!pkg.frr.nortrlib> + +Package: frr-doc +Section: doc +Architecture: all +Depends: + ${misc:Depends}, + libjs-jquery, + libjs-underscore +Suggests: frr +Conflicts: quagga-doc +Description: FRRouting suite - user manual + This provides the FRR user manual in HTML form. This is the official + manual maintained as part of the package and is also available online + at https://frrouting.readthedocs.io/ + +Package: frr-pythontools +Architecture: all +Depends: + ${misc:Depends}, + frr (<< ${source:Upstream-Version}.0-~), + frr (>= ${source:Version}~), + python3:any +Description: FRRouting suite - Python tools + The FRRouting suite uses a small Python tool to provide configuration + reload functionality, particularly useful when the interactive configuration + shell is not used. + . + Without this package installed, "reload" (as a systemd or init script + invocation) will not work for the FRR daemons. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000000..61d87260d8 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,484 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: FRR +Upstream-Contact: maintainers@frrouting.org, security@frrouting.org +Source: https://www.frrouting.org/ + +Files: * +Copyright: 1996-2003 by the original Zebra authors: + Kunihiro Ishiguro <kunihiro@zebra.org> + Toshiaki Takada <takada@zebra.org> + Yasuhiro Ohara <yasu@sfc.wide.ad.jp> + 2003-2016 by the Quagga Project + 2016-2018 by the FRRouting Project + Adam Fitzgerald 2017 + Alex Couloumbis 2017 + Alexandre Chappuis 2011 + Alexis Fasquel 2015 + Ali Rezaee 2018 + Ameya Dharkar 2018 + Amritha Nambiar 2015 + Andreas Jaggi 2017 + Andrew Certain 2012 + Andrew J. Schorr 2004-2011 + Andrew Lunn 2017 + Andrey Korolyov 2017-2018 + Ang Way Chuang 2012 + Anuradha Karuppiah 2016-2018 + Arthur Jones 2018 + Avneesh Sachdev 2012, 2016 + Ayan Banerjee 2012 + Balaji G. 2011-2016 + Barry Friedman 2011 + Bartek Kania 2008 + Baruch Siach 2016 + Bingen Eguzkitza 2016-2017 + Boian Bonev 2013 + Boris Yakubov 2013 + Brad Smith 2012 + Brett Ciphery 2013 + Brian Bennett 2015 + Brian Rak 2017 + Chirag Shah 2017-2018 + Chris Caputo 2009-2010 + Chris Hall 2010 + Chris Luke 2011 + Christian Franke 2012-2018 + Christian Hammers 2011 + Christoffer Hansen 2018 + Christoph Dwertmann 2018 + Colin Petrie 2016 + Daniel Kozlowski 2012 + Daniel Ng 2008 + Daniel Walton 2015-2018 + Daniil Baturin 2018 + Dario Wiesner 2018 + Dave Olson 2016-2017 + David BÉRARD 2010 + David Lamparter 2009-2018 + David Lebrun 2016 + David Ward 2009-2012 + David Young 2007 + Denil Vira 2015 + Denis Ovsienko 2007-2012 + Dinesh Dutt 2012-2013 + Dinesh G. Dutt 2013-2017 + Dmitrij Tejblum 2009-2011 + Dmitry Popov 2011 + Don Slice 2016-2018 + Donald Sharp 2015-2018 + Donatas Abraitis 2018 + Dongling Duan 2018 + Donnie Savage 2017 + Doug VanLeuven 2012 + Dylan Hall 2011 + Emanuele Di Pascale 2018 + Eric Pulvino 2017 + Everton Marques 2012-2014 + Evgeny Uskov 2016 + F. Aragon 2018 + Fatih USTA 2017 + Feng Lu 2014-2015 + Fernando Soto 2015 + Francesco Dolcini 2009 + Fredi Raspall 2016-2018 + Fritz Reichmann 2011 + G. Paul Ziemba 2016-2018 + Greg Troxel 2003-2007, 2010-2015 + Hasso Tepper 2003-2007, 2012-2013 + Hiroshi Yokoi 2015 + Hongguang Li 2016 + Hung-Weic Chiu 2017 + Igor Ryzhov 2016 + Ilya Shipitsin 2018 + Ingo Flaschberger 2011 + Ivan Moskalyov 2010 + JR Rivers 2012 + Jafar Al-Gharaibeh 2009, 2015-2018 + Jarad Olson 2018 + Jaroslav Fojtik 2011 + Jeremy Jackson 2008-2009 + Jingjing Duan 2008-2009 + Joachim Nilsson 2012-2013 + Joakim Tjernlund 2008-2014 + Job Snijders 2016 + John Berezovik 2016 + John Glotzer 2014 + John Kemp 2011 + Jon Andersson 2009-2011 + Jorge Boncompte 2012-2013, 2017 + Josh Bailey 2011-2012 + Juergen Kammer 2017 + Julien Courtat 2016 + Juliusz Chroboczek 2012 + Kaloyan Kovachev 2015-2017 + Ken Williams 2014 + Khiruthigai Balasubramanian 2016 + Krisztian Kovacs 2009 + Kunihiro Ishiguro 2018 + Leonard Tracy 2012 + Leonid Rosenboim 2012-2013 + Liu Xiaofeng 2016 + Lou Berger 2013, 2016-2018 + Lu Feng 2014-2015 + Lucian Cristian 2017 + Maitane Zotes 2014 + Manuel Schweizer 2017 + Marcel Röthke 2017-2018 + Mark Stapp 2018 + Martin Buck 2018 + Martin Winter 2015-2018 + Martín Beauchamp 2017 + Mathias Krause 2010 + Mathieu Goessens 2009 + Matthew Smith 2017 + Matthias Ferdinand 2011 + Matthieu Boutier 2012, 2016-2017 + Matti-Oskari Leppänen 2013 + Michael Lambert 2008-2010 + Michael Rossberg 2015 + Michael Zingg 2012 + Michal Sekletar 2014 + Mike Tancsa 2017 + Milan Kocian 2013-2014 + Mitesh Kanjariya 2017-2018 + Mladen Sablic 2017-2018 + Morgan Stewart 2015 + Nathan Van Gheem 2018 + Nick Hilliard 2009-2012 + Nico Golde 2010 + Nicolas Dichtel 2015 + Nigel Kukard 2017 + Nolan Leake 2012 + Oleg A. Arkhangelsky 2011 + Olivier Cochard-Labbé 2014 + Olivier Dugeon 2014-2018 + Ondrej Zajicek 2009 + Pascal Mathis 2018 + Paul Jakma 2002-2016 + Paul P Komkoff Jr 2008 + Pawel Wieczorkiewicz 2016 + Peter Pentchev 2011 + Peter Szilagyi 2011 + Phil Huang 2017 + Phil Laverdiere 2012 + Philippe Guibert 2016-2018 + Piotr Jurkiewicz 2018 + Pradosh Mohapatra 2013-2014 + Quentin Young 2016-2018 + Radhika Mahankali 2015-2017 + Rafael Zalamena 2017-2018 + Rakesh Garimella 2013 + Raymond P. Burkholder 2017 + Remi Gacogne 2013 + Renato Westphal 2012, 2016-2018 + Robert Bays 2010 + Roderick Schertler 2011 + Rodny Molina 2018 + Roman Hoog Antink 2010-2013 + Ruben Kerkhof 2018 + Russ White 2017-2018 + Ryan Hagelstrom 2017 + Sam Tannous 2016-2017 + Sarita Patra 2018 + Sebastian Lohff 2017 + Sergey Fionov 2018 + Sergey Y. Afonin 2011 + Serj Kalichev 2012 + Sid Khot 2016 + Silas McCroskey 2017-2018 + Stephane Litkowski 2017 + Stephen Hemminger 2008-2014 + Stephen Worley 2018 + Steve Hill 2009 + Stig Thormodsrud 2008 + Subbaiah Venkata 2012 + Svata Dedic 2011 + Sébastien Luttringer 2014 + Takashi Sogabe 2009 + Thijs Kinkhorst 2009 + Thomas Gelf 2018 + Thomas Petazzoni 2016 + Thomas Ries 2011 + Thorvald Natvig 2017 + Tigran Martirosyan 2018 + Timo Teräs 2008-2009, 2013-2017 + Timothy Redaelli 2017 + Tom Goff 2009-2011 + Tom Henderson 2009 + Tomasz Pala 2009 + Udaya Shankara KS 2016 + Ulrich Weber 2011-2013 + Vasilis Tsiligiannis 2009 + Vincent Bernat 2012, 2017-2018 + Vincent Jardin 2003-2007, 2014, 2017-2018 + Vipin Kumar 2014-2015 + Vishal Dhingra 2018 + Vishal Kumar 2012 + Vitaliy Senchyshyn 2013 + Vivek Venkatraman 2015-2018 + Vladimir L Ivanov 2010 + Vyacheslav Trushkin 2011-2012 + Vystoropskyi, Sergii 2015 + Wataru Tanitsu 2010 + Wenjian Ma 2015 + Will McLendon 2017 + YAMAMOTO Shigeru 2011 + Yasuhiro Ohara 2009 + Zefan Xu 2018 + dturlupov 2018 + heasley 2009-2011 + jaydom 2017 + jpmondet 2018 + kssoman 2018 + lihongguang 2018 + lyq140 2018 + pcarana 2018 + pogojotz 2017 + tigranmartirosyan 2017 + tmartiro 2017 + vize 2007 + 高鹏 2012 +License: GPL-2+ + +Files: lib/strl*.c +License: LGPL-2.1+ +Copyright: Copyright (C) 2016 Free Software Foundation, Inc. + +Files: lib/skiplist.* +License: BSD-0-clause +Copyright: Copyright 1990 William Pugh + +Files: lib/sha256.* +License: BSD-2-clause +Copyright: Copyright 2005,2007,2009 Colin Percival + +Files: lib/qobj.h lib/monotime.h lib/memory.* lib/hook.* lib/frratomic.h lib/ferr.* lib/compiler.h lib/module.* +License: ISC +Copyright: Copyright (c) 2015-18 David Lamparter, for NetDEF, Inc. + +Files: nhrpd/nhrp_protocol.h +License: MIT +Copyright: Copyright (c) 2007-2012 Timo Teräs <timo.teras@iki.fi> + +Files: babeld/* +License: MIT +Copyright: + Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek + Copyright 2007, 2008 by Grégoire Henry, Julien Cristau and Juliusz Chroboczek + +Files: babeld/babel_errors.* babeld/babel_memory.* +License: GPL-2+ +Copyright: Copyright (C) 2017-2018 Donald Sharp, Cumulus Networks, Inc. + +Files: ldpd/* +License: ISC +Copyright: + Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> + Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org> + Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org> + Copyright (c) 2004, 2005, 2012 Claudio Jeker <claudio@openbsd.org> + Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> + Copyright (c) 2012 Alexander Bluhm <bluhm@openbsd.org> + Copyright (c) 2013-2016 Renato Westphal <renato@openbsd.org> + Copyright (C) 2016 by Open Source Routing. + +Files: ldpd/ldp_debug.* ldpd/ldp_vty* ldpd/ldp_zebra.c +License: GPL-2+ +Copyright: + Copyright (C) 2016 by Open Source Routing. + +Files: doc/user/*.rst doc/figures/fig* +Copyright: Copyright (c) 1996-2018 Kunihiro Ishiguro, et al. +License: FRR-docs + Permission is granted to make and distribute verbatim copies of this + manual provided the copyright notice and this permission notice are + preserved on all copies. + . + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided that the + entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + . + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions, + except that this permission notice may be stated in a translation + approved by Kunihiro Ishiguro. + +Files: lib/freebsd-queue.h lib/openbsd-queue.h lib/md5.* +License: BSD-3-clause +Copyright: + Copyright (c) 1991, 1993 The Regents of the University of California. + Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + Copyright (C) 2004 6WIND <Vincent.Jardin@6WIND.com> + +Files: lib/openbsd-tree.* +License: BSD-2-clause +Copyright: + Copyright 2002 Niels Provos <provos@citi.umich.edu> + Copyright (c) 2016 David Gwynne <dlg@openbsd.org> + +Files: lib/imsg* +License: ISC +Copyright: + Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> + Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> + Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org> + +Files: isisd/dict.* +Copyright: Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net> +License: custom-BSD-like + All rights are reserved by the author, with the following exceptions: + Permission is granted to freely reproduce and distribute this software, + possibly in exchange for a fee, provided that this copyright notice appears + intact. Permission is also granted to adapt this software to produce + derivative works, as long as the modified versions carry this copyright + notice and additional notices stating that the work has been modified. + This source code may be translated into executable form and incorporated + into proprietary software; there is no requirement for such software to + contain a copyright notice related to this source. + +Files: qpb/qpb.proto fpm/fpm.proto +License: ISC +Copyright: Copyright (C) 2016 Sproute Networks, Inc. + +Files: doc/extra/frrlexer.py +License: ISC +Copyright: Copyright (c) 2017 Vincent Bernat <bernat@luffy.cx> + +Files: tests/helpers/python/frrsix.py +License: MIT +Copyright: Copyright (c) 2010-2017 Benjamin Peterson + +License: GPL-2+ + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + +License: LGPL-2.1+ + 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 + <http://www.gnu.org/licenses/>. + . + On Debian systems, the full text of the GNU Lesser General Public + License version 2.1 can be found in the file + `/usr/share/common-licenses/LGPL-2.1'. + +License: BSD-0-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: ISC + 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 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. + +License: MIT + 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: + . + 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. diff --git a/debian/frr-doc.doc-base b/debian/frr-doc.doc-base new file mode 100644 index 0000000000..ec7870d7aa --- /dev/null +++ b/debian/frr-doc.doc-base @@ -0,0 +1,23 @@ +Document: frr +Title: FRRouting user manual +Abstract: General user/operator description for the FRRouting suite of + routing protocol daemons. +Section: Network/Communication + +Format: HTML +Index: /usr/share/doc/frr/html/index.html +Files: /usr/share/doc/frr/html/* + +Format: info +Index: /usr/share/info/frr.info.gz +Files: + /usr/share/info/frr.info.gz + /usr/share/info/fig-normal-processing.png + /usr/share/info/fig-rs-processing.png + /usr/share/info/fig-vnc-commercial-route-reflector.png + /usr/share/info/fig-vnc-frr-route-reflector.png + /usr/share/info/fig-vnc-gw.png + /usr/share/info/fig-vnc-mesh.png + /usr/share/info/fig-vnc-redundant-route-reflectors.png + /usr/share/info/fig_topologies_full.png + /usr/share/info/fig_topologies_rs.png diff --git a/debianpkg/frr-doc.info b/debian/frr-doc.info index a83255a24f..a83255a24f 100644 --- a/debianpkg/frr-doc.info +++ b/debian/frr-doc.info diff --git a/debian/frr-doc.install b/debian/frr-doc.install new file mode 100644 index 0000000000..c48dc5a8db --- /dev/null +++ b/debian/frr-doc.install @@ -0,0 +1,10 @@ +# html docs include RST sources +usr/share/doc/frr/html + +# info + images referenced by it +usr/share/info/ +doc/user/_build/texinfo/*.png usr/share/info + +# other +README.md usr/share/doc/frr +doc/figures/*.png usr/share/doc/frr diff --git a/debian/frr-doc.lintian-overrides b/debian/frr-doc.lintian-overrides new file mode 100644 index 0000000000..d4ada822a5 --- /dev/null +++ b/debian/frr-doc.lintian-overrides @@ -0,0 +1,2 @@ +# personal name +spelling-error-in-copyright Ang And diff --git a/debian/frr-pythontools.install b/debian/frr-pythontools.install new file mode 100644 index 0000000000..28140382f6 --- /dev/null +++ b/debian/frr-pythontools.install @@ -0,0 +1 @@ +usr/lib/frr/frr-reload.py diff --git a/debian/frr-pythontools.lintian-overrides b/debian/frr-pythontools.lintian-overrides new file mode 100644 index 0000000000..d4ada822a5 --- /dev/null +++ b/debian/frr-pythontools.lintian-overrides @@ -0,0 +1,2 @@ +# personal name +spelling-error-in-copyright Ang And diff --git a/debian/frr-rpki-rtrlib.install b/debian/frr-rpki-rtrlib.install new file mode 100644 index 0000000000..0465c0d910 --- /dev/null +++ b/debian/frr-rpki-rtrlib.install @@ -0,0 +1 @@ +usr/lib/*/frr/modules/bgpd_rpki.so diff --git a/debian/frr-rpki-rtrlib.lintian-overrides b/debian/frr-rpki-rtrlib.lintian-overrides new file mode 100644 index 0000000000..3927731760 --- /dev/null +++ b/debian/frr-rpki-rtrlib.lintian-overrides @@ -0,0 +1,5 @@ +# module contains no function calls that can be hardened +frr-rpki-rtrlib binary: hardening-no-fortify-functions * + +# personal name +spelling-error-in-copyright Ang And diff --git a/debian/frr-snmp.install b/debian/frr-snmp.install new file mode 100644 index 0000000000..5517ca7eec --- /dev/null +++ b/debian/frr-snmp.install @@ -0,0 +1,2 @@ +usr/lib/*/frr/libfrrsnmp.* +usr/lib/*/frr/modules/*_snmp.so diff --git a/debian/frr-snmp.lintian-overrides b/debian/frr-snmp.lintian-overrides new file mode 100644 index 0000000000..d4ada822a5 --- /dev/null +++ b/debian/frr-snmp.lintian-overrides @@ -0,0 +1,2 @@ +# personal name +spelling-error-in-copyright Ang And diff --git a/debianpkg/frr.conf b/debian/frr.conf index dee3cd849a..dee3cd849a 100644 --- a/debianpkg/frr.conf +++ b/debian/frr.conf diff --git a/debianpkg/frr.dirs b/debian/frr.dirs index 4b05c8c907..4b05c8c907 100644 --- a/debianpkg/frr.dirs +++ b/debian/frr.dirs diff --git a/debianpkg/frr.docs b/debian/frr.docs index f72aae1967..34dbbd7bc7 100644 --- a/debianpkg/frr.docs +++ b/debian/frr.docs @@ -1,2 +1,2 @@ -tools +tools/zebra.el debian/README.Debian diff --git a/debian/frr.install b/debian/frr.install new file mode 100644 index 0000000000..ebb87a0b3e --- /dev/null +++ b/debian/frr.install @@ -0,0 +1,16 @@ +etc/ +usr/bin/vtysh +usr/bin/mtracebis +usr/lib/*/frr/libfrr.* +usr/lib/*/frr/libfrrospfapiclient.* +usr/lib/frr/*.sh +usr/lib/frr/*d +usr/lib/frr/watchfrr +usr/lib/frr/zebra +usr/lib/*/frr/modules/zebra_irdp.so +usr/lib/*/frr/modules/zebra_fpm.so +usr/share/doc/frr/examples +usr/share/man/ +usr/share/yang/ +tools/frr-reload usr/lib/frr/ +debian/frr.conf usr/lib/tmpfiles.d diff --git a/debian/frr.lintian-overrides b/debian/frr.lintian-overrides new file mode 100644 index 0000000000..a3e6fcdc25 --- /dev/null +++ b/debian/frr.lintian-overrides @@ -0,0 +1,10 @@ +# function names & co. +frr binary: spelling-error-in-binary usr/lib/*/frr/libfrr.so.0.0.0 writen written +frr binary: spelling-error-in-binary usr/lib/*/frr/libfrrospfapiclient.so.0.0.0 writen written +frr binary: spelling-error-in-binary usr/lib/frr/ospfd writen written +frr binary: spelling-error-in-binary usr/lib/frr/zebra writen written +frr binary: spelling-error-in-binary usr/lib/frr/pimd writen written +frr binary: spelling-error-in-binary usr/lib/frr/pimd iif if + +# personal name +spelling-error-in-copyright Ang And diff --git a/debianpkg/frr.logrotate b/debian/frr.logrotate index 1dc9122ac4..1dc9122ac4 100644 --- a/debianpkg/frr.logrotate +++ b/debian/frr.logrotate diff --git a/debianpkg/frr.manpages b/debian/frr.manpages index f5aa972304..f5aa972304 100644 --- a/debianpkg/frr.manpages +++ b/debian/frr.manpages diff --git a/debianpkg/frr.pam b/debian/frr.pam index 2b106d43bc..2b106d43bc 100644 --- a/debianpkg/frr.pam +++ b/debian/frr.pam diff --git a/debian/frr.postinst b/debian/frr.postinst new file mode 100644 index 0000000000..505ff8eaf8 --- /dev/null +++ b/debian/frr.postinst @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +# most of this file makes sense to execute regardless of whether this is any +# of normal "configure" or error-handling "abort-upgrade", "abort-remove" or +# "abort-deconfigure" + +addgroup --system frrvty +addgroup --system frr +adduser \ + --system \ + --ingroup frr \ + --home /nonexistent \ + --gecos "Frr routing suite" \ + --no-create-home \ + frr +usermod -a -G frrvty frr + +mkdir -p /var/log/frr +mkdir -p /etc/frr + + +# only change ownership of files when they were previously owned by root or +# quagga; this is to ensure we don't trample over some custom user setup. +# +# if we are on a freshly installed package (or we added new configfiles), +# the files should be owned by root by default so we should end up with "frr" +# owned configfiles. + +quaggauid=`id -u quagga 2>/dev/null || echo 0` +quaggagid=`id -g quagga 2>/dev/null || echo 0` + +find \ + /etc/frr \ + /var/log/frr \ + \( -uid 0 -o -uid $quaggauid \) -a \ + \( -gid 0 -o -gid $quaggauid \) | \ + while read filename; do + + # don't chown anything that has ACLs (but don't fail if we don't + # have getfacl) + if { getfacl -c "$filename" 2>/dev/null || true; } \ + | egrep -q -v '^((user|group|other)::|$)'; then + : + else + chown frr: "$filename" + chmod o-rwx "$filename" + fi +done + +# fix misconfigured vtysh.conf & frr.conf ownership caused by config save +# mishandling in earlier FRR (and Quagga) versions +find /etc/frr -maxdepth 1 \( -name vtysh.conf -o -name frr.conf \) \ + -group frrvty -exec chgrp frr {} \; + +# more Quagga -> FRR upgrade smoothing. Not technically needed, but let's +# at least do the straightforward pieces. + +check_old_config() { + oldcfg="$1" + [ -r "$oldcfg" ] || return 0 + [ -s "$oldcfg" ] || return 0 + grep -v '^[[:blank:]]*\(#\|$\)' "$oldcfg" > /dev/null || return 0 + + cat >&2 <<EOF +Note: deprecated $oldcfg is present. This file is still read by +the FRR service but its contents should be migrated to /etc/frr/daemons. +EOF +} + +rmsum() { + fname="$1" + test -f "$1" || return 0 + fhash="`sha1sum \"$fname\"`" + fhash="${fhash%% *}" + if test "$fhash" = "$2"; then + rm "$fname" + fi +} + +case "$1" in +configure) + check_old_config /etc/frr/daemons.conf + check_old_config /etc/default/frr + if test -f /etc/frr/.pkg.frr.nointegrated; then + # remove integrated config setup + # (if checksums match, the files match freshly installed + # defaults, but the user has split config in place) + rmsum /etc/frr/vtysh.conf 5e7e3a488c51751e1ff98f27c9ad6085e1ad9cbb + rmsum /etc/frr/frr.conf dac6f2af4fca9919ba40eb338885a5d1773195c8 + rm /etc/frr/.pkg.frr.nointegrated + fi + ;; +esac + +#DEBHELPER# diff --git a/debian/frr.postrm b/debian/frr.postrm new file mode 100644 index 0000000000..018f59e1c5 --- /dev/null +++ b/debian/frr.postrm @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +rm -f /etc/frr/.pkg.frr.nointegrated + +if [ "$1" = "purge" ]; then + rm -rf /run/frr || true + + # "purge" does not remove logfiles. therefore we shouldn't delete + # the "frr" user/group since that would leave files with "dangling" + # ownership. +fi + +#DEBHELPER# diff --git a/debian/frr.preinst b/debian/frr.preinst new file mode 100644 index 0000000000..0e10e39247 --- /dev/null +++ b/debian/frr.preinst @@ -0,0 +1,93 @@ +#!/bin/bash +set -e +# bash is required since /etc/frr/daemons.conf used a bash array in some +# previous versions. + +# NOTE: this code exists specifically to make migrations from Quagga to +# FRR easier. FRR is able to load most Quagga configurations, but the +# config handling itself has changed with the move towards the "integrated" +# /etc/frr/frr.conf approach instead of separate per-daemon config files. +# +# That said, with this in place there's a good chance users can use a +# preexisting Quagga config with little hassle. + +case "$1" in +install|upgrade) + ( + test -f /etc/frr/daemons && . /etc/frr/daemons + test -f /etc/frr/daemons.conf && . /etc/frr/daemons.conf + test -f /etc/default/frr && . /etc/default/frr + + if [ "$watchfrr_enable" = no -o \ + "$watchfrr_enable" = "0" ]; then + cat >&2 <<EOF +ERROR: Pre-existing frr configuration file disables watchfrr. + +This configuration is deprecated upstream and not supported by the Debian +FRR package. Refusing to $1 in order to not break running setups. +Please change your setup to use watchfrr and remove the "watchfrr_enable" +option from /etc/frr/daemons, /etc/frr/daemons.conf and/or /etc/default/frr. +EOF + exit 1 + fi + ) + vtysh='' + if test -f /etc/frr/vtysh.conf; then + if grep -q '^[[:space:]]*service[[:space:]]\+integrated-vtysh-config' /etc/frr/vtysh.conf; then + # existing vtysh.conf with integrated statement + # - do nothing (=> integrated config) + vtysh='i' + elif grep -q '^[[:space:]]*no[[:space:]]\+service[[:space:]]\+integrated-vtysh-config' /etc/frr/vtysh.conf; then + # explicit non-integrated + # => need to fix vtysh.conf & frr.conf in postinst + vtysh='ni' + if test -f /etc/frr/frr.conf; then + cat >&2 <<EOF +ERROR: Pre-existing /etc/frr/vtysh.conf specifies +"no service integrated-vtysh-config", but /etc/frr/frr.conf exists. This +will cause the frr package to malfunction. Please remove /etc/frr/frr.conf +or remove the "no service integrated-vtysh-config" statement from +/etc/frr/vtysh.conf. +EOF + exit 1 + fi + else + # vtysh.conf exists but has no statement + : + fi + fi + if test -f /etc/frr/frr.conf; then + # vtysh.conf has no explicit statement but frr.conf exists + # => integrated config used + vtysh='i' + elif test -f /etc/frr/zebra.conf \ + -o -f /etc/frr/bgpd.conf \ + -o -f /etc/frr/ospfd.conf \ + -o -f /etc/frr/ospf6d.conf \ + -o -f /etc/frr/ripd.conf \ + -o -f /etc/frr/ripngd.conf \ + -o -f /etc/frr/isisd.conf \ + -o -f /etc/frr/pimd.conf \ + -o -f /etc/frr/ldpd.conf \ + -o -f /etc/frr/nhrpd.conf \ + -o -f /etc/frr/eigrpd.conf \ + -o -f /etc/frr/babeld.conf \ + -o -f /etc/frr/pbrd.conf \ + -o -f /etc/frr/bfdd.conf; then + # no explicit statement, but some split config file exists + # => need to fix vtysh.conf & frr.conf in postinst + test -n "$vtysh" || vtysh='ni' + else + # no config at all - use integrated + : + fi + if test "$vtysh" = "ni"; then + touch /etc/frr/.pkg.frr.nointegrated + fi + ;; +abort-upgrade) + # shouldn't fail an upgrade abort + ;; +esac + +#DEBHELPER# diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 0000000000..1a89f35853 --- /dev/null +++ b/debian/not-installed @@ -0,0 +1,3 @@ +usr/include +usr/lib/frr/ospfclient +usr/lib/frr/rfptest diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000..a546f38d70 --- /dev/null +++ b/debian/rules @@ -0,0 +1,120 @@ +#!/usr/bin/make -f + +# standard Debian options & profiles + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS))) + MAKE_SILENT="V=0" + export DH_VERBOSE=0 +else + MAKE_SILENT="V=1" + export DH_VERBOSE=1 + export DH_OPTIONS=-v +endif + +# package-specific build profiles + +ifeq ($(filter pkg.frr.nortrlib,$(DEB_BUILD_PROFILES)),) + CONF_RPKI=--enable-rpki +else + CONF_RPKI=--disable-rpki +endif + +ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),) + DH_WITH_SYSTEMD=systemd, + CONF_SYSTEMD=--enable-systemd=yes +else + DH_WITH_SYSTEMD= + CONF_SYSTEMD=--enable-systemd=no +endif + +export PYTHON=python3 + +%: + dh $@ --with=$(DH_WITH_SYSTEMD)autoreconf --parallel + +override_dh_auto_configure: + $(shell dpkg-buildflags --export=sh); \ + dh_auto_configure -- \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --with-vtysh-pager=/usr/bin/pager \ + --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr \ + --with-moduledir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr/modules \ + LIBTOOLFLAGS="-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/frr" \ + --disable-dependency-tracking \ + \ + $(CONF_SYSTEMD) \ + $(CONF_RPKI) \ + --with-libpam \ + --enable-doc \ + --enable-doc-html \ + --enable-snmp \ + --enable-fpm \ + --disable-protobuf \ + --disable-zeromq \ + --enable-ospfapi \ + --enable-bgp-vnc \ + --enable-multipath=256 \ + \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + # end + +override_dh_auto_install: + dh_auto_install + + sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr-reload.py + +# let dh_systemd_* and dh_installinit do their thing automatically +ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),) + cp tools/frr.service debian/frr.service +endif + cp tools/frrinit.sh debian/frr.init + -rm -f debian/tmp/usr/lib/frr/frr + +# install config files + mkdir -p debian/tmp/etc + cp -r tools/etc/* debian/tmp/etc/ + -rm debian/tmp/etc/frr/daemons.conf + + sed -e 's#^!log file #!log file /var/log/frr/#' -i debian/tmp/usr/share/doc/frr/examples/*sample* + +# drop dev-only files + find debian/tmp -name '*.la' -o -name '*.a' -o -name 'lib*.so' | xargs rm -f + rm -rf debian/tmp/usr/include + -rm debian/tmp/usr/lib/frr/ssd + +# use installed js libraries + -rm -f debian/tmp/usr/share/doc/frr/html/_static/jquery.js + ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/usr/share/doc/frr/html/_static/jquery.js + -rm -f debian/tmp/usr/share/doc/frr/html/_static/underscore.js + ln -s /usr/share/javascript/underscore/underscore.js debian/tmp/usr/share/doc/frr/html/_static/underscore.js + +override_dh_auto_build: + dh_auto_build -- $(MAKE_SILENT) + +override_dh_installinit: + dh_installinit -r + +override_dh_installsystemd: + dh_installsystemd -r + +override_dh_makeshlibs: + dh_makeshlibs -n + +override_dh_missing: + dh_missing --fail-missing + +override_dh_auto_clean: +# we generally do NOT want a full distclean since that wipes both +# debian/changelog and config.version + if test -f Makefile; then make redistclean; fi + -rm -f debian/frr.init + -rm -f debian/frr.service diff --git a/debianpkg/source/format b/debian/source/format index af745b310b..af745b310b 100644 --- a/debianpkg/source/format +++ b/debian/source/format diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000000..112182c779 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,2 @@ +# Debian Jessie and Ubuntu 16.04 need dh-systemd +frr source: ored-build-depends-on-obsolete-package diff --git a/debian/tests/bgpd-snmp-rpki b/debian/tests/bgpd-snmp-rpki new file mode 100755 index 0000000000..930b8c26dc --- /dev/null +++ b/debian/tests/bgpd-snmp-rpki @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# enable bgpd with SNMP & RPKI modules +cat >> /etc/frr/daemons <<EOF +bgpd=yes +bgpd_options="-A 127.0.0.1 -Msnmp -Mrpki" +EOF + +service frr restart + +# check that it actually started +pgrep watchfrr +pgrep zebra +pgrep bgpd + +# just for debugging +vtysh -c 'show modules' + +# ... and SNMP & RPKI should be loaded +vtysh -c 'show modules' | grep -q snmp +vtysh -c 'show modules' | grep -q rpki diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000000..5990a69370 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,11 @@ +Tests: zebra-lo +Depends: frr +Restrictions: needs-root, isolation-container + +Tests: bgpd-snmp-rpki +Depends: frr, frr-snmp, frr-rpki-rtrlib +Restrictions: needs-root, isolation-container + +Tests: py-frr-reload +Depends: frr, frr-pythontools +Restrictions: needs-root, isolation-container diff --git a/debian/tests/py-frr-reload b/debian/tests/py-frr-reload new file mode 100755 index 0000000000..e2c97e8744 --- /dev/null +++ b/debian/tests/py-frr-reload @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +# should have been started on install, but policy may have inhibited that +service frr restart + +# these should be running by default +pgrep watchfrr +pgrep zebra +pgrep staticd + +# configure interactively, save to file +vtysh -c 'configure terminal' -c 'ip route 198.51.100.0/28 127.0.0.1' +vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1' +vtysh -c 'write memory' + +grep -q 'ip route 198.51.100.0/28 127.0.0.1' /etc/frr/frr.conf + +# configure in file, check interactively +sed -e '/^ip route 198.51.100.0\/28 127.0.0.1/ c ip route 198.51.100.64/28 127.0.0.1' \ + -i /etc/frr/frr.conf + +service frr reload + +vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1' +if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1'; then + exit 1 +fi diff --git a/debian/tests/zebra-lo b/debian/tests/zebra-lo new file mode 100755 index 0000000000..2a388d5da7 --- /dev/null +++ b/debian/tests/zebra-lo @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# should have been started on install, but policy may have inhibited that +service frr status >/dev/null || service frr restart + +# these should be running by default +pgrep watchfrr +pgrep zebra +pgrep staticd + +# check vtysh works at all +vtysh -c 'show version' + +# check zebra is properly talking to the kernel +vtysh -c 'show interface lo' | grep -q LOOPBACK diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000000..c286392d7e --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=4 + +https://github.com/FRRouting/frr/releases/ \ + download/frr-(?:\d[\d.]*)/frr-(\d[\d.]*)\.tar\.xz debian uupdate diff --git a/debianpkg/watchfrr.rc b/debian/watchfrr.rc index 4110b86399..4110b86399 100644 --- a/debianpkg/watchfrr.rc +++ b/debian/watchfrr.rc diff --git a/debianpkg/.gitignore b/debianpkg/.gitignore deleted file mode 100644 index 6d10dce740..0000000000 --- a/debianpkg/.gitignore +++ /dev/null @@ -1 +0,0 @@ -changelog diff --git a/debianpkg/backports/.gitignore b/debianpkg/backports/.gitignore deleted file mode 100644 index 3b20d26891..0000000000 --- a/debianpkg/backports/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*/*.dirhash -*/debian/changelog diff --git a/debianpkg/backports/README b/debianpkg/backports/README deleted file mode 100644 index efd322e1d9..0000000000 --- a/debianpkg/backports/README +++ /dev/null @@ -1,28 +0,0 @@ -This directory contains the debian directories for backports to other debian -platforms. These are built via the `3.0 (custom)' source format, which -allows one to build a source package directly out of tarballs (e.g. an -orig.tar.gz tarball and a debian.tar.gz file), at which point the format can -be changed to a real format (e.g. `3.0 (quilt)'). - -Source packages are assembled via targets of the same name as the system to -which the backport is done (e.g. `precise'), included in debian/rules. - -To create a new debian backport: - -* Add its name to `KNOWN_BACKPORTS', defined in debian/rules. -* Create a directory of the same name in debian/backports. -* Add the files `exclude', `versionext', and `debian/source/format' under - this directory: - * `exclude' contains whitespace-separated paths (relative to the root of - the source dir) that should be excluded from the source package (e.g. - debian/patches). - * `versionext' contains the suffix added to the version number for this - backport's build. Distributions often have guidelines for what this - should be. If left empty, no new debian/changelog entry is created. - * `debian/source/format' should contain the source format of the resulting - source package. As of of the writing of this document the only supported - format is `3.0 (quilt)'. -* Add appropriate files under the `debian/' subdirectory. These will be - included in the source package, overriding any top-level `debian/' files - with equivalent paths. - diff --git a/debianpkg/backports/debian8/debian/source/format b/debianpkg/backports/debian8/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/debian8/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/debian8/exclude b/debianpkg/backports/debian8/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/debian8/exclude +++ /dev/null diff --git a/debianpkg/backports/debian8/versionext b/debianpkg/backports/debian8/versionext deleted file mode 100644 index 4824521f8c..0000000000 --- a/debianpkg/backports/debian8/versionext +++ /dev/null @@ -1 +0,0 @@ --1~debian8+1 diff --git a/debianpkg/backports/debian9/debian/source/format b/debianpkg/backports/debian9/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/debian9/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/debian9/exclude b/debianpkg/backports/debian9/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/debian9/exclude +++ /dev/null diff --git a/debianpkg/backports/debian9/versionext b/debianpkg/backports/debian9/versionext deleted file mode 100644 index db85932115..0000000000 --- a/debianpkg/backports/debian9/versionext +++ /dev/null @@ -1 +0,0 @@ --1~debian9+1 diff --git a/debianpkg/backports/rules b/debianpkg/backports/rules deleted file mode 100755 index d0c6dcc066..0000000000 --- a/debianpkg/backports/rules +++ /dev/null @@ -1,137 +0,0 @@ -.PHONY: backports $(KNOWN_BACKPORTS) - -# error out if these files are missing -required_files = $(foreach backport,$(KNOWN_BACKPORTS), \ - $(addprefix debian/backports/$(backport)/, \ - debian/source/format \ - versionext \ - exclude)) -$(if $(filter-out $(wildcard $(required_files)),$(required_files)), \ - $(error missing required backports files: \ - $(filter-out $(wildcard $(required_files)),$(required_files)). \ - see debian/backports/README) \ -) - -TARBALLDIR ?= $(shell dh_testdir debian/changelog && realpath .) - -define backports-targets -# if this file is empty, no automatic changelog entry is created -VERSIONEXT_$(1) ?= $(strip \ - $(shell cat $(wildcard debian/backports/$(1)/versionext))) -DEBIAN_VERSION_$(1) = $(DEBIAN_VERSION)$$(VERSIONEXT_$(1)) -BACKPORTDIR_$(1) = $(realpath debian/backports/$(1)) - -# as of right now, must be '3.0 (quilt)' -SOURCEFORMAT_$(1) ?= $(strip \ - $(shell cat debian/backports/$(1)/debian/source/format)) - -# files checked for the dirhash (see below) -FINDCMD_$(1) = find -L debian/backports/$(1)/debian \ - -type f \ - ! -path debian/backports/$(1)/debian/changelog - -# files *not* pulled from the root debian directory into the backport tarball: -# debian/changelog (copied and edited for backport version entry) -# debian/backports itself (relevant contents are copied out separately) -# anything provided in the current backports debian dir -# anything specified in the 'exclude' file in the current backports debian dir -EXCLUDEROOT_$(1) = debian/changelog debian/backports \ - $$(subst debian/backports/$(1)/,,$$(shell $$(FINDCMD_$(1)))) \ - $$(shell cat debian/backports/$(1)/exclude) - -EXCLUDEROOT_TAR_$(1) = $$(foreach file,$$(EXCLUDEROOT_$(1)),--exclude $$(file)) -EXCLUDEROOT_FIND_$(1) = $$(foreach file,$$(EXCLUDEROOT_$(1)),-o -path $$(file)) - -# find command resulting in all files that *will* be pulled into the backport -# tarball. -FINDCMDROOT_$(1) = find -L debian/ \ - '(' -false $$(EXCLUDEROOT_FIND_$(1)) ')' -prune -o \ - -type f -a '!' '(' -false $$(EXCLUDEROOT_FIND_$(1)) ')' - -# usually using `find' output for dependencies has the downfall of not tracking -# file removal. Work around that by introducing a dependency on a file whose -# name contains the hash of `find' output, so that the name will change when a -# file is deleted. -DIRHASH_$(1) = \ - $$(shell $$(FINDCMD_$(1)) | sha1sum | sed -r 's/^(......).*/\1/') -DIRHASHROOT_$(1) = \ - $$(shell $$(FINDCMDROOT_$(1)) | sha1sum | sed -r 's/^(......).*/\1/') - -CONTROL_$(1) = $$(strip \ - $$(if $$(wildcard $$(BACKPORTDIR_$(1))/debian/control), \ - $$(BACKPORTDIR_$(1))/debian/control, \ - $(realpath debian/control) \ - )) - -# TARGETS: - -$(1): $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc ; - -# we use 3.0 (custom) to build a source package directly from tarballs, -# bypassing the usual checks (which wouldn't like our combination-of- -# directories approach) -$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc: - dpkg-source -l$$(BACKPORTDIR_$(1))/debian/changelog \ - -c$$(CONTROL_$(1)) \ - --format='3.0 (custom)' \ - --target-format='$$(SOURCEFORMAT_$(1))' \ - -b . $$^ - mv $(TARBALLDIR)/../$$(notdir $$@) $$@ - -ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt)) -# this target depends on the orig.tar.gz file, for which there is no target in -# this makefile. It is assumed to either already exist or be built by a target -# provided elsewhere in debian/rules (e.g. via pristine-tar) -$$(if $$(findstring $(ORIG_VERSION),$$(DEBIAN_VERSION_$(1))), \ - $$(info downstream version matches upstream version (good)), \ - $$(error quilt format expects downstream version \ - ($$(DEBIAN_VERSION_$(1))) to contain upstream version \ - ($(ORIG_VERSION)). Make a new debian/changelog entry \ - to reflect the new upstream release) \ -) - -$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc: \ - $(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz \ - $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).debian.tar.xz -else -$$(error unsupported source format for $(1) backport: $$(SOURCEFORMAT_$(1))) -endif #SOURCEFORMAT_$(1) - -# for 3.0 (quilt) -$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).debian.tar.xz: \ - $$(BACKPORTDIR_$(1))/debian/changelog \ - $$(shell $$(FINDCMD_$(1))) \ - $$(BACKPORTDIR_$(1))/$$(DIRHASH_$(1)).backport.dirhash \ - $$(shell $$(FINDCMDROOT_$(1))) \ - $$(BACKPORTDIR_$(1))/$$(DIRHASHROOT_$(1)).root.dirhash \ - $$(BACKPORTDIR_$(1))/exclude - rm -f $$(subst .tar.xz,.tar,$$@) $$@ - tar -chf $$(subst .tar.xz,.tar,$$@) \ - --exclude-vcs $$(EXCLUDEROOT_TAR_$(1)) debian/ - cd debian/backports/$(1) && tar -uhf $$(subst .tar.xz,.tar,$$@) \ - --exclude-vcs debian/ - xz $$(subst .tar.xz,.tar,$$@) - -$$(BACKPORTDIR_$(1))/debian/changelog: \ - debian/changelog \ - debian/backports/$(1)/versionext - rm -f debian/backports/$(1)/debian/changelog - cp $$< $$@ - $(if $$(VERSIONEXT_$(1)), \ - dch -c $$@ -v '$$(DEBIAN_VERSION_$(1))' -b \ - 'backport to $(1) systems', \ - ) - -$$(BACKPORTDIR_$(1))/$$(DIRHASH_$(1)).backport.dirhash: - rm -f debian/backports/$(1)/*.backport.dirhash - touch $$@ - -$$(BACKPORTDIR_$(1))/$$(DIRHASHROOT_$(1)).root.dirhash: - rm -f debian/backports/$(1)/*.root.dirhash - touch $$@ - -endef # backports-targets -$(foreach backport,$(KNOWN_BACKPORTS),$(eval \ - $(call backports-targets,$(backport)))) - -backports: $(KNOWN_BACKPORTS) diff --git a/debianpkg/backports/ubuntu14.04/debian/control b/debianpkg/backports/ubuntu14.04/debian/control deleted file mode 100644 index 3f31f18462..0000000000 --- a/debianpkg/backports/ubuntu14.04/debian/control +++ /dev/null @@ -1,56 +0,0 @@ -Source: frr -Section: net -Priority: optional -Maintainer: Nobody <nobody@frrouting.org> -Uploaders: Nobody <nobody@frrouting.org> -XSBC-Original-Maintainer: <maintainers@frrouting.org> -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, pkg-config, python (>= 2.7), python-ipaddr -Standards-Version: 3.9.6 -Homepage: http://www.frrouting.org/ -XS-Testsuite: autopkgtest - -Package: frr -Architecture: any -Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), ${misc:Depends} -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: extra -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/ubuntu14.04/debian/frr.install b/debianpkg/backports/ubuntu14.04/debian/frr.install deleted file mode 100644 index 7fb81c44a0..0000000000 --- a/debianpkg/backports/ubuntu14.04/debian/frr.install +++ /dev/null @@ -1,11 +0,0 @@ -etc/frr/ -usr/bin/vtysh -usr/bin/mtracebis -usr/include/frr/ -usr/lib/ -usr/share/doc/frr/ -usr/share/snmp/mibs/ -usr/share/yang/ -tools/etc/* etc/ -tools/*.service lib/systemd/system -debian/frr.conf usr/lib/tmpfiles.d diff --git a/debianpkg/backports/ubuntu14.04/debian/rules b/debianpkg/backports/ubuntu14.04/debian/rules deleted file mode 100755 index 21b442d85a..0000000000 --- a/debianpkg/backports/ubuntu14.04/debian/rules +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/make -f - -# FRRouting Configuration options -###################################### -# -# WANT_xxxx --> Set to 1 for enable, 0 for disable -# The following are the defaults. They can be overridden by setting a -# env variable to a different value - -WANT_LDP ?= 1 -WANT_PIM ?= 1 -WANT_OSPFAPI ?= 1 -WANT_BGP_VNC ?= 1 -WANT_CUMULUS_MODE ?= 0 -WANT_MULTIPATH ?= 1 -WANT_SNMP ?= 0 -WANT_RPKI ?= 0 -WANT_BFD ?= 1 - -# NOTES: -# -# If you use WANT_RPKI, then there is a new dependency for librtr0 package -# and a build dependency of the librtr-dev package. -# While the librtr0 is added to the depenencies automatically, the build -# dependency can't be changed dynamically and building will fail if the -# librtr-dev isn't installed during package build -# Tested versions of both packages can be found at -# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact -# -# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here -# Please be aware that 0 is NOT disabled, but treated as unlimited - -MULTIPATH ?= 256 - -# Set the following to the value required (or leave alone for the default below) -# WANT_FRR_USER is used for the username and groupname of the FRR user account - -WANT_FRR_USER ?= frr -WANT_FRR_VTY_GROUP ?= frrvty - -# Don't build PDF docs by default -GENERATE_PDF ?= 0 - -# -#################################### - -export DH_VERBOSE=1 -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DH_OPTIONS=-v - -ifeq ($(WANT_SNMP), 1) - USE_SNMP=--enable-snmp - $(warning "DEBIAN: SNMP enabled, sorry for your inconvenience") -else - USE_SNMP=--disable-snmp - $(warning "DEBIAN: SNMP disabled, see README.Debian") -endif - -ifeq ($(WANT_LDP), 1) - USE_LDP=--enable-ldpd -else - USE_LDP=--disable-ldpd -endif - -ifeq ($(WANT_PIM), 1) - USE_PIM=--enable-pimd -else - USE_PIM=--disable-pimd -endif - -ifeq ($(WANT_OSPFAPI), 1) - USE_OSPFAPI=--enable-ospfapi=yes -else - USE_OSPFAPI=--enable-ospfapi=no -endif - -ifeq ($(WANT_BGP_VNC), 1) - USE_BGP_VNC=--enable-bgp-vnc=yes -else - USE_BGP_VNC=--enable-bgp-vnc=no -endif - -USE_FRR_USER=--enable-user=$(WANT_FRR_USER) -USE_FRR_GROUP=--enable-group=$(WANT_FRR_USER) -USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) - -ifeq ($(WANT_MULTIPATH), 1) - USE_MULTIPATH=--enable-multipath=$(MULTIPATH) -else - USE_MULTIPATH=--disable-multipath -endif - -ifeq ($(WANT_CUMULUS_MODE), 1) - USE_CUMULUS=--enable-cumulus=yes -else - USE_CUMULUS=--enable-cumulus=no -endif - -ifeq ($(WANT_RPKI), 1) - USE_RPKI=--enable-rpki -else - USE_RPKI=--disable-rpki -endif - -ifeq ($(WANT_BFD), 1) - USE_BFD=--enable-bfdd -else - USE_BFD=--disable-bfdd -endif - -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -endif - -ifdef DEBIAN_JOBS -MAKEFLAGS += -j$(DEBIAN_JOBS) -endif - -%: - dh $@ --with=autoreconf --parallel --dbg-package=frr-dbg --list-missing - -override_dh_gencontrol: -ifeq ($(WANT_RPKI), 1) - dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)" -else - dh_gencontrol -endif - -override_dh_auto_configure: - # Frr needs /proc to check some BSD vs Linux specific stuff. - # Else it fails with an obscure error message pointing out that - # IPCTL_FORWARDING is an undefined symbol which is not very helpful. - @if ! [ -d /proc/1 ]; then \ - echo "./configure needs a mounted /proc"; \ - exit 1; \ - fi - - if ! [ -e config.status ]; then \ - dh_auto_configure -- \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - $(USE_SNMP) \ - $(USE_OSPFAPI) \ - $(USE_MULTIPATH) \ - $(USE_LDP) \ - --enable-fpm \ - $(USE_FRR_USER) $(USE_FRR_GROUP) \ - $(USE_FRR_VTY_GROUP) \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --with-libpam \ - --enable-systemd=no \ - --enable-poll=yes \ - $(USE_CUMULUS) \ - $(USE_PIM) \ - --enable-dependency-tracking \ - $(USE_BGP_VNC) \ - $(USE_RPKI) \ - $(USE_BFD) \ - $(shell dpkg-buildflags --export=configure); \ - fi - -override_dh_auto_build: - #dh_auto_build - $(MAKE) - - # doc/ is a bit crazy -ifeq ($(GENERATE_PDF), 1) - dh_auto_build -- -C doc pdf -endif - rm -vf doc/_build/texinfo/frr.info - dh_auto_build -- -C doc info - -override_dh_auto_test: - -override_dh_auto_install: - dh_auto_install - - cp tools/frrinit.sh debian/frr.init - - # installed in frr-pythontools - rm debian/tmp/usr/lib/frr/frr-reload.py - - # cleaning up the info dir - rm -f debian/tmp/usr/share/info/dir* - - # install config files - mkdir -p debian/tmp/etc/frr/ - perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample* - - # leftover from previously shipping SMUX client OID MIB - mkdir -p debian/tmp/usr/share/snmp/mibs/ - - # cleaning .la files - sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la - sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la - sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/libyang_plugins/*.la - -override_dh_systemd_start: - dh_systemd_start frr.service - -override_dh_systemd_enable: - dh_systemd_enable frr.service - diff --git a/debianpkg/backports/ubuntu14.04/debian/source/format b/debianpkg/backports/ubuntu14.04/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/ubuntu14.04/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/ubuntu14.04/exclude b/debianpkg/backports/ubuntu14.04/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/ubuntu14.04/exclude +++ /dev/null diff --git a/debianpkg/backports/ubuntu14.04/versionext b/debianpkg/backports/ubuntu14.04/versionext deleted file mode 100644 index c5be0650af..0000000000 --- a/debianpkg/backports/ubuntu14.04/versionext +++ /dev/null @@ -1 +0,0 @@ --1~ubuntu14.04+1 diff --git a/debianpkg/backports/ubuntu16.04/debian/source/format b/debianpkg/backports/ubuntu16.04/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/ubuntu16.04/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/ubuntu16.04/exclude b/debianpkg/backports/ubuntu16.04/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/ubuntu16.04/exclude +++ /dev/null diff --git a/debianpkg/backports/ubuntu16.04/versionext b/debianpkg/backports/ubuntu16.04/versionext deleted file mode 100644 index dc33d97a12..0000000000 --- a/debianpkg/backports/ubuntu16.04/versionext +++ /dev/null @@ -1 +0,0 @@ --1~ubuntu16.04+1 diff --git a/debianpkg/backports/ubuntu17.10/debian/control b/debianpkg/backports/ubuntu17.10/debian/control deleted file mode 100644 index ce73f9d1b0..0000000000 --- a/debianpkg/backports/ubuntu17.10/debian/control +++ /dev/null @@ -1,54 +0,0 @@ -Source: frr -Section: net -Priority: optional -Maintainer: Nobody <nobody@frrouting.org> -Uploaders: Nobody <nobody@frrouting.org> -XSBC-Original-Maintainer: <maintainers@frrouting.org> -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-ipaddress, libpython-dev -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-ipaddress -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 deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/ubuntu17.10/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/ubuntu17.10/exclude b/debianpkg/backports/ubuntu17.10/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/ubuntu17.10/exclude +++ /dev/null diff --git a/debianpkg/backports/ubuntu17.10/versionext b/debianpkg/backports/ubuntu17.10/versionext deleted file mode 100644 index bfbeccd653..0000000000 --- a/debianpkg/backports/ubuntu17.10/versionext +++ /dev/null @@ -1 +0,0 @@ --1~ubuntu17.10+1 diff --git a/debianpkg/backports/ubuntu18.04/debian/control b/debianpkg/backports/ubuntu18.04/debian/control deleted file mode 100644 index 3fccb46b7a..0000000000 --- a/debianpkg/backports/ubuntu18.04/debian/control +++ /dev/null @@ -1,54 +0,0 @@ -Source: frr -Section: net -Priority: optional -Maintainer: Nobody <nobody@frrouting.org> -Uploaders: Nobody <nobody@frrouting.org> -XSBC-Original-Maintainer: <maintainers@frrouting.org> -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-ipaddress, python-sphinx, libpython-dev -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-ipaddress -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/ubuntu18.04/debian/source/format b/debianpkg/backports/ubuntu18.04/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/debianpkg/backports/ubuntu18.04/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debianpkg/backports/ubuntu18.04/exclude b/debianpkg/backports/ubuntu18.04/exclude deleted file mode 100644 index e69de29bb2..0000000000 --- a/debianpkg/backports/ubuntu18.04/exclude +++ /dev/null diff --git a/debianpkg/backports/ubuntu18.04/versionext b/debianpkg/backports/ubuntu18.04/versionext deleted file mode 100644 index 832fb4c32b..0000000000 --- a/debianpkg/backports/ubuntu18.04/versionext +++ /dev/null @@ -1 +0,0 @@ --1~ubuntu18.04+1 diff --git a/debianpkg/compat b/debianpkg/compat deleted file mode 100644 index 7f8f011eb7..0000000000 --- a/debianpkg/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/debianpkg/control b/debianpkg/control deleted file mode 100644 index ea977937bf..0000000000 --- a/debianpkg/control +++ /dev/null @@ -1,54 +0,0 @@ -Source: frr -Section: net -Priority: optional -Maintainer: Nobody <nobody@frrouting.org> -Uploaders: Nobody <nobody@frrouting.org> -XSBC-Original-Maintainer: <maintainers@frrouting.org> -Build-Depends: debhelper (>= 7.0.50~), libreadline-dev, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), 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) | python3, python-sphinx | python3-sphinx, libpython-dev | libpython3-dev, install-info -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: extra -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/copyright b/debianpkg/copyright deleted file mode 100644 index 7b873abd31..0000000000 --- a/debianpkg/copyright +++ /dev/null @@ -1,29 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: Frr -Upstream-Contact: maintainers@frrouting.org, security@frrouting.org -Source: http://www.frrouting.org/ - -Files: * -Copyright: 1996-2003 by the original Zebra authors: - Kunihiro Ishiguro <kunihiro@zebra.org> - Toshiaki Takada <takada@zebra.org> - Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - 2003-2012 by the Quagga Project, mostly Paul Jakma <paul@jakma.org> -License: GPL-2+ - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the full text of the GNU General Public - License version 2 can be found in the file - `/usr/share/common-licenses/GPL-2'. diff --git a/debianpkg/frr-dbg.lintian-overrides b/debianpkg/frr-dbg.lintian-overrides deleted file mode 100644 index 7880bba29a..0000000000 --- a/debianpkg/frr-dbg.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -frr-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libfrrfpm_pb.so.0.0.0 diff --git a/debianpkg/frr-doc.docs b/debianpkg/frr-doc.docs deleted file mode 100644 index 605353289c..0000000000 --- a/debianpkg/frr-doc.docs +++ /dev/null @@ -1,3 +0,0 @@ -README.md -doc/user/*.rst -doc/figures/*.png diff --git a/debianpkg/frr-doc.install b/debianpkg/frr-doc.install deleted file mode 100644 index 8854b2c547..0000000000 --- a/debianpkg/frr-doc.install +++ /dev/null @@ -1 +0,0 @@ -doc/user/_build/texinfo/*.png usr/share/info diff --git a/debianpkg/frr-doc.lintian-overrides b/debianpkg/frr-doc.lintian-overrides deleted file mode 100644 index 1fe64ffd53..0000000000 --- a/debianpkg/frr-doc.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -frr-doc: wrong-section-according-to-package-name frr-doc => doc diff --git a/debianpkg/frr-pythontools.install b/debianpkg/frr-pythontools.install deleted file mode 100644 index aee093cf69..0000000000 --- a/debianpkg/frr-pythontools.install +++ /dev/null @@ -1 +0,0 @@ -tools/frr-reload.py usr/lib/frr/ diff --git a/debianpkg/frr.install b/debianpkg/frr.install deleted file mode 100644 index a53c5d1385..0000000000 --- a/debianpkg/frr.install +++ /dev/null @@ -1,12 +0,0 @@ -etc/frr/ -usr/bin/vtysh -usr/bin/mtracebis -usr/include/frr/ -usr/lib/ -tools/frr usr/lib/frr -usr/share/doc/frr/ -usr/share/yang/ -tools/etc/* etc/ -tools/*.service lib/systemd/system -tools/frr-reload usr/lib/frr/ -debian/frr.conf usr/lib/tmpfiles.d diff --git a/debianpkg/frr.lintian-overrides b/debianpkg/frr.lintian-overrides deleted file mode 100644 index 2e9888ed4f..0000000000 --- a/debianpkg/frr.lintian-overrides +++ /dev/null @@ -1,6 +0,0 @@ -frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib/libfrrospfapiclient.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrfpm_pb.so.0.0.0 usr/lib/libfrrfpm_pb.so -frr: package-name-doesnt-match-sonames libfrr0 libfrrfpm-pb0 libfrrospfapiclient0 -frr: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/frr.service network-online.target -frr: shared-lib-without-dependency-information usr/lib/libfrrfpm_pb.so.0.0.0 diff --git a/debianpkg/frr.postinst b/debianpkg/frr.postinst deleted file mode 100644 index a8d6ab2805..0000000000 --- a/debianpkg/frr.postinst +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -e - -###################### -frruid=`getent passwd frr | awk -F ":" '{ print $3 }'` -frrgid=`getent group frr | awk -F ":" '{ print $3 }'` -frrvtygid=`getent group frrvty | awk -F ":" '{ print $3 }'` - -[ -n ${frruid} ] || (echo "No uid for frr" && /bin/false) -[ -n ${frrgid} ] || (echo "No gid for frr" && /bin/false) -[ -n ${frrVTYgid} ] || (echo "No gid for frrvty" && /bin/false) - -chown ${frruid}:${frrgid} /etc/frr -chown ${frruid}:${frrgid} /etc/frr/* -touch /etc/frr/vtysh.conf -chgrp ${frrvtygid} /etc/frr/vtysh* -chmod 644 /etc/frr/* - -ENVIRONMENTFILE=/etc/environment -if ! egrep --quiet '^VTYSH_PAGER=' ${ENVIRONMENTFILE}; then - echo "VTYSH_PAGER=/bin/cat" >> ${ENVIRONMENTFILE} -fi -################################################## - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} - -# This is most likely due to the answer "no" to the "really stop the server" -# question in the prerm script. -if [ "$1" = "abort-upgrade" ]; then - exit 0 -fi - -#DEBHELPER# - diff --git a/debianpkg/frr.postrm b/debianpkg/frr.postrm deleted file mode 100644 index 26576fd136..0000000000 --- a/debianpkg/frr.postrm +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} -# set -u not because of debhelper - -if [ "$1" = "purge" ]; then - rm -rf /etc/frr /var/run/frr /var/log/frr - userdel frr >/dev/null 2>&1 || true -fi - -#DEBHELPER# diff --git a/debianpkg/frr.preinst b/debianpkg/frr.preinst deleted file mode 100644 index 477e690d0a..0000000000 --- a/debianpkg/frr.preinst +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} -set -e -set -u - -# creating frrvty group if it isn't already there -if ! getent group frrvty >/dev/null; then - addgroup --system frrvty >/dev/null -fi - -# creating frr group if it isn't already there -if ! getent group frr >/dev/null; then - addgroup --system frr >/dev/null -fi - -# creating frr user if he isn't already there -if ! getent passwd frr >/dev/null; then - adduser \ - --system \ - --ingroup frr \ - --home /var/run/frr/ \ - --gecos "Frr routing suite" \ - --shell /bin/false \ - frr >/dev/null -fi - -# We may be installing over an older version of -# frr and as such we need to intelligently -# check to see if the frr user is in the frrvty -# group. -if ! id frr | grep &>/dev/null 'frrvty'; then - usermod -a -G frrvty frr >/dev/null -fi - -# Do not change permissions when upgrading as it would violate policy. -if [ "$1" = "install" ]; then - # Logfiles are group readable in case users were put into the frr group. - d=/var/log/frr/ - mkdir -p $d - chown frr:frr $d - chown --quiet frr:frr $d/* | true - chmod u=rwx,go=rx $d - find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,g=r,o= - - # Strict permissions for the sockets. - d=/var/run/frr/ - mkdir -p $d - chown frr:frr $d - chown --quiet frr:frr $d/* | true - chmod u=rwx,go=rx $d - find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,go= - - # Config files. Vtysh does not have access to the individual daemons config file - d=/etc/frr/ - mkdir -p $d - chown frr:frrvty $d - chmod ug=rwx,o=rx $d - find $d -type f -print0 | xargs -0 --no-run-if-empty chown frr:frr - find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,g=r,o= - - # Exceptions for vtysh. - f=$d/vtysh.conf - if [ -f $f ]; then - chown frr:frrvty $f - chmod u=rw,g=r,o= $f - fi - - # Exceptions for vtysh. - f=$d/frr.conf - if [ -f $d/Zebra.conf ]; then - mv $d/Zebra.conf $f - fi - if [ -f $f ]; then - chown frr:frrvty $f - chmod u=rw,g=r,o= $f - fi -fi - -#DEBHELPER# diff --git a/debianpkg/frr.prerm b/debianpkg/frr.prerm deleted file mode 100644 index 4b71202810..0000000000 --- a/debianpkg/frr.prerm +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -e - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} - -# prerm remove -# old-prerm upgrade new-version -# new-prerm failed-upgrade old-version -# conflictor's-prerm remove in-favour package new-version -# deconfigured's-prerm deconfigure in-favour package-being-installed version removing conflicting-package -case $1 in - remove|upgrade) - ;; - - failed-upgrade) - # If frr/really_stop was negated then this script exits with return - # code 1 and is called again with "failed-upgrade". Well, exit again. - exit 1 - ;; - -esac - -#DEBHELPER# diff --git a/debianpkg/rules b/debianpkg/rules deleted file mode 100755 index 12d6c3545c..0000000000 --- a/debianpkg/rules +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/make -f - -# FRRouting Configuration options -###################################### -# -# WANT_xxxx --> Set to 1 for enable, 0 for disable -# The following are the defaults. They can be overridden by setting a -# env variable to a different value - -# -Werror - don't enable this unless you're doing a dev package build -WANT_WERROR ?= 0 - -WANT_OSPFAPI ?= 1 -WANT_BGP_VNC ?= 1 -WANT_CUMULUS_MODE ?= 0 -WANT_MULTIPATH ?= 1 -WANT_SNMP ?= 0 -WANT_RPKI ?= 0 - -# NOTES: -# -# If you use WANT_RPKI, then there is a new dependency for librtr0 package -# and a build dependency of the librtr-dev package. -# While the librtr0 is added to the depenencies automatically, the build -# dependency can't be changed dynamically and building will fail if the -# librtr-dev isn't installed during package build -# Tested versions of both packages can be found at -# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact -# -# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here -# Please be aware that 0 is NOT disabled, but treated as unlimited - -MULTIPATH ?= 256 - -# Set the following to the value required (or leave alone for the default below) -# WANT_FRR_USER is used for the username and groupname of the FRR user account - -WANT_FRR_USER ?= frr -WANT_FRR_VTY_GROUP ?= frrvty - -# Don't build PDF docs by default -# add build deps: texlive-latex-base, texlive-generic-recommended -GENERATE_PDF ?= 0 - -# -#################################### - -export DH_VERBOSE=1 -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DH_OPTIONS=-v - -ifeq ($(WANT_SNMP), 1) - USE_SNMP=--enable-snmp - $(warning "DEBIAN: SNMP enabled, sorry for your inconvenience") -else - USE_SNMP=--disable-snmp - $(warning "DEBIAN: SNMP disabled, see README.Debian") -endif - -ifeq ($(WANT_OSPFAPI), 1) - USE_OSPFAPI=--enable-ospfapi=yes -else - USE_OSPFAPI=--enable-ospfapi=no -endif - -ifeq ($(WANT_BGP_VNC), 1) - USE_BGP_VNC=--enable-bgp-vnc=yes -else - USE_BGP_VNC=--enable-bgp-vnc=no -endif - -USE_FRR_USER=--enable-user=$(WANT_FRR_USER) -USE_FRR_GROUP=--enable-group=$(WANT_FRR_USER) -USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) - -ifeq ($(WANT_MULTIPATH), 1) - USE_MULTIPATH=--enable-multipath=$(MULTIPATH) -else - USE_MULTIPATH=--disable-multipath -endif - -ifeq ($(WANT_CUMULUS_MODE), 1) - USE_CUMULUS=--enable-cumulus=yes -else - USE_CUMULUS=--enable-cumulus=no -endif - -ifeq ($(WANT_RPKI), 1) - USE_RPKI=--enable-rpki -else - USE_RPKI=--disable-rpki -endif - -ifeq ($(WANT_WERROR), 1) - USE_WERROR=--enable-werror -else - USE_WERROR=--disable-werror -endif - -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -endif - -ifdef DEBIAN_JOBS -MAKEFLAGS += -j$(DEBIAN_JOBS) -endif - -%: - dh $@ --with=systemd,autoreconf --parallel --dbg-package=frr-dbg --list-missing - -override_dh_gencontrol: -ifeq ($(WANT_RPKI), 1) - dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)" -else - dh_gencontrol -endif - -override_dh_auto_configure: - if ! [ -e config.status ]; then \ - dh_auto_configure -- \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - $(USE_SNMP) \ - $(USE_OSPFAPI) \ - $(USE_MULTIPATH) \ - --enable-fpm \ - $(USE_FRR_USER) $(USE_FRR_GROUP) \ - $(USE_FRR_VTY_GROUP) \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - $(USE_WERROR) \ - --with-libpam \ - --enable-systemd=yes \ - $(USE_CUMULUS) \ - --disable-dependency-tracking \ - $(USE_BGP_VNC) \ - $(USE_RPKI) \ - $(shell dpkg-buildflags --export=configure); \ - fi - -override_dh_auto_build: - dh_auto_build - -override_dh_auto_test: - -override_dh_auto_install: - dh_auto_install - - # installed in frr-pythontools - rm debian/tmp/usr/lib/frr/frr-reload.py - - # cleaning up the info dir - rm -f debian/tmp/usr/share/info/dir* - - # install config files - mkdir -p debian/tmp/etc/frr/ - perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample* - - # we don't need .la files - rm debian/tmp/usr/lib/*.la - rm debian/tmp/usr/lib/frr/modules/*.la - rm debian/tmp/usr/lib/frr/libyang_plugins/*.la - -override_dh_systemd_start: - dh_systemd_start frr.service - -override_dh_systemd_enable: - dh_systemd_enable frr.service - -# backports -SRCPKG = frr -KNOWN_BACKPORTS = debian8 debian9 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04 -DEBIAN_VERSION := $(shell dh_testdir && \ - dpkg-parsechangelog -c1 < debian/changelog | \ - sed -rn 's/^Version: ?//p') -ORIG_VERSION := $(DEBIAN_VERSION) --include debian/backports/rules - -ifneq ($(TARBALLDIR),) -ifeq ($(wildcard frr-$(ORIG_VERSION).tar.gz),frr-$(ORIG_VERSION).tar.gz) - -$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz: \ - frr-$(ORIG_VERSION).tar.gz - cp $< $@ - -else # wildcard frr-$(ORIG_VERSION).tar.gz - -# better error message on missing .orig.tar.gz -$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz: - @ echo "\`$(TARBALLDIR)/$(SRCPKG)-$(ORIG_VERSION).tar.gz'" not \ - found and not generated by debian/rules. Provided you have the \ - necessary packages installed, you can generate it yourself via \ - "\"./bootstrap.sh && ./configure && make dist\"". - exit 1 - -endif # wildcard frr-$(ORIG_VERSION).tar.gz -endif # TARBALLDIR nonempty diff --git a/debianpkg/subdir.am b/debianpkg/subdir.am deleted file mode 100644 index af17e4642a..0000000000 --- a/debianpkg/subdir.am +++ /dev/null @@ -1,62 +0,0 @@ -# -# debianpkg -# - -EXTRA_DIST += \ - debianpkg/README.Debian \ - debianpkg/README.Maintainer \ - debianpkg/changelog \ - debianpkg/compat \ - debianpkg/control \ - debianpkg/copyright \ - debianpkg/rules \ - debianpkg/source/format \ - debianpkg/tests/control \ - debianpkg/tests/daemons \ - debianpkg/watchfrr.rc \ - \ - debianpkg/backports/README \ - debianpkg/backports/rules \ - debianpkg/backports/debian8/debian/source/format \ - debianpkg/backports/debian8/exclude \ - debianpkg/backports/debian8/versionext \ - debianpkg/backports/debian9/debian/source/format \ - debianpkg/backports/debian9/exclude \ - debianpkg/backports/debian9/versionext \ - debianpkg/backports/ubuntu14.04/debian/control \ - debianpkg/backports/ubuntu14.04/debian/frr.install \ - debianpkg/backports/ubuntu14.04/debian/rules \ - debianpkg/backports/ubuntu14.04/debian/source/format \ - debianpkg/backports/ubuntu14.04/exclude \ - debianpkg/backports/ubuntu14.04/versionext \ - debianpkg/backports/ubuntu16.04/debian/source/format \ - debianpkg/backports/ubuntu16.04/exclude \ - debianpkg/backports/ubuntu16.04/versionext \ - debianpkg/backports/ubuntu17.10/debian/control \ - debianpkg/backports/ubuntu17.10/debian/source/format \ - debianpkg/backports/ubuntu17.10/exclude \ - debianpkg/backports/ubuntu17.10/versionext \ - debianpkg/backports/ubuntu18.04/debian/control \ - debianpkg/backports/ubuntu18.04/debian/source/format \ - debianpkg/backports/ubuntu18.04/exclude \ - debianpkg/backports/ubuntu18.04/versionext \ - \ - debianpkg/frr-dbg.lintian-overrides \ - debianpkg/frr-doc.docs \ - debianpkg/frr-doc.info \ - debianpkg/frr-doc.install \ - debianpkg/frr-doc.lintian-overrides \ - debianpkg/frr-pythontools.install \ - debianpkg/frr.conf \ - debianpkg/frr.dirs \ - debianpkg/frr.docs \ - debianpkg/frr.install \ - debianpkg/frr.lintian-overrides \ - debianpkg/frr.logrotate \ - debianpkg/frr.manpages \ - debianpkg/frr.pam \ - debianpkg/frr.postinst \ - debianpkg/frr.postrm \ - debianpkg/frr.preinst \ - debianpkg/frr.prerm \ - # end diff --git a/debianpkg/tests/control b/debianpkg/tests/control deleted file mode 100644 index 53fd537e2e..0000000000 --- a/debianpkg/tests/control +++ /dev/null @@ -1,3 +0,0 @@ -Tests: daemons -Depends: frr -Restrictions: needs-root diff --git a/debianpkg/tests/daemons b/debianpkg/tests/daemons deleted file mode 100644 index 43966c8347..0000000000 --- a/debianpkg/tests/daemons +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -#--------------- -# Testing frr -#--------------- -set -e - -# modify config file to enable all daemons and copy config files -CONFIG_FILE=/etc/frr/daemons -DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd" "pimd" "fabricd") - -for daemon in "${DAEMONS[@]}" -do - sed -i -e "s/${daemon}=no/${daemon}=yes/g" $CONFIG_FILE - cp /usr/share/doc/frr/examples/${daemon}.conf.sample /etc/frr/${daemon}.conf -done - -# reload frr -/etc/init.d/frr restart > /dev/null 2>&1 - -# check daemons -for daemon in "${DAEMONS[@]}" -do - echo -n "check $daemon - " - if pidof -x $daemon > /dev/null; then - echo "${daemon} OK" - else - echo "ERROR: ${daemon} IS NOT RUNNING" - exit 1 - fi -done diff --git a/doc/developer/building-frr-for-ubuntu1204.rst b/doc/developer/building-frr-for-ubuntu1204.rst deleted file mode 100644 index 66f8d14f81..0000000000 --- a/doc/developer/building-frr-for-ubuntu1204.rst +++ /dev/null @@ -1,184 +0,0 @@ -Ubuntu 12.04LTS -=============================================== - -- MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) For an updated Ubuntu Kernel, see - http://kernel.ubuntu.com/~kernel-ppa/mainline/ - -Install required packages -------------------------- - -Add packages: - -:: - - apt-get install \ - git autoconf automake libtool make gawk libreadline-dev texinfo \ - dejagnu pkg-config libpam0g-dev libjson0-dev flex python-pip \ - libc-ares-dev python3-dev python3-sphinx install-info build-essential - -Install newer bison from 14.04 package source (Ubuntu 12.04 package -source is too old) - -:: - - mkdir builddir - cd builddir - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2 - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz - tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 - cd bison-3.0.2.dfsg/ - tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz - sudo apt-get build-dep bison - debuild -b -uc -us - cd .. - sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb - cd .. - rm -rf builddir - -Install newer version of autoconf and automake: - -:: - - wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz - tar xvf autoconf-2.69.tar.gz - cd autoconf-2.69 - ./configure --prefix=/usr - make - sudo make install - cd .. - - wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz - tar xvf automake-1.15.tar.gz - cd automake-1.15 - ./configure --prefix=/usr - make - sudo make install - cd .. - -Install pytest: - -:: - - pip install pytest - -.. include:: building-libyang.rst - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - sudo groupadd -r -g 92 frr - sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --home /var/run/frr/ \ - --gecos "FRR suite" --shell /sbin/nologin frr - sudo usermod -a -G frrvty frr - -Download Source, configure and compile it -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --prefix=/usr \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - sudo install -m 755 -o frr -g frr -d /var/log/frr - sudo install -m 775 -o frr -g frrvty -d /etc/frr - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IP & IPv6 forwarding -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # Uncomment the next line to enable packet forwarding for IPv4 - net.ipv4.ip_forward=1 - - # Uncomment the next line to enable packet forwarding for IPv6 - # Enabling this option disables Stateless Address Autoconfiguration - # based on Router Advertisements for this host - net.ipv6.conf.all.forwarding=1 - -**Reboot** or use ``sysctl -p`` to apply the same config to the running -system - -Install the init.d service -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - sudo install -m 755 tools/frr /etc/init.d/frr - sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons - sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - -Enable daemons -^^^^^^^^^^^^^^ - -| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for - those daemons you want to start by systemd. -| For example. - -:: - - zebra=yes - bgpd=yes - ospfd=yes - ospf6d=yes - ripd=yes - ripngd=yes - isisd=yes - -Start the init.d service -^^^^^^^^^^^^^^^^^^^^^^^^ - -- /etc/init.d/frr start -- use ``/etc/init.d/frr status`` to check its status. diff --git a/doc/developer/building.rst b/doc/developer/building.rst index 4c18445f9d..96559b0abe 100644 --- a/doc/developer/building.rst +++ b/doc/developer/building.rst @@ -21,7 +21,6 @@ Building FRR building-frr-for-omnios building-frr-for-openbsd6 building-frr-for-openwrt - building-frr-for-ubuntu1204 building-frr-for-ubuntu1404 building-frr-for-ubuntu1604 building-frr-for-ubuntu1804 diff --git a/doc/developer/maintainer-release-build.rst b/doc/developer/maintainer-release-build.rst index 85aaa5365a..7792173034 100644 --- a/doc/developer/maintainer-release-build.rst +++ b/doc/developer/maintainer-release-build.rst @@ -37,7 +37,7 @@ Release Build Procedure for FRR Maintainers 4. Update Changelog for Debian Packages: - Edit :file:`debianpkg/changelog.in`: + Edit :file:`debian/changelog-auto.in`: - Change last (top of list) entry from ``@VERSION@`` to previous fixed version number, i.e.:: diff --git a/doc/developer/packaging-debian.rst b/doc/developer/packaging-debian.rst index c812a38212..c660f98680 100644 --- a/doc/developer/packaging-debian.rst +++ b/doc/developer/packaging-debian.rst @@ -1,31 +1,16 @@ Packaging Debian ================ -(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, 18.04, Debian 8 and 9) +(Tested on Ubuntu 14.04, 16.04, 17.10, 18.04, Debian jessie, stretch and +buster.) -.. note:: - - If you try to build for a different distro, then it will most likely fail - because of the missing backport. See :ref:`deb-backports` about adding a new - backport. - -1. Install build dependencies for your platform as outlined in :ref:`building`. - -2. Install the following additional packages: - - - on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9: - - .. code-block:: shell - - apt-get install realpath equivs groff fakeroot debhelper devscripts - - - on Ubuntu 18.04: (realpath is now part of preinstalled by coreutils) +1. Install the Debian packaging tools: .. code-block:: shell - apt-get install equivs groff fakeroot debhelper devscripts + sudo apt install fakeroot debhelper devscripts -3. Checkout FRR under a **unprivileged** user account: +2. Checkout FRR under an **unprivileged** user account: .. code-block:: shell @@ -38,143 +23,145 @@ Packaging Debian git checkout <branch> -4. Run ``bootstrap.sh`` and make a dist tarball: +3. Install build dependencies using the `mk-build-deps` tool from the + `devscripts` package: .. code-block:: shell - ./bootstrap.sh - ./configure --with-pkg-extra-version=-MyDebPkgVersion - make dist - - .. note:: - - Configure parameters are not important for the Debian Package building - - except the `with-pkg-extra-version` if you want to give the Debian - package a specific name to mark your own unoffical build. - -5. Edit :file:`debianpkg/rules` and set the configuration as needed. - - Look for section ``dh_auto_configure`` to modify the configure options as - needed. Options might be different between the top-level ``rules``` and - :file:`backports/XXXX/debian/rules`. Please adjust as needed on all files. + sudo mk-build-deps --install debian/control -6. Create backports debian sources + Alternatively, you can manually install build dependencies for your + platform as outlined in :ref:`building`. - Rename the :file:`debianpkg` directory to :file:`debian` and create the - backports (Debian requires to not ship a :file:`debian` directory inside the - source directory to avoid build conflicts with the reserved ``debian`` - subdirectory name during the build): +4. Run ``tools/tarsource.sh -V``: .. code-block:: shell - mv debianpkg debian - make -f debian/rules backports + ./tools/tarsource.sh -V - This will create a :file:`frr_*.orig.tar.gz` with the source (same as the - dist tarball), as well as multiple :file:`frr_*.debian.tar.xz` and - :file:`frr_*.dsc` corresponding to each distribution for which a backport is - available. + This script sets up the ``debian/changelog-auto`` file with proper version + information. -7. Create a new directory to build the package and populate with package - source. - - .. code-block:: shell +5. (optional) Append a distribution identifier if needed (see below under + :ref:`multi-dist`.) - mkdir frrpkg - cd frrpkg - tar xf ~/frr/frr_*.orig.tar.gz - cd frr* - . /etc/os-release - tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz - -8. Build Debian package dependencies and install them as needed. +6. Build Debian Package: .. code-block:: shell - sudo mk-build-deps --install debian/control + dpkg-buildpackage $options -9. Build Debian Package + Where `$options` may contain any or all of the following items: - Building with standard options: + * build profiles specified with ``-P``, e.g. + ``-Ppkg.frr.nortrlib,pkg.frr.nosystemd``. + Multiple values are separated by commas and there must not be a space + after the ``-P``. - .. code-block:: shell + The following build profiles are currently available: - debuild -b -uc -us + +----------------+-------------------+-----------------------------------------+ + | Profile | Negation | Effect | + +================+===================+=========================================+ + | pkg.frr.rtrlib | pkg.frr.nortrlib | builds frr-rpki-rtrlib package (or not) | + +----------------+-------------------+-----------------------------------------+ + | n/a | pkg.frr.nosystemd | removes libsystemd dependency and | + | | | disables unit file installation | + +----------------+-------------------+-----------------------------------------+ - Or change some options (see `rules` file for available options): + .. note:: - .. code-block:: shell + The ``pkg.frr.nosystemd`` option is only intended to support Ubuntu + 14.04 (and should be enabled when building for that.) - debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us + * the ``-uc -us`` options to disable signing the packages with your GPG key - To build with RPKI: + (git builds of the `master` or `stable/X.X` branches won't be signed by + default since their target release is set to ``UNRELEASED``.) - - Download the librtr packages from - https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact +7. Done! - - install librtr-dev on the build server + If all worked correctly, then you should end up with the Debian packages in + the parent directory of where `debuild` ran. If distributed, please make sure + you distribute it together with the sources (``frr_*.orig.tar.xz``, + ``frr_*.debian.tar.xz`` and ``frr_*.dsc``) - Then build with: +.. note:: - .. code-block:: shell + A package created from `master` or `stable/X.X` is slightly different from + a package created from the `debian` branch. The changelog for the former + is autogenerated and sets the Debian revision to ``-0``, which causes an + intentional lintian warning. The `debian` branch on the other hand has + a manually maintained changelog that contains proper Debian release + versioning. - debuild --set-envvar=WANT_RPKI=1 -b -uc -us + Furthermore, official Debian packages are built in ``3.0 (quilt)`` format + with an "orig" tarball and a "debian" tarball. These tarballs are created + by the ``tarsource.sh`` tool on any branch. The git repository however + contains a ``3.0 (git)`` source format specifier to easily allow direct + git builds. - RPKI packages have an additonal dependency of ``librtr0`` which can be found - at the same URL. -10. Done! +.. _multi-dist: -If all worked correctly, then you should end up with the Debian packages under -:file:`frrpkg`. If distributed, please make sure you distribute it together -with the sources (``frr_*.orig.tar.gz``, ``frr_*.debian.tar.xz`` and -``frr_*.dsc``) +Multi-Distribution builds +========================= -The build procedure can also be executed automatically using the ``tools/build-debian-package.sh`` -script. For example: +You can optionally append a distribution identifier in case you want to +make multiple versions of the package available in the same repository. +Do the following after creating the changelog with `tarsource.sh`: .. code-block:: shell - EXTRA_VERSION="-myversion" WANT_SNMP=1 WANT_CUMULUS_MODE=1 tools/build-debian-package.sh - -.. _deb-backports: - -Debian Backports ----------------- + dch -l '~deb8u' 'build for Debian 8 (jessie)' + dch -l '~deb9u' 'build for Debian 9 (stretch)' + dch -l '~ubuntu14.04.' 'build for Ubuntu 14.04 (trusty)' + dch -l '~ubuntu16.04.' 'build for Ubuntu 16.04 (xenial)' + dch -l '~ubuntu18.04.' 'build for Ubuntu 18.04 (bionic)' + +Between building packages for specific distributions, the only difference +in the package itself lies in the automatically generated shared library +dependencies, e.g. libjson-c2 or libjson-c3. This means that the +architecture independent packages should **not** have a suffix appended. +Also, the current Debian testing/unstable releases should not have any suffix +appended. + +For example, at the end of 2018 (i.e. ``buster``/Debian 10 is the current +"testing" release), the following is a complete list of `.deb` files for +Debian 8, 9 and 10 packages for FRR 6.0.1-1 with RPKI support:: + + frr_6.0.1-1_amd64.deb + frr_6.0.1-1~deb8u1_amd64.deb + frr_6.0.1-1~deb9u1_amd64.deb + frr-dbg_6.0.1-1_amd64.deb + frr-dbg_6.0.1-1~deb8u1_amd64.deb + frr-dbg_6.0.1-1~deb9u1_amd64.deb + frr-rpki-rtrlib_6.0.1-1_amd64.deb + frr-rpki-rtrlib_6.0.1-1~deb8u1_amd64.deb + frr-rpki-rtrlib_6.0.1-1~deb9u1_amd64.deb + frr-doc_6.0.1-1_all.deb + frr-pythontools_6.0.1-1_all.deb + +Note that there are no extra versions of the `frr-doc` and `frr-pythontools` +packages (because they are for architecture ``all``, not ``amd64``), and the +version for Debian 10 does **not** have a ``~deb10u1`` suffix. + +.. warning:: + + Do not use the ``-`` character in the version suffix. The last ``-`` in + the version number is the separator between upstream version and Debian + version. ``6.0.1-1~foobar-2`` means upstream version ``6.0.1-1~foobar``, + Debian version ``2``. This is not what you want. + + The only allowed characters in the Debian version are ``0-9 A-Z a-z + . ~`` -The :file:`debianpkg/backports` directory contains the Debian directories for -backports to other Debian platforms. These are built via the ``3.0 (custom)`` -source format, which allows one to build a source package directly out of -tarballs (e.g. an orig.tar.gz tarball and a debian.tar.gz file), at which point -the format can be changed to a real format (e.g. ``3.0 (quilt)``). - -Source packages are assembled via targets of the same name as the system to -which the backport is done (e.g. ``precise``), included in :file:`debian/rules`. - -To create a new Debian backport: - -- Add its name to ``KNOWN_BACKPORTS``, defined in :file:`debian/rules`. -- Create a directory of the same name in :file:`debian/backports`. -- Add the files ``exclude``, ``versionext``, and ``debian/source/format`` under - this directory. - -For the last point, these files should contain the following: - -``exclude`` - Contains whitespace-separated paths (relative to the root of the source dir) - that should be excluded from the source package (e.g. - :file:`debian/patches`). - -``versionext`` - Contains the suffix added to the version number for this backport's build. - Distributions often have guidelines for what this should be. If left empty, - no new :file:`debian/changelog` entry is created. +.. note:: -``debian/source/format`` - Contains the source format of the resulting source package. As of of the - writing of this document the only supported format is ``3.0 (quilt)``. + The separating character for the suffix **must** be the tilde (``~``) + because the tilde is ordered in version-comparison before the empty + string. That means the order of the above packages is the following: -- Add appropriate files under the :file:`debian/` subdirectory. These will be - included in the source package, overriding any top-level :file:`debian/` - files with equivalent paths. + ``6.0.1-1`` newer than ``6.0.1-1~deb9u1`` newer than ``6.0.1-1~deb8u1`` + If you use another character (e.g. ``+``), the untagged version will be + regarded as the "oldest"! diff --git a/doc/developer/subdir.am b/doc/developer/subdir.am index 19910e7627..d769913674 100644 --- a/doc/developer/subdir.am +++ b/doc/developer/subdir.am @@ -19,7 +19,6 @@ dev_RSTFILES = \ doc/developer/building-frr-for-netbsd7.rst \ doc/developer/building-frr-for-omnios.rst \ doc/developer/building-frr-for-openbsd6.rst \ - doc/developer/building-frr-for-ubuntu1204.rst \ doc/developer/building-frr-for-ubuntu1404.rst \ doc/developer/building-frr-for-ubuntu1604.rst \ doc/developer/building-frr-for-ubuntu1804.rst \ @@ -38,6 +37,8 @@ dev_RSTFILES = \ doc/developer/ospf-api.rst \ doc/developer/ospf-sr.rst \ doc/developer/ospf.rst \ + doc/developer/packaging.rst \ + doc/developer/packaging-debian.rst \ doc/developer/testing.rst \ doc/developer/topotests-snippets.rst \ doc/developer/topotests.rst \ diff --git a/isisd/fabricd.c b/isisd/fabricd.c index e8b729c779..96af28f0a1 100644 --- a/isisd/fabricd.c +++ b/isisd/fabricd.c @@ -559,18 +559,18 @@ static void move_to_queue(struct isis_lsp *lsp, struct neighbor_entry *n, listnode_add(lsp->flooding_neighbors[type], neighbor_id); } -static void mark_neighbor_as_present(struct hash_backet *backet, void *arg) +static void mark_neighbor_as_present(struct hash_bucket *bucket, void *arg) { - struct neighbor_entry *n = backet->data; + struct neighbor_entry *n = bucket->data; n->present = true; } -static void handle_firsthops(struct hash_backet *backet, void *arg) +static void handle_firsthops(struct hash_bucket *bucket, void *arg) { struct isis_lsp *lsp = arg; struct fabricd *f = lsp->area->fabricd; - struct isis_vertex *vertex = backet->data; + struct isis_vertex *vertex = bucket->data; struct neighbor_entry *n; diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 1f28309105..18eb857ec9 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -352,10 +352,10 @@ static struct isis_vertex *isis_spf_add_root(struct isis_spftree *spftree, return vertex; } -static void vertex_add_parent_firsthop(struct hash_backet *backet, void *arg) +static void vertex_add_parent_firsthop(struct hash_bucket *bucket, void *arg) { struct isis_vertex *vertex = arg; - struct isis_vertex *hop = backet->data; + struct isis_vertex *hop = bucket->data; hash_get(vertex->firsthops, hop, hash_alloc_intern); } diff --git a/lib/distribute.c b/lib/distribute.c index 3a6b775bc8..7cc10a230d 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -409,7 +409,7 @@ int config_show_distribute(struct vty *vty, struct distribute_ctx *dist_ctxt) { unsigned int i; int has_print = 0; - struct hash_backet *mp; + struct hash_bucket *mp; struct distribute *dist; /* Output filter configuration. */ @@ -512,7 +512,7 @@ int config_write_distribute(struct vty *vty, unsigned int i; int j; int output, v6; - struct hash_backet *mp; + struct hash_bucket *mp; int write = 0; for (i = 0; i < dist_ctxt->disthash->size; i++) diff --git a/lib/hash.c b/lib/hash.c index 6c3c953e97..9f9fc31d37 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -46,7 +46,7 @@ struct hash *hash_create_size(unsigned int size, assert((size & (size - 1)) == 0); hash = XCALLOC(MTYPE_HASH, sizeof(struct hash)); hash->index = - XCALLOC(MTYPE_HASH_INDEX, sizeof(struct hash_backet *) * size); + XCALLOC(MTYPE_HASH_INDEX, sizeof(struct hash_bucket *) * size); hash->size = size; hash->hash_key = hash_key; hash->hash_cmp = hash_cmp; @@ -86,7 +86,7 @@ void *hash_alloc_intern(void *arg) static void hash_expand(struct hash *hash) { unsigned int i, new_size; - struct hash_backet *hb, *hbnext, **new_index; + struct hash_bucket *hb, *hbnext, **new_index; new_size = hash->size * 2; @@ -94,7 +94,7 @@ static void hash_expand(struct hash *hash) return; new_index = XCALLOC(MTYPE_HASH_INDEX, - sizeof(struct hash_backet *) * new_size); + sizeof(struct hash_bucket *) * new_size); if (new_index == NULL) return; @@ -133,7 +133,7 @@ void *hash_get(struct hash *hash, void *data, void *(*alloc_func)(void *)) unsigned int key; unsigned int index; void *newdata; - struct hash_backet *backet; + struct hash_bucket *bucket; if (!alloc_func && !hash->count) return NULL; @@ -141,10 +141,10 @@ void *hash_get(struct hash *hash, void *data, void *(*alloc_func)(void *)) key = (*hash->hash_key)(data); index = key & (hash->size - 1); - for (backet = hash->index[index]; backet != NULL; - backet = backet->next) { - if (backet->key == key && (*hash->hash_cmp)(backet->data, data)) - return backet->data; + for (bucket = hash->index[index]; bucket != NULL; + bucket = bucket->next) { + if (bucket->key == key && (*hash->hash_cmp)(bucket->data, data)) + return bucket->data; } if (alloc_func) { @@ -157,26 +157,26 @@ void *hash_get(struct hash *hash, void *data, void *(*alloc_func)(void *)) index = key & (hash->size - 1); } - backet = XCALLOC(MTYPE_HASH_BACKET, sizeof(struct hash_backet)); - backet->data = newdata; - backet->key = key; - backet->next = hash->index[index]; - hash->index[index] = backet; + bucket = XCALLOC(MTYPE_HASH_BACKET, sizeof(struct hash_bucket)); + bucket->data = newdata; + bucket->key = key; + bucket->next = hash->index[index]; + hash->index[index] = bucket; hash->count++; - int oldlen = backet->next ? backet->next->len : 0; + int oldlen = bucket->next ? bucket->next->len : 0; int newlen = oldlen + 1; if (newlen == 1) hash->stats.empty--; else - backet->next->len = 0; + bucket->next->len = 0; - backet->len = newlen; + bucket->len = newlen; hash_update_ssq(hash, oldlen, newlen); - return backet->data; + return bucket->data; } return NULL; } @@ -201,22 +201,22 @@ void *hash_release(struct hash *hash, void *data) void *ret; unsigned int key; unsigned int index; - struct hash_backet *backet; - struct hash_backet *pp; + struct hash_bucket *bucket; + struct hash_bucket *pp; key = (*hash->hash_key)(data); index = key & (hash->size - 1); - for (backet = pp = hash->index[index]; backet; backet = backet->next) { - if (backet->key == key - && (*hash->hash_cmp)(backet->data, data)) { + for (bucket = pp = hash->index[index]; bucket; bucket = bucket->next) { + if (bucket->key == key + && (*hash->hash_cmp)(bucket->data, data)) { int oldlen = hash->index[index]->len; int newlen = oldlen - 1; - if (backet == pp) - hash->index[index] = backet->next; + if (bucket == pp) + hash->index[index] = bucket->next; else - pp->next = backet->next; + pp->next = bucket->next; if (hash->index[index]) hash->index[index]->len = newlen; @@ -225,26 +225,26 @@ void *hash_release(struct hash *hash, void *data) hash_update_ssq(hash, oldlen, newlen); - ret = backet->data; - XFREE(MTYPE_HASH_BACKET, backet); + ret = bucket->data; + XFREE(MTYPE_HASH_BACKET, bucket); hash->count--; return ret; } - pp = backet; + pp = bucket; } return NULL; } -void hash_iterate(struct hash *hash, void (*func)(struct hash_backet *, void *), +void hash_iterate(struct hash *hash, void (*func)(struct hash_bucket *, void *), void *arg) { unsigned int i; - struct hash_backet *hb; - struct hash_backet *hbnext; + struct hash_bucket *hb; + struct hash_bucket *hbnext; for (i = 0; i < hash->size; i++) for (hb = hash->index[i]; hb; hb = hbnext) { - /* get pointer to next hash backet here, in case (*func) + /* get pointer to next hash bucket here, in case (*func) * decides to delete hb by calling hash_release */ hbnext = hb->next; @@ -252,17 +252,17 @@ void hash_iterate(struct hash *hash, void (*func)(struct hash_backet *, void *), } } -void hash_walk(struct hash *hash, int (*func)(struct hash_backet *, void *), +void hash_walk(struct hash *hash, int (*func)(struct hash_bucket *, void *), void *arg) { unsigned int i; - struct hash_backet *hb; - struct hash_backet *hbnext; + struct hash_bucket *hb; + struct hash_bucket *hbnext; int ret = HASHWALK_CONTINUE; for (i = 0; i < hash->size; i++) { for (hb = hash->index[i]; hb; hb = hbnext) { - /* get pointer to next hash backet here, in case (*func) + /* get pointer to next hash bucket here, in case (*func) * decides to delete hb by calling hash_release */ hbnext = hb->next; @@ -276,8 +276,8 @@ void hash_walk(struct hash *hash, int (*func)(struct hash_backet *, void *), void hash_clean(struct hash *hash, void (*free_func)(void *)) { unsigned int i; - struct hash_backet *hb; - struct hash_backet *next; + struct hash_bucket *hb; + struct hash_bucket *next; for (i = 0; i < hash->size; i++) { for (hb = hash->index[i]; hb; hb = next) { @@ -296,7 +296,7 @@ void hash_clean(struct hash *hash, void (*free_func)(void *)) hash->stats.empty = hash->size; } -static void hash_to_list_iter(struct hash_backet *hb, void *arg) +static void hash_to_list_iter(struct hash_bucket *hb, void *arg) { struct list *list = arg; diff --git a/lib/hash.h b/lib/hash.h index 8c695d2381..60c412b8e0 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -39,15 +39,20 @@ DECLARE_MTYPE(HASH_BACKET) #define HASHWALK_CONTINUE 0 #define HASHWALK_ABORT -1 -struct hash_backet { +#if CONFDATE > 20200225 +CPP_NOTICE("hash.h: time to remove hash_backet #define") +#endif +#define hash_backet hash_bucket + +struct hash_bucket { /* - * if this backet is the head of the linked listed, len denotes the + * if this bucket is the head of the linked listed, len denotes the * number of elements in the list */ int len; /* Linked list. */ - struct hash_backet *next; + struct hash_bucket *next; /* Hash key. */ unsigned int key; @@ -64,8 +69,8 @@ struct hashstats { }; struct hash { - /* Hash backet. */ - struct hash_backet **index; + /* Hash bucket. */ + struct hash_bucket **index; /* Hash table size. Must be power of 2 */ unsigned int size; @@ -172,9 +177,9 @@ hash_create_size(unsigned int size, unsigned int (*hash_key)(void *), * hash table to operate on * * data - * data to insert or retrieve - A hash backet will not be created if + * data to insert or retrieve - A hash bucket will not be created if * the alloc_func returns a NULL pointer and nothing will be added to - * the hash. As such backet->data will always be non-NULL. + * the hash. As such bucket->data will always be non-NULL. * * alloc_func * function to call if the item is not found in the hash table. This @@ -243,7 +248,7 @@ extern void *hash_release(struct hash *hash, void *data); * during the walk will cause undefined behavior in that some new entries * will be walked and some will not. So do not do this. * - * The backet passed to func will have a non-NULL data pointer. + * The bucket passed to func will have a non-NULL data pointer. * * hash * hash table to operate on @@ -255,7 +260,7 @@ extern void *hash_release(struct hash *hash, void *data); * arbitrary argument passed as the second parameter in each call to 'func' */ extern void hash_iterate(struct hash *hash, - void (*func)(struct hash_backet *, void *), void *arg); + void (*func)(struct hash_bucket *, void *), void *arg); /* * Iterate over the elements in a hash table, stopping on condition. @@ -265,7 +270,7 @@ extern void hash_iterate(struct hash *hash, * during the walk will cause undefined behavior in that some new entries * will be walked and some will not. So do not do this. * - * The backet passed to func will have a non-NULL data pointer. + * The bucket passed to func will have a non-NULL data pointer. * * hash * hash table to operate on @@ -278,7 +283,7 @@ extern void hash_iterate(struct hash *hash, * arbitrary argument passed as the second parameter in each call to 'func' */ extern void hash_walk(struct hash *hash, - int (*func)(struct hash_backet *, void *), void *arg); + int (*func)(struct hash_bucket *, void *), void *arg); /* * Remove all elements from a hash table. diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 69da695dcb..7ac5368171 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -261,7 +261,7 @@ DEFUN (no_if_rmap, int config_write_if_rmap(struct vty *vty) { unsigned int i; - struct hash_backet *mp; + struct hash_bucket *mp; int write = 0; for (i = 0; i < ifrmaphash->size; i++) diff --git a/lib/routemap.c b/lib/routemap.c index 61e597520e..7c1ee2353c 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1664,9 +1664,9 @@ static bool route_map_dep_hash_cmp(const void *p1, const void *p2) == 0); } -static void route_map_clear_reference(struct hash_backet *backet, void *arg) +static void route_map_clear_reference(struct hash_bucket *bucket, void *arg) { - struct route_map_dep *dep = (struct route_map_dep *)backet->data; + struct route_map_dep *dep = (struct route_map_dep *)bucket->data; char *rmap_name; if (arg) { @@ -1720,9 +1720,9 @@ static unsigned int route_map_dep_hash_make_key(void *p) return (string_hash_make((char *)p)); } -static void route_map_print_dependency(struct hash_backet *backet, void *data) +static void route_map_print_dependency(struct hash_bucket *bucket, void *data) { - char *rmap_name = (char *)backet->data; + char *rmap_name = (char *)bucket->data; char *dep_name = (char *)data; zlog_debug("%s: Dependency for %s: %s", __FUNCTION__, dep_name, @@ -1846,9 +1846,9 @@ static struct hash *route_map_get_dep_hash(route_map_event_t event) return (upd8_hash); } -static void route_map_process_dependency(struct hash_backet *backet, void *data) +static void route_map_process_dependency(struct hash_bucket *bucket, void *data) { - char *rmap_name = (char *)backet->data; + char *rmap_name = (char *)bucket->data; route_map_event_t type = (route_map_event_t)(ptrdiff_t)data; if (rmap_debug) diff --git a/lib/thread.c b/lib/thread.c index 8c1b3ff06d..055587434c 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -106,7 +106,7 @@ static void vty_out_cpu_thread_history(struct vty *vty, a->types & (1 << THREAD_EXECUTE) ? 'X' : ' ', a->funcname); } -static void cpu_record_hash_print(struct hash_backet *bucket, void *args[]) +static void cpu_record_hash_print(struct hash_bucket *bucket, void *args[]) { struct cpu_thread_history *totals = args[0]; struct cpu_thread_history copy; @@ -178,7 +178,7 @@ static void cpu_record_print(struct vty *vty, uint8_t filter) if (m->cpu_record->count) hash_iterate( m->cpu_record, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))cpu_record_hash_print, args); else @@ -202,7 +202,7 @@ static void cpu_record_print(struct vty *vty, uint8_t filter) vty_out_cpu_thread_history(vty, &tmp); } -static void cpu_record_hash_clear(struct hash_backet *bucket, void *args[]) +static void cpu_record_hash_clear(struct hash_bucket *bucket, void *args[]) { uint8_t *filter = args[0]; struct hash *cpu_record = args[1]; @@ -229,7 +229,7 @@ static void cpu_record_clear(uint8_t filter) void *args[2] = {tmp, m->cpu_record}; hash_iterate( m->cpu_record, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))cpu_record_hash_clear, args); } diff --git a/lib/yang.c b/lib/yang.c index f62a8163f9..1d8e82eb28 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -649,6 +649,29 @@ CPP_NOTICE("lib/yang: time to remove non-LIBYANG_EXT_BUILTIN support") extern struct lytype_plugin_list frr_user_types[]; #endif +struct ly_ctx *yang_ctx_new_setup(void) +{ + struct ly_ctx *ctx; + const char *yang_models_path = YANG_MODELS_PATH; + + if (access(yang_models_path, R_OK | X_OK)) { + yang_models_path = NULL; + if (errno == ENOENT) + zlog_info("yang model directory \"%s\" does not exist", + YANG_MODELS_PATH); + else + flog_err_sys(EC_LIB_LIBYANG, + "cannot access yang model directory \"%s\"", + YANG_MODELS_PATH); + } + + ctx = ly_ctx_new(yang_models_path, LY_CTX_DISABLE_SEARCHDIR_CWD); + if (!ctx) + return NULL; + ly_ctx_set_module_imp_clb(ctx, yang_module_imp_clb, NULL); + return ctx; +} + void yang_init(void) { #ifndef LIBYANG_EXT_BUILTIN @@ -677,13 +700,11 @@ CPP_NOTICE("lib/yang: deprecated libyang <0.16.74 extension loading in use!") #endif /* Initialize libyang container for native models. */ - ly_native_ctx = - ly_ctx_new(YANG_MODELS_PATH, LY_CTX_DISABLE_SEARCHDIR_CWD); + ly_native_ctx = yang_ctx_new_setup(); if (!ly_native_ctx) { flog_err(EC_LIB_LIBYANG, "%s: ly_ctx_new() failed", __func__); exit(1); } - ly_ctx_set_module_imp_clb(ly_native_ctx, yang_module_imp_clb, NULL); ly_ctx_set_priv_dup_clb(ly_native_ctx, ly_dup_cb); #ifndef LIBYANG_EXT_BUILTIN diff --git a/lib/yang.h b/lib/yang.h index 4680db08d4..885218272a 100644 --- a/lib/yang.h +++ b/lib/yang.h @@ -514,6 +514,11 @@ extern void yang_data_free(struct yang_data *data); extern struct list *yang_data_list_new(void); /* + * Create and set up a libyang context (for use by the translator) + */ +extern struct ly_ctx *yang_ctx_new_setup(void); + +/* * Initialize the YANG subsystem. Should be called only once during the * daemon initialization process. */ diff --git a/lib/yang_translator.c b/lib/yang_translator.c index c3092e56e5..6d6f92836f 100644 --- a/lib/yang_translator.c +++ b/lib/yang_translator.c @@ -162,8 +162,7 @@ struct yang_translator *yang_translator_load(const char *path) RB_INSERT(yang_translators, &yang_translators, translator); /* Initialize the translator libyang context. */ - translator->ly_ctx = - ly_ctx_new(YANG_MODELS_PATH, LY_CTX_DISABLE_SEARCHDIR_CWD); + translator->ly_ctx = yang_ctx_new_setup(); if (!translator->ly_ctx) { flog_warn(EC_LIB_LIBYANG, "%s: ly_ctx_new() failed", __func__); goto error; @@ -525,8 +524,7 @@ static void str_replace(char *o_string, const char *s_string, void yang_translator_init(void) { - ly_translator_ctx = - ly_ctx_new(YANG_MODELS_PATH, LY_CTX_DISABLE_SEARCHDIR_CWD); + ly_translator_ctx = yang_ctx_new_setup(); if (!ly_translator_ctx) { flog_err(EC_LIB_LIBYANG, "%s: ly_ctx_new() failed", __func__); exit(1); diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c index 1316a4aad3..5508778243 100644 --- a/nhrpd/nhrp_cache.c +++ b/nhrpd/nhrp_cache.c @@ -345,7 +345,7 @@ struct nhrp_cache_iterator_ctx { void *ctx; }; -static void nhrp_cache_iterator(struct hash_backet *b, void *ctx) +static void nhrp_cache_iterator(struct hash_bucket *b, void *ctx) { struct nhrp_cache_iterator_ctx *ic = ctx; ic->cb(b->data, ic->ctx); diff --git a/nhrpd/nhrp_vc.c b/nhrpd/nhrp_vc.c index 79a655396b..f92ea4ac90 100644 --- a/nhrpd/nhrp_vc.c +++ b/nhrpd/nhrp_vc.c @@ -183,7 +183,7 @@ struct nhrp_vc_iterator_ctx { void *ctx; }; -static void nhrp_vc_iterator(struct hash_backet *b, void *ctx) +static void nhrp_vc_iterator(struct hash_bucket *b, void *ctx) { struct nhrp_vc_iterator_ctx *ic = ctx; ic->cb(b->data, ic->ctx); diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index b912a80692..dd02160195 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -172,11 +172,8 @@ static struct log_ref ferr_ospf_err[] = { { .code = EC_OSPF_LARGE_HELLO, .title = "OSPF Encountered a Large Hello", - .description = "OSPF attempted to send a Hello larger than MTU " - "but did not", - .suggestion = "Too many neighbors configured on a single interface." - " Suggestion is to decrease the number of neighbors on" - " a single interface/subnet" + .description = "OSPF attempted to send a Hello larger than MTU but did not", + .suggestion = "Too many neighbors configured on a single interface. Suggestion is to decrease the number of neighbors on a single interface/subnet" }, { .code = END_FERR, diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index ecc55c2ee5..b3c91b9006 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -3326,8 +3326,7 @@ static int ospf_make_hello(struct ospf_interface *oi, struct stream *s) > ospf_packet_max(oi)) { flog_err( EC_OSPF_LARGE_HELLO, - "Oversized Hello packet!" - " Larger than MTU. Not sending it out"); + "Oversized Hello packet! Larger than MTU. Not sending it out"); return 0; } diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index 43842e414e..f0ddf7cc0a 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -1020,10 +1020,10 @@ static void update_ext_prefix_sid(struct sr_node *srn, struct sr_prefix *srp) * When change the FRR Self SRGB, update the NHLFE Input Label * for all Extended Prefix with SID index through hash_iterate() */ -static void update_in_nhlfe(struct hash_backet *backet, void *args) +static void update_in_nhlfe(struct hash_bucket *bucket, void *args) { struct listnode *node; - struct sr_node *srn = (struct sr_node *)backet->data; + struct sr_node *srn = (struct sr_node *)bucket->data; struct sr_prefix *srp; struct sr_nhlfe new; @@ -1052,10 +1052,10 @@ static void update_in_nhlfe(struct hash_backet *backet, void *args) * When SRGB has changed, update NHLFE Output Label for all Extended Prefix * with SID index which use the given SR-Node as nexthop though hash_iterate() */ -static void update_out_nhlfe(struct hash_backet *backet, void *args) +static void update_out_nhlfe(struct hash_bucket *bucket, void *args) { struct listnode *node; - struct sr_node *srn = (struct sr_node *)backet->data; + struct sr_node *srn = (struct sr_node *)bucket->data; struct sr_node *srnext = (struct sr_node *)args; struct sr_prefix *srp; struct sr_nhlfe new; @@ -1192,7 +1192,7 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa) /* Update NHLFE if it is a neighbor SR node */ if (srn->neighbor == OspfSR.self) hash_iterate(OspfSR.neighbors, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))update_out_nhlfe, (void *)srn); } @@ -1531,10 +1531,10 @@ void ospf_sr_update_prefix(struct interface *ifp, struct prefix *p) * Following functions are used to update MPLS LFIB after a SPF run */ -static void ospf_sr_nhlfe_update(struct hash_backet *backet, void *args) +static void ospf_sr_nhlfe_update(struct hash_bucket *bucket, void *args) { - struct sr_node *srn = (struct sr_node *)backet->data; + struct sr_node *srn = (struct sr_node *)bucket->data; struct listnode *node; struct sr_prefix *srp; struct sr_nhlfe old; @@ -1593,7 +1593,7 @@ static int ospf_sr_update_schedule(struct thread *t) if (IS_DEBUG_OSPF_SR) zlog_debug("SR (%s): Start SPF update", __func__); - hash_iterate(OspfSR.neighbors, (void (*)(struct hash_backet *, + hash_iterate(OspfSR.neighbors, (void (*)(struct hash_bucket *, void *))ospf_sr_nhlfe_update, NULL); @@ -1818,7 +1818,7 @@ DEFUN (sr_sid_label_range, /* Update NHLFE entries */ hash_iterate(OspfSR.neighbors, - (void (*)(struct hash_backet *, void *))update_in_nhlfe, + (void (*)(struct hash_bucket *, void *))update_in_nhlfe, NULL); return CMD_SUCCESS; @@ -1850,7 +1850,7 @@ DEFUN (no_sr_sid_label_range, /* Update NHLFE entries */ hash_iterate(OspfSR.neighbors, - (void (*)(struct hash_backet *, void *))update_in_nhlfe, + (void (*)(struct hash_bucket *, void *))update_in_nhlfe, NULL); return CMD_SUCCESS; @@ -2281,18 +2281,18 @@ static void show_sr_node(struct vty *vty, struct json_object *json, vty_out(vty, "\n"); } -static void show_vty_srdb(struct hash_backet *backet, void *args) +static void show_vty_srdb(struct hash_bucket *bucket, void *args) { struct vty *vty = (struct vty *)args; - struct sr_node *srn = (struct sr_node *)backet->data; + struct sr_node *srn = (struct sr_node *)bucket->data; show_sr_node(vty, NULL, srn); } -static void show_json_srdb(struct hash_backet *backet, void *args) +static void show_json_srdb(struct hash_bucket *bucket, void *args) { struct json_object *json = (struct json_object *)args; - struct sr_node *srn = (struct sr_node *)backet->data; + struct sr_node *srn = (struct sr_node *)bucket->data; show_sr_node(NULL, json, srn); } @@ -2366,14 +2366,14 @@ DEFUN (show_ip_opsf_srdb, /* No parameters have been provided, Iterate through all the SRDB */ if (uj) { - hash_iterate(OspfSR.neighbors, (void (*)(struct hash_backet *, + hash_iterate(OspfSR.neighbors, (void (*)(struct hash_bucket *, void *))show_json_srdb, (void *)json_node_array); vty_out(vty, "%s\n", json_object_to_json_string_ext( json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { - hash_iterate(OspfSR.neighbors, (void (*)(struct hash_backet *, + hash_iterate(OspfSR.neighbors, (void (*)(struct hash_bucket *, void *))show_vty_srdb, (void *)vty); } diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index f3bfad3190..2cba657f65 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -124,7 +124,7 @@ static void pbr_nh_delete(struct pbr_nexthop_cache **pnhc) XFREE(MTYPE_PBR_NHG, *pnhc); } -static void pbr_nh_delete_iterate(struct hash_backet *b, void *p) +static void pbr_nh_delete_iterate(struct hash_bucket *b, void *p) { pbr_nh_delete((struct pbr_nexthop_cache **)&b->data); } @@ -319,7 +319,7 @@ static struct pbr_nexthop_cache *pbr_nht_lookup_nexthop(struct nexthop *nexthop) } #endif -static void pbr_nht_find_nhg_from_table_install(struct hash_backet *b, +static void pbr_nht_find_nhg_from_table_install(struct hash_bucket *b, void *data) { struct pbr_nexthop_group_cache *pnhgc = @@ -348,7 +348,7 @@ void pbr_nht_route_installed_for_table(uint32_t table_id) &table_id); } -static void pbr_nht_find_nhg_from_table_remove(struct hash_backet *b, +static void pbr_nht_find_nhg_from_table_remove(struct hash_bucket *b, void *data) { ; @@ -657,7 +657,7 @@ struct pbr_nht_individual { uint32_t valid; }; -static void pbr_nht_individual_nexthop_update_lookup(struct hash_backet *b, +static void pbr_nht_individual_nexthop_update_lookup(struct hash_bucket *b, void *data) { struct pbr_nexthop_cache *pnhc = b->data; @@ -689,7 +689,7 @@ static void pbr_nht_individual_nexthop_update_lookup(struct hash_backet *b, pnhi->valid += 1; } -static void pbr_nht_nexthop_update_lookup(struct hash_backet *b, void *data) +static void pbr_nht_nexthop_update_lookup(struct hash_bucket *b, void *data) { struct pbr_nexthop_group_cache *pnhgc = b->data; struct pbr_nht_individual pnhi; @@ -822,7 +822,7 @@ bool pbr_nht_get_installed(const char *name) return pnhgc->installed; } -static void pbr_nht_show_nhg_nexthops(struct hash_backet *b, void *data) +static void pbr_nht_show_nhg_nexthops(struct hash_bucket *b, void *data) { struct pbr_nexthop_cache *pnhc = b->data; struct vty *vty = data; @@ -836,7 +836,7 @@ struct pbr_nht_show { const char *name; }; -static void pbr_nht_show_nhg(struct hash_backet *b, void *data) +static void pbr_nht_show_nhg(struct hash_bucket *b, void *data) { struct pbr_nexthop_group_cache *pnhgc = b->data; struct pbr_nht_show *pns = data; diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 193eddf68a..eaec002a73 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2789,9 +2789,9 @@ struct pnc_cache_walk_data { struct pim_instance *pim; }; -static int pim_print_pnc_cache_walkcb(struct hash_backet *backet, void *arg) +static int pim_print_pnc_cache_walkcb(struct hash_bucket *bucket, void *arg) { - struct pim_nexthop_cache *pnc = backet->data; + struct pim_nexthop_cache *pnc = bucket->data; struct pnc_cache_walk_data *cwd = arg; struct vty *vty = cwd->vty; struct pim_instance *pim = cwd->pim; diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 2d808639b5..b6cd1a7d11 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -266,10 +266,10 @@ void pim_resolve_upstream_nh(struct pim_instance *pim, struct prefix *nht_p) } /* Update Upstream nexthop info based on Nexthop update received from Zebra.*/ -static int pim_update_upstream_nh_helper(struct hash_backet *backet, void *arg) +static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg) { struct pim_instance *pim = (struct pim_instance *)arg; - struct pim_upstream *up = (struct pim_upstream *)backet->data; + struct pim_upstream *up = (struct pim_upstream *)bucket->data; int vif_index = 0; enum pim_rpf_result rpf_result; diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c index 959358bbec..5c0e171778 100644 --- a/tests/lib/test_srcdest_table.c +++ b/tests/lib/test_srcdest_table.c @@ -195,10 +195,10 @@ static void test_state_del_route(struct test_state *test, XFREE(MTYPE_TMP, hash_entry_intern); } -static void verify_log(struct hash_backet *backet, void *arg) +static void verify_log(struct hash_bucket *bucket, void *arg) { struct test_state *test = arg; - struct prefix *hash_entry = backet->data; + struct prefix *hash_entry = bucket->data; struct prefix *dst_p = &hash_entry[0]; struct prefix_ipv6 *src_p = (struct prefix_ipv6 *)&hash_entry[1]; struct route_node *rn = srcdest_rnode_lookup(test->table, dst_p, src_p); @@ -209,9 +209,9 @@ static void verify_log(struct hash_backet *backet, void *arg) route_unlock_node(rn); } -static void dump_log(struct hash_backet *backet, void *arg) +static void dump_log(struct hash_bucket *bucket, void *arg) { - struct prefix *hash_entry = backet->data; + struct prefix *hash_entry = bucket->data; struct prefix_ipv6 *dst_p = (struct prefix_ipv6 *)&hash_entry[0]; struct prefix_ipv6 *src_p = (struct prefix_ipv6 *)&hash_entry[1]; char *route_id = format_srcdest(dst_p, src_p); diff --git a/tools/build-debian-package.sh b/tools/build-debian-package.sh index 73231f0aec..d21f468bf5 100755 --- a/tools/build-debian-package.sh +++ b/tools/build-debian-package.sh @@ -2,39 +2,26 @@ # # Written by Daniil Baturin, 2018 # This file is public domain +set -e -git diff-index --quiet HEAD || echo "Warning: git working directory is not clean!" - -# Set the defaults -if [ "$EXTRA_VERSION" = "" ]; then - EXTRA_VERSION="-MyDebPkgVersion" -fi +cd "`dirname $0`" +cd .. -if [ "$WANT_SNMP" = "" ]; then - WANT_SNMP=0 +if [ "`id -u`" = 0 ]; then + echo "Running as root - installing dependencies" + apt-get install fakeroot debhelper devscripts + mk-build-deps --install debian/control + exit 0 fi -if [ "$WANT_CUMULUS_MODE" = "" ]; then - WANT_CUMULUS_MODE=0 -fi +git diff-index --quiet HEAD || echo "Warning: git working directory is not clean!" echo "Preparing the build" -./bootstrap.sh -./configure --with-pkg-extra-version=$EXTRA_VERSION -make dist - -echo "Preparing Debian source package" -mv debianpkg debian -make -f debian/rules backports - -echo "Unpacking the source to frrpkg/" -mkdir frrpkg -cd frrpkg -tar xf ../frr_*.orig.tar.gz -cd frr* -. /etc/os-release -tar xf ../../frr_*${ID}${VERSION_ID}*.debian.tar.xz +tools/tarsource.sh -V echo "Building the Debian package" -debuild --no-lintian --set-envvar=WANT_SNMP=$WANT_SNMP --set-envvar=WANT_CUMULUS_MODE=$WANT_CUMULUS_MODE -b -uc -us - +if test $# -eq 0; then + dpkg-buildpackage -b -uc -us +else + dpkg-buildpackage "$@" +fi diff --git a/tools/etc/frr/daemons b/tools/etc/frr/daemons index 2d56fe1b98..0fca541137 100644 --- a/tools/etc/frr/daemons +++ b/tools/etc/frr/daemons @@ -55,7 +55,7 @@ bfdd_options=" -A 127.0.0.1" fabricd_options="-A 127.0.0.1" # The list of daemons to watch is automatically generated by the init script. -watchfrr_options="-r '/usr/lib/frr/watchfrr.sh restart %s' -s '/usr/lib/frr/watchfrr.sh start %s' -k '/usr/lib/frr/watchfrr.sh stop %s'" +#watchfrr_options="" # for debugging purposes, you can specify a "wrap" command to start instead # of starting the daemon directly, e.g. to use valgrind on ospfd: diff --git a/tools/frr-reload.py b/tools/frr-reload.py index c48c8b97ad..298cae7a32 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -300,13 +300,11 @@ class Config(object): ''' More fixups in user specification and what running config shows. - "null0" in routes must be replaced by Null0, and "blackhole" must - be replaced by Null0 as well. + "null0" in routes must be replaced by Null0. ''' if (key[0].startswith('ip route') or key[0].startswith('ipv6 route') and - 'null0' in key[0] or 'blackhole' in key[0]): + 'null0' in key[0]): key[0] = re.sub(r'\s+null0(\s*$)', ' Null0', key[0]) - key[0] = re.sub(r'\s+blackhole(\s*$)', ' Null0', key[0]) if lines: if tuple(key) not in self.contexts: diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index 065295f527..76a0d617ba 100644 --- a/tools/frrcommon.sh.in +++ b/tools/frrcommon.sh.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This is a "library" of sorts for use by the other FRR shell scripts. It # has most of the daemon start/stop logic, but expects the following shell @@ -85,6 +85,9 @@ daemon_list() { eval inst=\$${daemon}_instances [ "$daemon" = zebra -o "$daemon" = staticd ] && cfg=yes if [ -n "$cfg" -a "$cfg" != "no" -a "$cfg" != "0" ]; then + if ! daemon_prep "$daemon" "$inst"; then + continue + fi debug "$daemon enabled" enabled="$enabled $daemon" if [ -n "$inst" ]; then @@ -288,6 +291,13 @@ load_old_config "$C_PATH/daemons.conf" load_old_config "/etc/default/frr" load_old_config "/etc/sysconfig/frr" +if declare -p watchfrr_options | grep -q '^declare \-a'; then + log_warning_msg "watchfrr_options contains a bash array value." \ + "The configured value is intentionally ignored since it is likely wrong." \ + "Please remove or fix the setting." + unset watchfrr_options +fi + # # other defaults and dispatch # diff --git a/tools/frrinit.sh.in b/tools/frrinit.sh.in index 3dddf5bd44..0f5ed85864 100644 --- a/tools/frrinit.sh.in +++ b/tools/frrinit.sh.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # ### BEGIN INIT INFO # Provides: frr diff --git a/tools/tarsource.sh b/tools/tarsource.sh new file mode 100755 index 0000000000..eee2a9739b --- /dev/null +++ b/tools/tarsource.sh @@ -0,0 +1,331 @@ +#!/bin/bash +# 2018 by David Lamparter, placed in the Public Domain + +help() { + cat <<EOF +FRR tarball/dsc helper, intended to run from a git checkout + +Usage: + ./tarsource.sh [-dDn] [-i GITPATH] [-o OUTDIR] [-S KEYID] + [-C COMMIT] [-e EXTRAVERSION] [-z gz|xz] + +options: + -i GITPATH path to git working tree or bare repository. + - default: parent directory containing this script + -o OUTDIR path to place the generated output files in. + - default: current directory + -C COMMIT build tarball for specified git commit + - default: current HEAD + -e EXTRAVERSION override automatic package extraversion + - default "-YYYYMMDD-NN-gGGGGGGGGGGGG", but the script + autodetects if a release tag is checked out + -z gz|xz compression format to use + - default: xz + -S KEYID sign the output with gpg key + -d use dirty git tree with local changes + -D generate Debian .dsc and .debian.tar.xz too + (note: output files are moved to parent directory) + -l remove Debian auto-build changelog entry + (always done for releases) + -V write version information to config.version and exit + -n allow executing from non-git source (NOT RECOMMENDED) + -h show this help text + +Note(1) that this script tries very hard to generate a deterministic, +reproducible tarball by eliminating timestamps and similar things. However, +since the tarball includes autoconf/automake files, the versions of these +tools need to be _exactly_ identical to get the same tarball. + +Note(2) the debian ".orig" tarball is always identical to the "plain" tarball +generated without the -D option. + +Note(3) if you want the tool to identify github PRs, you need to edit your +.git/config to fetch PRs from github like this: + + [remote "origin"] + url = git@github.com:frrouting/frr.git + fetch = +refs/heads/*:refs/remotes/origin/* +ADD: fetch = +refs/pull/*/head:refs/remotes/origin/pull/* +EOF +} + +set -e + +options=`getopt -o 'hi:o:C:S:e:z:DdnlV' -l help -- "$@"` +debian=false +dirty=false +nongit=false +zip=xz +adjchangelog=false +writeversion=false +extraset=false +set - $options +while test $# -gt 0; do + arg="$1"; shift; optarg=$1 + case "$arg" in + -h|--help) help; exit 0;; + -d) dirty=true;; + -D) debian=true;; + -n) nongit=true;; + -i) eval src=$optarg; shift;; + -C) eval commit=$optarg; shift;; + -o) eval outdir=$optarg; shift;; + -e) eval extraver=$optarg; extraset=true; shift;; + -z) eval zip=$optarg; shift;; + -S) eval keyid=$optarg; shift;; + -l) adjchangelog=true;; + -V) writeversion=true;; + --) break;; + *) echo something went wrong with getopt >&2 + exit 1 + ;; + esac +done + +cwd="`pwd`" +outdir="${outdir:-$cwd}" + +if test -e "$outdir" -a \! -d "$outdir"; then + echo "output $outdir must be a directory" >&2 + exit 1 +elif test \! -d "$outdir"; then + mkdir -p "$outdir" +fi + +cd "$outdir" +outdir="`pwd`" +cd "$cwd" +cd "`dirname $0`/.." +selfdir="`pwd`" +src="${src:-$selfdir}" + +if $writeversion; then + if $nongit; then + echo "The -V option cannot be used without a git tree" >&2 + exit 1 + fi + dirty=true +fi + +case "$zip" in +gz) ziptarget=dist-gzip; ziptool="gzip -n -9"; unzip="gzip -k -c";; +xz) ziptarget=dist-xz; ziptool="xz -z -e"; unzip="xz -d -k -c";; +*) echo "unknown compression format $zip" >&2 + exit 1 +esac + +# always overwrite file ownership in tars +taropt="--owner=root --group=root" + +onexit() { + rv="$?" + set +e + test -n "$tmpdir" -a -d "$tmpdir" && rm -rf "$tmpdir" + + if test "$rv" -ne 0; then + echo -e "\n\033[31;1mfailed\n" >&2 + if test "$dirty" = true; then + echo please try running the script without the -d option.>&2 + fi + fi + exit $rv +} +trap onexit EXIT +tmpdir="`mktemp -d -t frrtar.XXXXXX`" + +if test -e "$src/.git"; then + commit="`git -C \"$src\" rev-parse \"${commit:-HEAD}\"`" + + if $dirty; then + cd "$src" + echo -e "\033[31;1mgit: using dirty worktree in $src\033[m" >&2 + else + echo -e "\033[33;1mgit: preparing a clean clone of $src\033[m" + branch="${tmpdir##*/}" + cd "$tmpdir" + + git -C "$src" branch "$branch" "$commit" + git clone --single-branch -s -b "$branch" "$src" source + git -C "$src" branch -D "$branch" + cd source + fi + + # if we're creating a tarball from git, force the timestamps inside + # the tar to match the commit date - this makes the tarball itself + # reproducible + gitts="`TZ=UTC git show -s --format=%cd --date=local $commit`" + gitts="`TZ=UTC date -d "$gitts" '+%Y-%m-%dT%H:%M:%SZ'`" + taropt="--mtime=$gitts $taropt" + + # check if we're on a release tag + gittag="`git -C \"$src\" describe --tags --match 'frr-*' --first-parent --long $commit`" + gittag="${gittag%-g*}" + gittag="${gittag%-*}" + + # if there have been changes to packaging or tests, it's still the + # same release + changes="`git diff --name-only "$gittag" $commit | \ + egrep -v '\.git|^m4/|^config|^README|^alpine/|^debian/|^pkgsrc/|^ports/|^redhat/|^snapcraft/|^solaris/|^tests/|^tools/|^gdb/|^docker/|^\.' | \ + wc -l`" + if test "$changes" -eq 0; then + adjchangelog=true + echo "detected release build for tag $gittag" >&2 + $extraset || extraver="" + elif ! $adjchangelog; then + gitdate="`TZ=UTC date -d "$gitts" '+%Y%m%d'`" + gitrev="`git rev-parse --short $commit`" + dayseq="`git rev-list --since \"${gitts%T*} 00:00:00 +0000\" $commit | wc -l`" + dayseq="`printf '%02d' $(( $dayseq - 1 ))`" + + $extraset || extraver="-$gitdate-$dayseq-g$gitrev" + + git -C "$src" remote -v | grep fetch | sed -e 's% (fetch)$%%' \ + | egrep -i '\b(git@github\.com:frrouting/frr\.git|https://github\.com/FRRouting/frr\.git)$' \ + | while read remote; do + remote="${remote%% *}" + + git -C "$src" var -l | egrep "^remote.$remote.fetch=" \ + | while read fetch; do + fetch="${fetch#*=}" + from="${fetch%:*}" + to="${fetch#*:}" + if test "$from" = "+refs/pull/*/head"; then + name="`git -C \"$src\" name-rev --name-only --refs \"$to\" $commit`" + test "$name" = "undefined" && continue + realname="${name%~*}" + realname="${realname%%^*}" + realname="${realname%%@*}" + if test "$realname" = "$name"; then + echo "${name##*/}" > "$tmpdir/.gitpr" + break + fi + fi + done || true + test -n "$gitpr" && break + done || true + test $extraset = false -a -f "$tmpdir/.gitpr" && extraver="-PR`cat \"$tmpdir/.gitpr\"`$extraver" + fi + + debsrc="git ls-files debian/" +else + if $nongit; then + echo -e "\033[31;1mWARNING: this script should be executed from a git tree\033[m" >&2 + else + echo -e "\033[31;1mERROR: this script should be executed from a git tree\033[m" >&2 + exit 1 + fi + debsrc="echo debian" +fi + +if $writeversion; then + pkgver="`egrep ^AC_INIT configure.ac`" + pkgver="${pkgver#*,}" + pkgver="${pkgver%,*}" + pkgver="`echo $pkgver`" # strip whitespace + pkgver="${pkgver#[}" + pkgver="${pkgver%]}" + + echo -e "\033[32;1mwriting version ID \033[36;1mfrr-$pkgver$extraver\033[m" + + cat > config.version <<EOF +# config.version override by tarsource.sh +EXTRAVERSION="$extraver" +DIST_PACKAGE_VERSION="$pkgver$extraver" +gitts="$gitts" +taropt="$taropt" +EOF + sed -e "s%@VERSION@%$pkgver$extraver%" \ + < changelog-auto.in \ + > changelog-auto + exit 0 +fi + +echo -e "\033[33;1mpreparing source tree\033[m" + +# config.version will also overwrite gitts and taropt when tarsource.sh +# was used to write the config.version file before - but configure will +# overwrite config.version down below! +if test -f config.version; then + # never executed for clean git build + . ./config.version + if $nongit; then + $extraset || extraver="$EXTRAVERSION" + fi +fi +if test \! -f configure; then + # always executed for clean git build + ./bootstrap.sh +fi +if test "$EXTRAVERSION" != "$extraver" -o \! -f config.status; then + # always executed for clean git build + # options don't matter really - we just want to make a dist tarball + ./configure --with-pkg-extra-version=$extraver +fi + +. ./config.version +PACKAGE_VERSION="$DIST_PACKAGE_VERSION" + +echo -e "\033[33;1mpacking up \033[36;1mfrr-$PACKAGE_VERSION\033[m" + +make GZIP_ENV="-n9" am__tar="tar -chof - $taropt \"\$\$tardir\"" $ziptarget +mv frr-${PACKAGE_VERSION}.tar.$zip "$outdir" || true +lsfiles="frr-${PACKAGE_VERSION}.tar.$zip" + +if $debian; then + mkdir -p "$tmpdir/debian/source" + cat debian/changelog > "$tmpdir/debian/changelog" + if $adjchangelog; then + if grep -q 'autoconf changelog entry' debian/changelog; then + tail -n +9 debian/changelog > "$tmpdir/debian/changelog" + fi + fi + echo '3.0 (quilt)' > "$tmpdir/debian/source/format" + DEBVER="`dpkg-parsechangelog -l\"$tmpdir/debian/changelog\" -SVersion`" + + eval $debsrc | tar -cho $taropt \ + --exclude-vcs --exclude debian/source/format \ + --exclude debian/changelog \ + --exclude debian/changelog-auto \ + --exclude debian/changelog-auto.in \ + --exclude debian/subdir.am \ + -T - -f ../frr_${DEBVER}.debian.tar + # add specially prepared files from above + tar -uf ../frr_${DEBVER}.debian.tar $taropt -C "$tmpdir" debian/source/format debian/changelog + + test -f ../frr_${DEBVER}.debian.tar.$zip && rm -f ../frr_${DEBVER}.debian.tar.$zip + $ziptool ../frr_${DEBVER}.debian.tar + + # pack up debian files proper + ln -s "$outdir/frr-${PACKAGE_VERSION}.tar.$zip" ../frr_${PACKAGE_VERSION}.orig.tar.$zip + dpkg-source -l"$tmpdir/debian/changelog" \ + --format='3.0 (custom)' --target-format='3.0 (quilt)' \ + -b . frr_${PACKAGE_VERSION}.orig.tar.$zip frr_${DEBVER}.debian.tar.$zip + + mv ../frr_${DEBVER}.dsc "$outdir" || true + mv ../frr_${DEBVER}.debian.tar.$zip "$outdir" || true + if test -h ../frr_${PACKAGE_VERSION}.orig.tar.$zip; then + rm ../frr_${PACKAGE_VERSION}.orig.tar.$zip || true + fi + ln -s frr-${PACKAGE_VERSION}.tar.$zip "$outdir/frr_${PACKAGE_VERSION}.orig.tar.$zip" || true + + cd "$outdir" + test -n "$keyid" && debsign -k "$keyid" "frr_${DEBVER}.dsc" + + lsfiles="$lsfiles \ + frr_${DEBVER}.dsc \ + frr_${DEBVER}.debian.tar.$zip \ + frr_${PACKAGE_VERSION}.orig.tar.$zip" +fi + +cd "$outdir" +if test -n "$keyid"; then + $unzip frr-${PACKAGE_VERSION}.tar.$zip > frr-${PACKAGE_VERSION}.tar + test -f frr-${PACKAGE_VERSION}.tar.asc && rm frr-${PACKAGE_VERSION}.tar.asc + if gpg -a --detach-sign -u "$keyid" frr-${PACKAGE_VERSION}.tar; then + lsfiles="$lsfiles frr-${PACKAGE_VERSION}.tar.asc" + fi + rm frr-${PACKAGE_VERSION}.tar +fi + +echo -e "\n\033[32;1mdone: \033[36;1mfrr-$PACKAGE_VERSION\033[m\n" +ls -l $lsfiles diff --git a/tools/watchfrr.sh.in b/tools/watchfrr.sh.in index 3051d91044..712f962a0a 100644 --- a/tools/watchfrr.sh.in +++ b/tools/watchfrr.sh.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This is NOT the init script! This is the watchfrr start/stop/restart # command handler, passed to watchfrr with the -s/-r/-k commands. It is used diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index e28da6db8c..34f8dabdf1 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -53,6 +53,10 @@ #define DEFAULT_MIN_RESTART 60 #define DEFAULT_MAX_RESTART 600 +#define DEFAULT_RESTART_CMD WATCHFRR_SH_PATH " restart %s" +#define DEFAULT_START_CMD WATCHFRR_SH_PATH " start %s" +#define DEFAULT_STOP_CMD WATCHFRR_SH_PATH " stop %s" + #define PING_TOKEN "PING" DEFINE_MGROUP(WATCHFRR, "watchfrr") @@ -83,6 +87,7 @@ static const char *phase_str[] = { }; #define PHASE_TIMEOUT (3*gs.restart_timeout) +#define STARTUP_TIMEOUT 55 * 1000 struct restart_info { const char *name; @@ -97,6 +102,7 @@ struct restart_info { static struct global_state { restart_phase_t phase; struct thread *t_phase_hanging; + struct thread *t_startup_timeout; const char *vtydir; long period; long timeout; @@ -122,6 +128,9 @@ static struct global_state { .loglevel = DEFAULT_LOGLEVEL, .min_restart_interval = DEFAULT_MIN_RESTART, .max_restart_interval = DEFAULT_MAX_RESTART, + .restart_command = DEFAULT_RESTART_CMD, + .start_command = DEFAULT_START_CMD, + .stop_command = DEFAULT_STOP_CMD, }; typedef enum { @@ -225,14 +234,17 @@ Otherwise, the interval is doubled (but capped at the -M value).\n\n", -r, --restart Supply a Bourne shell command to use to restart a single\n\ daemon. The command string should include '%%s' where the\n\ name of the daemon should be substituted.\n\ + (default: '%s')\n\ -s, --start-command\n\ Supply a Bourne shell to command to use to start a single\n\ daemon. The command string should include '%%s' where the\n\ name of the daemon should be substituted.\n\ + (default: '%s')\n\ -k, --kill-command\n\ Supply a Bourne shell to command to use to stop a single\n\ daemon. The command string should include '%%s' where the\n\ name of the daemon should be substituted.\n\ + (default: '%s')\n\ --dry Do not start or restart anything, just log.\n\ -p, --pid-file Set process identifier file name\n\ (default is %s/watchfrr.pid).\n\ @@ -245,7 +257,9 @@ Otherwise, the interval is doubled (but capped at the -M value).\n\n", -h, --help Display this help and exit\n", frr_vtydir, DEFAULT_LOGLEVEL, LOG_EMERG, LOG_DEBUG, LOG_DEBUG, DEFAULT_MIN_RESTART, DEFAULT_MAX_RESTART, DEFAULT_PERIOD, - DEFAULT_TIMEOUT, DEFAULT_RESTART_TIMEOUT, frr_vtydir); + DEFAULT_TIMEOUT, DEFAULT_RESTART_TIMEOUT, + DEFAULT_RESTART_CMD, DEFAULT_START_CMD, DEFAULT_STOP_CMD, + frr_vtydir); } static pid_t run_background(char *shell_cmd) @@ -630,23 +644,38 @@ static int handle_read(struct thread *t_read) * Wait till we notice that all daemons are ready before * we send we are ready to systemd */ -static void daemon_send_ready(void) +static void daemon_send_ready(int exitcode) { + FILE *fp; static int sent = 0; - if (!sent && gs.numdown == 0) { - FILE *fp; + if (sent) + return; + + if (exitcode == 0) zlog_notice("all daemons up, doing startup-complete notify"); - frr_detach(); + else if (gs.numdown < gs.numdaemons) + flog_err(EC_WATCHFRR_CONNECTION, + "startup did not complete within timeout" + " (%d/%d daemons running)", + gs.numdaemons - gs.numdown, gs.numdaemons); + else { + flog_err(EC_WATCHFRR_CONNECTION, + "all configured daemons failed to start" + " -- exiting watchfrr"); + exit(exitcode); + + } - fp = fopen(DAEMON_VTY_DIR "/watchfrr.started", "w"); - if (fp) - fclose(fp); + frr_detach(); + + fp = fopen(DAEMON_VTY_DIR "/watchfrr.started", "w"); + if (fp) + fclose(fp); #if defined HAVE_SYSTEMD - systemd_send_started(master, 0); + systemd_send_started(master, 0); #endif - sent = 1; - } + sent = 1; } static void daemon_up(struct daemon *dmn, const char *why) @@ -655,7 +684,8 @@ static void daemon_up(struct daemon *dmn, const char *why) gs.numdown--; dmn->connect_tries = 0; zlog_notice("%s state -> up : %s", dmn->name, why); - daemon_send_ready(); + if (gs.numdown == 0) + daemon_send_ready(0); SET_WAKEUP_ECHO(dmn); phase_check(); } @@ -1030,6 +1060,12 @@ static char *translate_blanks(const char *cmd, const char *blankstr) return res; } +static int startup_timeout(struct thread *t_wakeup) +{ + daemon_send_ready(1); + return 0; +} + static void watchfrr_init(int argc, char **argv) { const char *special = "zebra"; @@ -1037,6 +1073,9 @@ static void watchfrr_init(int argc, char **argv) struct daemon *dmn, **add = &gs.daemons; char alldaemons[512] = "", *p = alldaemons; + thread_add_timer_msec(master, startup_timeout, NULL, STARTUP_TIMEOUT, + &gs.t_startup_timeout); + for (i = optind; i < argc; i++) { dmn = XCALLOC(MTYPE_WATCHFRR_DAEMON, sizeof(*dmn)); diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 78c07f9aaf..a06e15d90d 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -85,8 +85,8 @@ static int nhlfe_nexthop_active_ipv6(zebra_nhlfe_t *nhlfe, static int nhlfe_nexthop_active(zebra_nhlfe_t *nhlfe); static void lsp_select_best_nhlfe(zebra_lsp_t *lsp); -static void lsp_uninstall_from_kernel(struct hash_backet *backet, void *ctxt); -static void lsp_schedule(struct hash_backet *backet, void *ctxt); +static void lsp_uninstall_from_kernel(struct hash_bucket *bucket, void *ctxt); +static void lsp_schedule(struct hash_bucket *bucket, void *ctxt); static wq_item_status lsp_process(struct work_queue *wq, void *data); static void lsp_processq_del(struct work_queue *wq, void *data); static void lsp_processq_complete(struct work_queue *wq); @@ -853,11 +853,11 @@ static void lsp_select_best_nhlfe(zebra_lsp_t *lsp) * Delete LSP forwarding entry from kernel, if installed. Called upon * process exit. */ -static void lsp_uninstall_from_kernel(struct hash_backet *backet, void *ctxt) +static void lsp_uninstall_from_kernel(struct hash_bucket *bucket, void *ctxt) { zebra_lsp_t *lsp; - lsp = (zebra_lsp_t *)backet->data; + lsp = (zebra_lsp_t *)bucket->data; if (CHECK_FLAG(lsp->flags, LSP_FLAG_INSTALLED)) (void)dplane_lsp_delete(lsp); } @@ -866,11 +866,11 @@ static void lsp_uninstall_from_kernel(struct hash_backet *backet, void *ctxt) * Schedule LSP forwarding entry for processing. Called upon changes * that may impact LSPs such as nexthop / connected route changes. */ -static void lsp_schedule(struct hash_backet *backet, void *ctxt) +static void lsp_schedule(struct hash_bucket *bucket, void *ctxt) { zebra_lsp_t *lsp; - lsp = (zebra_lsp_t *)backet->data; + lsp = (zebra_lsp_t *)bucket->data; (void)lsp_processq_add(lsp); } @@ -1492,7 +1492,7 @@ static json_object *lsp_json(zebra_lsp_t *lsp) static struct list *hash_get_sorted_list(struct hash *hash, void *cmp) { unsigned int i; - struct hash_backet *hb; + struct hash_bucket *hb; struct list *sorted_list = list_new(); sorted_list->cmp = (int (*)(void *, void *))cmp; @@ -2550,12 +2550,12 @@ int mpls_lsp_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type, * Uninstall all LDP NHLFEs for a particular LSP forwarding entry. * If no other NHLFEs exist, the entry would be deleted. */ -void mpls_ldp_lsp_uninstall_all(struct hash_backet *backet, void *ctxt) +void mpls_ldp_lsp_uninstall_all(struct hash_bucket *bucket, void *ctxt) { zebra_lsp_t *lsp; struct hash *lsp_table; - lsp = (zebra_lsp_t *)backet->data; + lsp = (zebra_lsp_t *)bucket->data; if (!lsp->nhlfe_list) return; diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index fb32adde31..39f084ad2f 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -291,7 +291,7 @@ int mpls_lsp_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type, * Uninstall all LDP NHLFEs for a particular LSP forwarding entry. * If no other NHLFEs exist, the entry would be deleted. */ -void mpls_ldp_lsp_uninstall_all(struct hash_backet *backet, void *ctxt); +void mpls_ldp_lsp_uninstall_all(struct hash_bucket *bucket, void *ctxt); /* * Uninstall all LDP FEC-To-NHLFE (FTN) bindings of the given address-family. @@ -302,7 +302,7 @@ void mpls_ldp_ftn_uninstall_all(struct zebra_vrf *zvrf, int afi); * Uninstall all Segment Routing NHLFEs for a particular LSP forwarding entry. * If no other NHLFEs exist, the entry would be deleted. */ -void mpls_sr_lsp_uninstall_all(struct hash_backet *backet, void *ctxt); +void mpls_sr_lsp_uninstall_all(struct hash_bucket *bucket, void *ctxt); #if defined(HAVE_CUMULUS) /* diff --git a/zebra/zebra_pbr.c b/zebra/zebra_pbr.c index 833306bcc4..348bdeb9fc 100644 --- a/zebra/zebra_pbr.c +++ b/zebra/zebra_pbr.c @@ -212,7 +212,7 @@ struct pbr_rule_unique_lookup { vrf_id_t vrf_id; }; -static int pbr_rule_lookup_unique_walker(struct hash_backet *b, void *data) +static int pbr_rule_lookup_unique_walker(struct hash_bucket *b, void *data) { struct pbr_rule_unique_lookup *pul = data; struct zebra_pbr_rule *rule = b->data; @@ -461,7 +461,7 @@ void zebra_pbr_del_rule(struct zebra_pbr_rule *rule) __PRETTY_FUNCTION__); } -static void zebra_pbr_cleanup_rules(struct hash_backet *b, void *data) +static void zebra_pbr_cleanup_rules(struct hash_bucket *b, void *data) { struct zebra_pbr_rule *rule = b->data; int *sock = data; @@ -473,7 +473,7 @@ static void zebra_pbr_cleanup_rules(struct hash_backet *b, void *data) } } -static void zebra_pbr_cleanup_ipset(struct hash_backet *b, void *data) +static void zebra_pbr_cleanup_ipset(struct hash_bucket *b, void *data) { struct zebra_pbr_ipset *ipset = b->data; int *sock = data; @@ -484,7 +484,7 @@ static void zebra_pbr_cleanup_ipset(struct hash_backet *b, void *data) } } -static void zebra_pbr_cleanup_ipset_entry(struct hash_backet *b, void *data) +static void zebra_pbr_cleanup_ipset_entry(struct hash_bucket *b, void *data) { struct zebra_pbr_ipset_entry *ipset = b->data; int *sock = data; @@ -495,7 +495,7 @@ static void zebra_pbr_cleanup_ipset_entry(struct hash_backet *b, void *data) } } -static void zebra_pbr_cleanup_iptable(struct hash_backet *b, void *data) +static void zebra_pbr_cleanup_iptable(struct hash_bucket *b, void *data) { struct zebra_pbr_iptable *iptable = b->data; int *sock = data; @@ -576,11 +576,11 @@ const char *zebra_pbr_ipset_type2str(uint32_t type) "Unrecognized IPset Type"); } -static int zebra_pbr_ipset_pername_walkcb(struct hash_backet *backet, void *arg) +static int zebra_pbr_ipset_pername_walkcb(struct hash_bucket *bucket, void *arg) { struct pbr_ipset_name_lookup *pinl = (struct pbr_ipset_name_lookup *)arg; - struct zebra_pbr_ipset *zpi = (struct zebra_pbr_ipset *)backet->data; + struct zebra_pbr_ipset *zpi = (struct zebra_pbr_ipset *)bucket->data; if (!strncmp(pinl->ipset_name, zpi->ipset_name, ZEBRA_IPSET_NAME_SIZE)) { @@ -874,7 +874,7 @@ static void zebra_pbr_display_port(struct vty *vty, uint32_t filter_bm, } } -static int zebra_pbr_show_ipset_entry_walkcb(struct hash_backet *backet, +static int zebra_pbr_show_ipset_entry_walkcb(struct hash_bucket *bucket, void *arg) { struct zebra_pbr_ipset_entry_unique_display *unique = @@ -882,7 +882,7 @@ static int zebra_pbr_show_ipset_entry_walkcb(struct hash_backet *backet, struct zebra_pbr_ipset *zpi = unique->zpi; struct vty *vty = unique->vty; struct zebra_pbr_ipset_entry *zpie = - (struct zebra_pbr_ipset_entry *)backet->data; + (struct zebra_pbr_ipset_entry *)bucket->data; uint64_t pkts = 0, bytes = 0; int ret = 0; @@ -949,11 +949,11 @@ static int zebra_pbr_show_ipset_entry_walkcb(struct hash_backet *backet, return HASHWALK_CONTINUE; } -static int zebra_pbr_show_ipset_walkcb(struct hash_backet *backet, void *arg) +static int zebra_pbr_show_ipset_walkcb(struct hash_bucket *bucket, void *arg) { struct zebra_pbr_env_display *uniqueipset = (struct zebra_pbr_env_display *)arg; - struct zebra_pbr_ipset *zpi = (struct zebra_pbr_ipset *)backet->data; + struct zebra_pbr_ipset *zpi = (struct zebra_pbr_ipset *)bucket->data; struct zebra_pbr_ipset_entry_unique_display unique; struct vty *vty = uniqueipset->vty; struct zebra_ns *zns = uniqueipset->zns; @@ -1026,12 +1026,12 @@ struct pbr_rule_fwmark_lookup { uint32_t fwmark; }; -static int zebra_pbr_rule_lookup_fwmark_walkcb(struct hash_backet *backet, +static int zebra_pbr_rule_lookup_fwmark_walkcb(struct hash_bucket *bucket, void *arg) { struct pbr_rule_fwmark_lookup *iprule = (struct pbr_rule_fwmark_lookup *)arg; - struct zebra_pbr_rule *zpr = (struct zebra_pbr_rule *)backet->data; + struct zebra_pbr_rule *zpr = (struct zebra_pbr_rule *)bucket->data; if (iprule->fwmark == zpr->rule.filter.fwmark) { iprule->ptr = zpr; @@ -1117,10 +1117,10 @@ static void zebra_pbr_show_iptable_unit(struct zebra_pbr_iptable *iptable, } } -static int zebra_pbr_show_iptable_walkcb(struct hash_backet *backet, void *arg) +static int zebra_pbr_show_iptable_walkcb(struct hash_bucket *bucket, void *arg) { struct zebra_pbr_iptable *iptable = - (struct zebra_pbr_iptable *)backet->data; + (struct zebra_pbr_iptable *)bucket->data; struct zebra_pbr_env_display *env = (struct zebra_pbr_env_display *)arg; struct vty *vty = env->vty; struct zebra_ns *zns = env->zns; diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b71bf77df2..5f9210109d 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1879,8 +1879,6 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) goto done; } - route_unlock_node(rn); - srcdest_rnode_prefixes(rn, &dest_pfx, &src_pfx); op = dplane_ctx_get_op(ctx); @@ -2065,6 +2063,9 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx) } done: + if (rn) + route_unlock_node(rn); + /* Return context to dataplane module */ dplane_ctx_fini(&ctx); } diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 560cd89abd..464b1f1716 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -65,19 +65,19 @@ DEFINE_MTYPE_STATIC(ZEBRA, NEIGH, "VNI Neighbor"); static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p, uint16_t cmd); static void zvni_print_neigh(zebra_neigh_t *n, void *ctxt, json_object *json); -static void zvni_print_neigh_hash(struct hash_backet *backet, void *ctxt); -static void zvni_print_dad_neigh_hash(struct hash_backet *backet, void *ctxt); -static void zvni_print_neigh_hash_all_vni(struct hash_backet *backet, +static void zvni_print_neigh_hash(struct hash_bucket *bucket, void *ctxt); +static void zvni_print_dad_neigh_hash(struct hash_bucket *bucket, void *ctxt); +static void zvni_print_neigh_hash_all_vni(struct hash_bucket *bucket, void **args); static void zl3vni_print_nh(zebra_neigh_t *n, struct vty *vty, json_object *json); static void zl3vni_print_rmac(zebra_mac_t *zrmac, struct vty *vty, json_object *json); static void zvni_print_mac(zebra_mac_t *mac, void *ctxt, json_object *json); -static void zvni_print_mac_hash(struct hash_backet *backet, void *ctxt); -static void zvni_print_mac_hash_all_vni(struct hash_backet *backet, void *ctxt); +static void zvni_print_mac_hash(struct hash_bucket *bucket, void *ctxt); +static void zvni_print_mac_hash_all_vni(struct hash_bucket *bucket, void *ctxt); static void zvni_print(zebra_vni_t *zvni, void **ctxt); -static void zvni_print_hash(struct hash_backet *backet, void *ctxt[]); +static void zvni_print_hash(struct hash_bucket *bucket, void *ctxt[]); static int zvni_macip_send_msg_to_client(vni_t vni, struct ethaddr *macaddr, struct ipaddr *ip, uint8_t flags, @@ -117,7 +117,7 @@ static int zl3vni_nh_install(zebra_l3vni_t *zl3vni, zebra_neigh_t *n); static int zl3vni_nh_uninstall(zebra_l3vni_t *zl3vni, zebra_neigh_t *n); /* l3-vni rmac related APIs */ -static void zl3vni_print_rmac_hash(struct hash_backet *, void *); +static void zl3vni_print_rmac_hash(struct hash_bucket *, void *); static zebra_mac_t *zl3vni_rmac_lookup(zebra_l3vni_t *zl3vni, struct ethaddr *rmac); static void *zl3vni_rmac_alloc(void *p); @@ -155,7 +155,7 @@ static zebra_vni_t *zvni_map_vlan(struct interface *ifp, struct interface *br_if, vlanid_t vid); static int zvni_mac_install(zebra_vni_t *zvni, zebra_mac_t *mac); static int zvni_mac_uninstall(zebra_vni_t *zvni, zebra_mac_t *mac); -static void zvni_install_mac_hash(struct hash_backet *backet, void *ctxt); +static void zvni_install_mac_hash(struct hash_bucket *bucket, void *ctxt); static unsigned int vni_hash_keymake(void *p); static void *zvni_alloc(void *p); @@ -257,7 +257,7 @@ static uint32_t num_valid_macs(zebra_vni_t *zvni) unsigned int i; uint32_t num_macs = 0; struct hash *hash; - struct hash_backet *hb; + struct hash_bucket *hb; zebra_mac_t *mac; hash = zvni->mac_table; @@ -281,7 +281,7 @@ static uint32_t num_dup_detected_macs(zebra_vni_t *zvni) unsigned int i; uint32_t num_macs = 0; struct hash *hash; - struct hash_backet *hb; + struct hash_bucket *hb; zebra_mac_t *mac; hash = zvni->mac_table; @@ -303,7 +303,7 @@ static uint32_t num_dup_detected_neighs(zebra_vni_t *zvni) unsigned int i; uint32_t num_neighs = 0; struct hash *hash; - struct hash_backet *hb; + struct hash_bucket *hb; zebra_neigh_t *nbr; hash = zvni->neigh_table; @@ -674,14 +674,14 @@ static void zebra_vxlan_dup_addr_detect_for_neigh(struct zebra_vrf *zvrf, * display - just because we're dealing with IPv6 addresses that can * widely vary. */ -static void zvni_find_neigh_addr_width(struct hash_backet *backet, void *ctxt) +static void zvni_find_neigh_addr_width(struct hash_bucket *bucket, void *ctxt) { zebra_neigh_t *n; char buf[INET6_ADDRSTRLEN]; struct neigh_walk_ctx *wctx = ctxt; int width; - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; ipaddr2str(&n->ip, buf, sizeof(buf)); width = strlen(buf); @@ -791,7 +791,7 @@ static void zvni_print_neigh(zebra_neigh_t *n, void *ctxt, json_object *json) /* * Print neighbor hash entry - called for display of all neighbors. */ -static void zvni_print_neigh_hash(struct hash_backet *backet, void *ctxt) +static void zvni_print_neigh_hash(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; json_object *json_vni = NULL, *json_row = NULL; @@ -803,7 +803,7 @@ static void zvni_print_neigh_hash(struct hash_backet *backet, void *ctxt) vty = wctx->vty; json_vni = wctx->json; - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; if (json_vni) json_row = json_object_new_object(); @@ -887,7 +887,7 @@ static void zvni_print_neigh_hash(struct hash_backet *backet, void *ctxt) /* * Print neighbor hash entry in detail - called for display of all neighbors. */ -static void zvni_print_neigh_hash_detail(struct hash_backet *backet, void *ctxt) +static void zvni_print_neigh_hash_detail(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; json_object *json_vni = NULL, *json_row = NULL; @@ -897,7 +897,7 @@ static void zvni_print_neigh_hash_detail(struct hash_backet *backet, void *ctxt) vty = wctx->vty; json_vni = wctx->json; - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; if (!n) return; @@ -914,7 +914,7 @@ static void zvni_print_neigh_hash_detail(struct hash_backet *backet, void *ctxt) /* * Print neighbors for all VNI. */ -static void zvni_print_neigh_hash_all_vni(struct hash_backet *backet, +static void zvni_print_neigh_hash_all_vni(struct hash_bucket *bucket, void **args) { struct vty *vty; @@ -929,7 +929,7 @@ static void zvni_print_neigh_hash_all_vni(struct hash_backet *backet, json = (json_object *)args[1]; print_dup = (uint32_t)(uintptr_t)args[2]; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; num_neigh = hashcount(zvni->neigh_table); @@ -978,35 +978,35 @@ static void zvni_print_neigh_hash_all_vni(struct hash_backet *backet, json_object_object_add(json, vni_str, json_vni); } -static void zvni_print_dad_neigh_hash(struct hash_backet *backet, void *ctxt) +static void zvni_print_dad_neigh_hash(struct hash_bucket *bucket, void *ctxt) { zebra_neigh_t *nbr; - nbr = (zebra_neigh_t *)backet->data; + nbr = (zebra_neigh_t *)bucket->data; if (!nbr) return; if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE)) - zvni_print_neigh_hash(backet, ctxt); + zvni_print_neigh_hash(bucket, ctxt); } -static void zvni_print_dad_neigh_hash_detail(struct hash_backet *backet, +static void zvni_print_dad_neigh_hash_detail(struct hash_bucket *bucket, void *ctxt) { zebra_neigh_t *nbr; - nbr = (zebra_neigh_t *)backet->data; + nbr = (zebra_neigh_t *)bucket->data; if (!nbr) return; if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE)) - zvni_print_neigh_hash_detail(backet, ctxt); + zvni_print_neigh_hash_detail(bucket, ctxt); } /* * Print neighbors for all VNIs in detail. */ -static void zvni_print_neigh_hash_all_vni_detail(struct hash_backet *backet, +static void zvni_print_neigh_hash_all_vni_detail(struct hash_bucket *bucket, void **args) { struct vty *vty; @@ -1021,7 +1021,7 @@ static void zvni_print_neigh_hash_all_vni_detail(struct hash_backet *backet, json = (json_object *)args[1]; print_dup = (uint32_t)(uintptr_t)args[2]; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; if (!zvni) { if (json) vty_out(vty, "{}\n"); @@ -1318,7 +1318,7 @@ static void zvni_print_mac(zebra_mac_t *mac, void *ctxt, json_object *json) /* * Print MAC hash entry - called for display of all MACs. */ -static void zvni_print_mac_hash(struct hash_backet *backet, void *ctxt) +static void zvni_print_mac_hash(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; json_object *json_mac_hdr = NULL, *json_mac = NULL; @@ -1328,7 +1328,7 @@ static void zvni_print_mac_hash(struct hash_backet *backet, void *ctxt) vty = wctx->vty; json_mac_hdr = wctx->json; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; prefix_mac2str(&mac->macaddr, buf1, sizeof(buf1)); @@ -1424,22 +1424,22 @@ static void zvni_print_mac_hash(struct hash_backet *backet, void *ctxt) } /* Print Duplicate MAC */ -static void zvni_print_dad_mac_hash(struct hash_backet *backet, void *ctxt) +static void zvni_print_dad_mac_hash(struct hash_bucket *bucket, void *ctxt) { zebra_mac_t *mac; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; if (!mac) return; if (CHECK_FLAG(mac->flags, ZEBRA_MAC_DUPLICATE)) - zvni_print_mac_hash(backet, ctxt); + zvni_print_mac_hash(bucket, ctxt); } /* * Print MAC hash entry in detail - called for display of all MACs. */ -static void zvni_print_mac_hash_detail(struct hash_backet *backet, void *ctxt) +static void zvni_print_mac_hash_detail(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; json_object *json_mac_hdr = NULL; @@ -1449,7 +1449,7 @@ static void zvni_print_mac_hash_detail(struct hash_backet *backet, void *ctxt) vty = wctx->vty; json_mac_hdr = wctx->json; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; if (!mac) return; @@ -1460,23 +1460,23 @@ static void zvni_print_mac_hash_detail(struct hash_backet *backet, void *ctxt) } /* Print Duplicate MAC in detail */ -static void zvni_print_dad_mac_hash_detail(struct hash_backet *backet, +static void zvni_print_dad_mac_hash_detail(struct hash_bucket *bucket, void *ctxt) { zebra_mac_t *mac; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; if (!mac) return; if (CHECK_FLAG(mac->flags, ZEBRA_MAC_DUPLICATE)) - zvni_print_mac_hash_detail(backet, ctxt); + zvni_print_mac_hash_detail(bucket, ctxt); } /* * Print MACs for all VNI. */ -static void zvni_print_mac_hash_all_vni(struct hash_backet *backet, void *ctxt) +static void zvni_print_mac_hash_all_vni(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; json_object *json = NULL, *json_vni = NULL; @@ -1489,7 +1489,7 @@ static void zvni_print_mac_hash_all_vni(struct hash_backet *backet, void *ctxt) vty = (struct vty *)wctx->vty; json = (struct json_object *)wctx->json; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; wctx->zvni = zvni; /*We are iterating over a new VNI, set the count to 0*/ @@ -1546,7 +1546,7 @@ static void zvni_print_mac_hash_all_vni(struct hash_backet *backet, void *ctxt) /* * Print MACs in detail for all VNI. */ -static void zvni_print_mac_hash_all_vni_detail(struct hash_backet *backet, +static void zvni_print_mac_hash_all_vni_detail(struct hash_bucket *bucket, void *ctxt) { struct vty *vty; @@ -1560,7 +1560,7 @@ static void zvni_print_mac_hash_all_vni_detail(struct hash_backet *backet, vty = (struct vty *)wctx->vty; json = (struct json_object *)wctx->json; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; if (!zvni) { if (json) vty_out(vty, "{}\n"); @@ -1609,7 +1609,7 @@ static void zvni_print_mac_hash_all_vni_detail(struct hash_backet *backet, } } -static void zl3vni_print_nh_hash(struct hash_backet *backet, void *ctx) +static void zl3vni_print_nh_hash(struct hash_bucket *bucket, void *ctx) { struct nh_walk_ctx *wctx = NULL; struct vty *vty = NULL; @@ -1624,7 +1624,7 @@ static void zl3vni_print_nh_hash(struct hash_backet *backet, void *ctx) json_vni = wctx->json; if (json_vni) json_nh = json_object_new_object(); - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; if (!json_vni) { vty_out(vty, "%-15s %-17s\n", @@ -1642,7 +1642,7 @@ static void zl3vni_print_nh_hash(struct hash_backet *backet, void *ctx) } } -static void zl3vni_print_nh_hash_all_vni(struct hash_backet *backet, +static void zl3vni_print_nh_hash_all_vni(struct hash_bucket *bucket, void **args) { struct vty *vty = NULL; @@ -1656,7 +1656,7 @@ static void zl3vni_print_nh_hash_all_vni(struct hash_backet *backet, vty = (struct vty *)args[0]; json = (struct json_object *)args[1]; - zl3vni = (zebra_l3vni_t *)backet->data; + zl3vni = (zebra_l3vni_t *)bucket->data; num_nh = hashcount(zl3vni->nh_table); if (!num_nh) @@ -1681,7 +1681,7 @@ static void zl3vni_print_nh_hash_all_vni(struct hash_backet *backet, json_object_object_add(json, vni_str, json_vni); } -static void zl3vni_print_rmac_hash_all_vni(struct hash_backet *backet, +static void zl3vni_print_rmac_hash_all_vni(struct hash_bucket *bucket, void **args) { struct vty *vty = NULL; @@ -1695,7 +1695,7 @@ static void zl3vni_print_rmac_hash_all_vni(struct hash_backet *backet, vty = (struct vty *)args[0]; json = (struct json_object *)args[1]; - zl3vni = (zebra_l3vni_t *)backet->data; + zl3vni = (zebra_l3vni_t *)bucket->data; num_rmacs = hashcount(zl3vni->rmac_table); if (!num_rmacs) @@ -1724,7 +1724,7 @@ static void zl3vni_print_rmac_hash_all_vni(struct hash_backet *backet, json_object_object_add(json, vni_str, json_vni); } -static void zl3vni_print_rmac_hash(struct hash_backet *backet, void *ctx) +static void zl3vni_print_rmac_hash(struct hash_bucket *bucket, void *ctx) { zebra_mac_t *zrmac = NULL; struct rmac_walk_ctx *wctx = NULL; @@ -1738,7 +1738,7 @@ static void zl3vni_print_rmac_hash(struct hash_backet *backet, void *ctx) json = wctx->json; if (json) json_rmac = json_object_new_object(); - zrmac = (zebra_mac_t *)backet->data; + zrmac = (zebra_mac_t *)bucket->data; if (!json) { vty_out(vty, "%-17s %-21s\n", @@ -1904,7 +1904,7 @@ static void zvni_print(zebra_vni_t *zvni, void **ctxt) } /* print a L3 VNI hash entry */ -static void zl3vni_print_hash(struct hash_backet *backet, void *ctx[]) +static void zl3vni_print_hash(struct hash_bucket *bucket, void *ctx[]) { struct vty *vty = NULL; json_object *json = NULL; @@ -1914,7 +1914,7 @@ static void zl3vni_print_hash(struct hash_backet *backet, void *ctx[]) vty = (struct vty *)ctx[0]; json = (json_object *)ctx[1]; - zl3vni = (zebra_l3vni_t *)backet->data; + zl3vni = (zebra_l3vni_t *)bucket->data; if (!json) { vty_out(vty, "%-10u %-4s %-21s %-8lu %-8lu %-15s %-37s\n", @@ -1950,7 +1950,7 @@ struct zvni_evpn_show { }; /* print a L3 VNI hash entry in detail*/ -static void zl3vni_print_hash_detail(struct hash_backet *backet, void *data) +static void zl3vni_print_hash_detail(struct hash_bucket *bucket, void *data) { struct vty *vty = NULL; zebra_l3vni_t *zl3vni = NULL; @@ -1964,7 +1964,7 @@ static void zl3vni_print_hash_detail(struct hash_backet *backet, void *data) if (json) use_json = true; - zl3vni = (zebra_l3vni_t *)backet->data; + zl3vni = (zebra_l3vni_t *)bucket->data; zebra_vxlan_print_vni(vty, zes->zvrf, zl3vni->vni, use_json); vty_out(vty, "\n"); @@ -1974,7 +1974,7 @@ static void zl3vni_print_hash_detail(struct hash_backet *backet, void *data) /* * Print a VNI hash entry - called for display of all VNIs. */ -static void zvni_print_hash(struct hash_backet *backet, void *ctxt[]) +static void zvni_print_hash(struct hash_bucket *bucket, void *ctxt[]) { struct vty *vty; zebra_vni_t *zvni; @@ -1990,7 +1990,7 @@ static void zvni_print_hash(struct hash_backet *backet, void *ctxt[]) vty = ctxt[0]; json = ctxt[1]; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; zvtep = zvni->vteps; while (zvtep) { @@ -2038,7 +2038,7 @@ static void zvni_print_hash(struct hash_backet *backet, void *ctxt[]) /* * Print a VNI hash entry in detail - called for display of all VNIs. */ -static void zvni_print_hash_detail(struct hash_backet *backet, void *data) +static void zvni_print_hash_detail(struct hash_bucket *bucket, void *data) { struct vty *vty; zebra_vni_t *zvni; @@ -2052,7 +2052,7 @@ static void zvni_print_hash_detail(struct hash_backet *backet, void *data) if (json) use_json = true; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; zebra_vxlan_print_vni(vty, zes->zvrf, zvni->vni, use_json); vty_out(vty, "\n"); @@ -2224,10 +2224,10 @@ static int zvni_neigh_del(zebra_vni_t *zvni, zebra_neigh_t *n) /* * Free neighbor hash entry (callback) */ -static void zvni_neigh_del_hash_entry(struct hash_backet *backet, void *arg) +static void zvni_neigh_del_hash_entry(struct hash_bucket *bucket, void *arg) { struct neigh_walk_ctx *wctx = arg; - zebra_neigh_t *n = backet->data; + zebra_neigh_t *n = bucket->data; if (((wctx->flags & DEL_LOCAL_NEIGH) && (n->flags & ZEBRA_NEIGH_LOCAL)) || ((wctx->flags & DEL_REMOTE_NEIGH) @@ -2557,12 +2557,12 @@ static int zvni_neigh_probe(zebra_vni_t *zvni, zebra_neigh_t *n) /* * Install neighbor hash entry - called upon access VLAN change. */ -static void zvni_install_neigh_hash(struct hash_backet *backet, void *ctxt) +static void zvni_install_neigh_hash(struct hash_bucket *bucket, void *ctxt) { zebra_neigh_t *n; struct neigh_walk_ctx *wctx = ctxt; - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_REMOTE)) zvni_neigh_install(wctx->zvni, n); @@ -2819,7 +2819,7 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni, return 0; } -static void zvni_gw_macip_del_for_vni_hash(struct hash_backet *backet, +static void zvni_gw_macip_del_for_vni_hash(struct hash_bucket *bucket, void *ctxt) { zebra_vni_t *zvni = NULL; @@ -2830,7 +2830,7 @@ static void zvni_gw_macip_del_for_vni_hash(struct hash_backet *backet, struct interface *ifp; /* Add primary SVI MAC*/ - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; ifp = zvni->vxlan_if; if (!ifp) @@ -2859,7 +2859,7 @@ static void zvni_gw_macip_del_for_vni_hash(struct hash_backet *backet, return; } -static void zvni_gw_macip_add_for_vni_hash(struct hash_backet *backet, +static void zvni_gw_macip_add_for_vni_hash(struct hash_bucket *bucket, void *ctxt) { zebra_vni_t *zvni = NULL; @@ -2869,7 +2869,7 @@ static void zvni_gw_macip_add_for_vni_hash(struct hash_backet *backet, struct interface *vrr_if = NULL; struct interface *ifp = NULL; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; ifp = zvni->vxlan_if; if (!ifp) @@ -2899,7 +2899,7 @@ static void zvni_gw_macip_add_for_vni_hash(struct hash_backet *backet, return; } -static void zvni_svi_macip_del_for_vni_hash(struct hash_backet *backet, +static void zvni_svi_macip_del_for_vni_hash(struct hash_bucket *bucket, void *ctxt) { zebra_vni_t *zvni = NULL; @@ -2909,7 +2909,7 @@ static void zvni_svi_macip_del_for_vni_hash(struct hash_backet *backet, struct interface *ifp; /* Add primary SVI MAC*/ - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; if (!zvni) return; @@ -3320,10 +3320,10 @@ static int zvni_mac_del(zebra_vni_t *zvni, zebra_mac_t *mac) /* * Free MAC hash entry (callback) */ -static void zvni_mac_del_hash_entry(struct hash_backet *backet, void *arg) +static void zvni_mac_del_hash_entry(struct hash_bucket *bucket, void *arg) { struct mac_walk_ctx *wctx = arg; - zebra_mac_t *mac = backet->data; + zebra_mac_t *mac = bucket->data; if (((wctx->flags & DEL_LOCAL_MAC) && (mac->flags & ZEBRA_MAC_LOCAL)) || ((wctx->flags & DEL_REMOTE_MAC) @@ -3664,12 +3664,12 @@ static int zvni_mac_uninstall(zebra_vni_t *zvni, zebra_mac_t *mac) /* * Install MAC hash entry - called upon access VLAN change. */ -static void zvni_install_mac_hash(struct hash_backet *backet, void *ctxt) +static void zvni_install_mac_hash(struct hash_bucket *bucket, void *ctxt) { zebra_mac_t *mac; struct mac_walk_ctx *wctx = ctxt; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; if (CHECK_FLAG(mac->flags, ZEBRA_MAC_REMOTE)) zvni_mac_install(wctx->zvni, mac); @@ -4142,13 +4142,13 @@ static int zvni_vtep_uninstall(zebra_vni_t *zvni, struct in_addr *vtep_ip) * Install or uninstall flood entries in the kernel corresponding to * remote VTEPs. This is invoked upon change to BUM handling. */ -static void zvni_handle_flooding_remote_vteps(struct hash_backet *backet, +static void zvni_handle_flooding_remote_vteps(struct hash_bucket *bucket, void *zvrf) { zebra_vni_t *zvni; zebra_vtep_t *zvtep; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; if (!zvni) return; @@ -4163,13 +4163,13 @@ static void zvni_handle_flooding_remote_vteps(struct hash_backet *backet, /* * Cleanup VNI/VTEP and update kernel */ -static void zvni_cleanup_all(struct hash_backet *backet, void *arg) +static void zvni_cleanup_all(struct hash_bucket *bucket, void *arg) { zebra_vni_t *zvni = NULL; zebra_l3vni_t *zl3vni = NULL; struct zebra_vrf *zvrf = (struct zebra_vrf *)arg; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; /* remove from l3-vni list */ if (zvrf->l3vni) @@ -4189,11 +4189,11 @@ static void zvni_cleanup_all(struct hash_backet *backet, void *arg) } /* cleanup L3VNI */ -static void zl3vni_cleanup_all(struct hash_backet *backet, void *args) +static void zl3vni_cleanup_all(struct hash_bucket *bucket, void *args) { zebra_l3vni_t *zl3vni = NULL; - zl3vni = (zebra_l3vni_t *)backet->data; + zl3vni = (zebra_l3vni_t *)bucket->data; zebra_vxlan_process_l3vni_oper_down(zl3vni); } @@ -4944,9 +4944,9 @@ static void zebra_vxlan_process_l3vni_oper_down(zebra_l3vni_t *zl3vni) zl3vni_send_del_to_client(zl3vni); } -static void zvni_add_to_l3vni_list(struct hash_backet *backet, void *ctxt) +static void zvni_add_to_l3vni_list(struct hash_bucket *bucket, void *ctxt) { - zebra_vni_t *zvni = (zebra_vni_t *)backet->data; + zebra_vni_t *zvni = (zebra_vni_t *)bucket->data; zebra_l3vni_t *zl3vni = (zebra_l3vni_t *)ctxt; if (zvni->vrf_id == zl3vni_vrf_id(zl3vni)) @@ -5007,24 +5007,24 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni, } /* delete and uninstall rmac hash entry */ -static void zl3vni_del_rmac_hash_entry(struct hash_backet *backet, void *ctx) +static void zl3vni_del_rmac_hash_entry(struct hash_bucket *bucket, void *ctx) { zebra_mac_t *zrmac = NULL; zebra_l3vni_t *zl3vni = NULL; - zrmac = (zebra_mac_t *)backet->data; + zrmac = (zebra_mac_t *)bucket->data; zl3vni = (zebra_l3vni_t *)ctx; zl3vni_rmac_uninstall(zl3vni, zrmac); zl3vni_rmac_del(zl3vni, zrmac); } /* delete and uninstall nh hash entry */ -static void zl3vni_del_nh_hash_entry(struct hash_backet *backet, void *ctx) +static void zl3vni_del_nh_hash_entry(struct hash_bucket *bucket, void *ctx) { zebra_neigh_t *n = NULL; zebra_l3vni_t *zl3vni = NULL; - n = (zebra_neigh_t *)backet->data; + n = (zebra_neigh_t *)bucket->data; zl3vni = (zebra_l3vni_t *)ctx; zl3vni_nh_uninstall(zl3vni, n); zl3vni_nh_del(zl3vni, n); @@ -5770,7 +5770,7 @@ void zebra_vxlan_print_rmacs_all_l3vni(struct vty *vty, bool use_json) args[0] = vty; args[1] = json; hash_iterate(zrouter.l3vni_table, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))zl3vni_print_rmac_hash_all_vni, args); @@ -5887,7 +5887,7 @@ void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, bool use_json) args[0] = vty; args[1] = json; hash_iterate(zrouter.l3vni_table, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))zl3vni_print_nh_hash_all_vni, args); @@ -6048,7 +6048,7 @@ void zebra_vxlan_print_neigh_all_vni(struct vty *vty, struct zebra_vrf *zvrf, args[2] = (void *)(ptrdiff_t)print_dup; hash_iterate(zvrf->vni_table, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))zvni_print_neigh_hash_all_vni, args); if (use_json) { @@ -6079,7 +6079,7 @@ void zebra_vxlan_print_neigh_all_vni_detail(struct vty *vty, args[2] = (void *)(ptrdiff_t)print_dup; hash_iterate(zvrf->vni_table, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))zvni_print_neigh_hash_all_vni_detail, args); if (use_json) { @@ -6641,7 +6641,7 @@ int zebra_vxlan_clear_dup_detect_vni_ip(struct vty *vty, return CMD_SUCCESS; } -static void zvni_clear_dup_mac_hash(struct hash_backet *backet, void *ctxt) +static void zvni_clear_dup_mac_hash(struct hash_bucket *bucket, void *ctxt) { struct mac_walk_ctx *wctx = ctxt; zebra_mac_t *mac; @@ -6649,7 +6649,7 @@ static void zvni_clear_dup_mac_hash(struct hash_backet *backet, void *ctxt) struct listnode *node = NULL; zebra_neigh_t *nbr = NULL; - mac = (zebra_mac_t *)backet->data; + mac = (zebra_mac_t *)bucket->data; if (!mac) return; @@ -6696,14 +6696,14 @@ static void zvni_clear_dup_mac_hash(struct hash_backet *backet, void *ctxt) } } -static void zvni_clear_dup_neigh_hash(struct hash_backet *backet, void *ctxt) +static void zvni_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt) { struct neigh_walk_ctx *wctx = ctxt; zebra_neigh_t *nbr; zebra_vni_t *zvni; char buf[INET6_ADDRSTRLEN]; - nbr = (zebra_neigh_t *)backet->data; + nbr = (zebra_neigh_t *)bucket->data; if (!nbr) return; @@ -6736,7 +6736,7 @@ static void zvni_clear_dup_neigh_hash(struct hash_backet *backet, void *ctxt) } } -static void zvni_clear_dup_detect_hash_vni_all(struct hash_backet *backet, +static void zvni_clear_dup_detect_hash_vni_all(struct hash_bucket *bucket, void **args) { struct vty *vty; @@ -6745,7 +6745,7 @@ static void zvni_clear_dup_detect_hash_vni_all(struct hash_backet *backet, struct mac_walk_ctx m_wctx; struct neigh_walk_ctx n_wctx; - zvni = (zebra_vni_t *)backet->data; + zvni = (zebra_vni_t *)bucket->data; if (!zvni) return; @@ -6783,7 +6783,7 @@ int zebra_vxlan_clear_dup_detect_vni_all(struct vty *vty, args[1] = zvrf; hash_iterate(zvrf->vni_table, - (void (*)(struct hash_backet *, void *)) + (void (*)(struct hash_bucket *, void *)) zvni_clear_dup_detect_hash_vni_all, args); return CMD_SUCCESS; @@ -7009,12 +7009,12 @@ void zebra_vxlan_print_vnis(struct vty *vty, struct zebra_vrf *zvrf, /* Display all L2-VNIs */ hash_iterate(zvrf->vni_table, - (void (*)(struct hash_backet *, void *))zvni_print_hash, + (void (*)(struct hash_bucket *, void *))zvni_print_hash, args); /* Display all L3-VNIs */ hash_iterate(zrouter.l3vni_table, - (void (*)(struct hash_backet *, void *))zl3vni_print_hash, + (void (*)(struct hash_bucket *, void *))zl3vni_print_hash, args); if (use_json) { @@ -7092,13 +7092,13 @@ void zebra_vxlan_print_vnis_detail(struct vty *vty, struct zebra_vrf *zvrf, zes.zvrf = zvrf; /* Display all L2-VNIs */ - hash_iterate(zvrf->vni_table, (void (*)(struct hash_backet *, + hash_iterate(zvrf->vni_table, (void (*)(struct hash_bucket *, void *))zvni_print_hash_detail, &zes); /* Display all L3-VNIs */ hash_iterate(zrouter.l3vni_table, - (void (*)(struct hash_backet *, + (void (*)(struct hash_bucket *, void *))zl3vni_print_hash_detail, &zes); |
