diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:47:21 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:47:21 +0200 |
commit | fc9a856f7051b9e5ffd1cf0938ca2be20388a95f (patch) | |
tree | b7e776b34f27c8476feca6b5e90348b2db1f1b5f /bgpd/bgp_nexthop.h | |
parent | zebra: zebra-nht-routemap.patch (diff) | |
download | frr-fc9a856f7051b9e5ffd1cf0938ca2be20388a95f.tar.xz frr-fc9a856f7051b9e5ffd1cf0938ca2be20388a95f.zip |
bgpd-nht-connected-route.patch
BGP: Use next hop tracking for connected routes too
And cleanup obsolete code in bgp_scan and bgp_import.
Diffstat (limited to 'bgpd/bgp_nexthop.h')
-rw-r--r-- | bgpd/bgp_nexthop.h | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/bgpd/bgp_nexthop.h b/bgpd/bgp_nexthop.h index abcf24263..4d582465f 100644 --- a/bgpd/bgp_nexthop.h +++ b/bgpd/bgp_nexthop.h @@ -25,21 +25,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "queue.h" #include "prefix.h" -#define BGP_SCAN_INTERVAL_DEFAULT 60 -#define BGP_IMPORT_INTERVAL_DEFAULT 15 - /* BGP nexthop cache value structure. */ struct bgp_nexthop_cache { - /* This nexthop exists in IGP. */ - u_char valid; - - /* Nexthop is changed. */ - u_char changed; - - /* Nexthop is changed. */ - u_char metricchanged; - /* IGP route's metric. */ u_int32_t metric; @@ -49,26 +37,28 @@ struct bgp_nexthop_cache time_t last_update; u_int16_t flags; -#define BGP_NEXTHOP_VALID (1 << 0) -#define BGP_NEXTHOP_REGISTERED (1 << 1) +#define BGP_NEXTHOP_VALID (1 << 0) +#define BGP_NEXTHOP_REGISTERED (1 << 1) +#define BGP_NEXTHOP_CONNECTED (1 << 2) +#define BGP_NEXTHOP_PEER_NOTIFIED (1 << 3) u_int16_t change_flags; -#define BGP_NEXTHOP_CHANGED (1 << 0) -#define BGP_NEXTHOP_METRIC_CHANGED (1 << 1) +#define BGP_NEXTHOP_CHANGED (1 << 0) +#define BGP_NEXTHOP_METRIC_CHANGED (1 << 1) +#define BGP_NEXTHOP_CONNECTED_CHANGED (1 << 2) struct bgp_node *node; + void *nht_info; /* In BGP, peer session */ LIST_HEAD(path_list, bgp_info) paths; unsigned int path_count; }; -extern void bgp_scan_init (void); -extern void bgp_scan_finish (void); extern int bgp_nexthop_lookup (afi_t, struct peer *peer, struct bgp_info *, int *, int *); extern void bgp_connected_add (struct connected *c); extern void bgp_connected_delete (struct connected *c); -extern int bgp_multiaccess_check_v4 (struct in_addr, char *); +extern int bgp_multiaccess_check_v4 (struct in_addr, struct peer *); extern int bgp_config_write_scan_time (struct vty *); extern int bgp_nexthop_onlink (afi_t, struct attr *); extern int bgp_nexthop_self (struct attr *); |