mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 20:59:42 +00:00

CM-10435 Issue: IBGP BFD sessions are created as multi-hop even though peer is single-hop away. This is causing an interop issue with ICOS. Root Cause: By design all IBGP peers are registered with BFD as multi-hop. Fix: • Changed the default behavior of always treating IBGP BFD sessions as mult-hop. shared_network variable is used to determine whether the IBGP peer is single hop or multi-hop away. The logic for determining whether EBGP peer is single hop or multi-hop has not been changed. • Since the default behavior has been changed, it will cause interop issues between 2.5 and 3.0 IBGP BFD sessions. A new hidden command “bfd multihop/singlehop” has been introduced to overcome the interop issues. dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd <2-255> Detect Multiplier <cr> dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# no neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# do show running-config ! router bgp 100 neighbor igroup peer-group neighbor igroup bfd 5 500 500 neighbor igroup bfd multihop neighbor 30.0.2.2 remote-as 100 neighbor 30.0.2.2 peer-group igroup neighbor 3101🔤bcad::2 remote-as 100 neighbor 3101🔤bcad::2 peer-group igroup neighbor 30.0.2.6 remote-as 200 neighbor 30.0.2.6 bfd multihop neighbor 3102🔤bcad::6 remote-as 200 neighbor 3102🔤bcad::6 bfd neighbor 3102🔤bcad::6 ebgp-multihop 255 ! CM-10260 Issue: “Unable to connect to socket” message keeps getting logged when ptmd process doesn’t exist. Root Cause: BFD clients (bgpd, ospfd and ospf6d) during initialization try to register with BFD/PTM by default. This results in continuous logging If PTM does not exist since there is no max on number of retries. Fix: • Stop the retries to connect to PTM after max reconnect timer of 5 mins is reached. • Added zebra debug event wrapper to message logging to prevent it from showing by default. CM-4541 Issue: Addition of a new command "ptm-enable" or "no ptm-enable" per interface to enable/disable PTM link status checks for an interface. Fix: Currently there is only one ptm-enable global command that enables/disables PTM status updates for all interfaces. This new command will give the handle to individually stop interface from reacting on the PTM status updates. • by default interface uses the ptm-enable global configuration • "no ptm-enable" on an interface will disable PTM status updates from taking affect for that interface. This can bring the interface up if it was brought down due to PTM status update. • "ptm-enable" on an interface will cause the interface to fallback to the global ptm-enable configuration value and will bring the interface up or down based on the last stored PTM status update if global ptm is enabled. Ticket: CM-10435, CM-10260 and CM-4541 Signed-off-by: Radhika Mahankali Reviewed-by: Donald Sharp, Kanna Rajagopal
260 lines
8.2 KiB
C
260 lines
8.2 KiB
C
/* Interface function header.
|
|
* Copyright (C) 1999 Kunihiro Ishiguro
|
|
*
|
|
* This file is part of GNU Zebra.
|
|
*
|
|
* GNU Zebra 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, or (at your option) any
|
|
* later version.
|
|
*
|
|
* GNU Zebra 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 GNU Zebra; see the file COPYING. If not, write to the Free
|
|
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef _ZEBRA_INTERFACE_H
|
|
#define _ZEBRA_INTERFACE_H
|
|
|
|
#include "redistribute.h"
|
|
#include "vrf.h"
|
|
|
|
#ifdef HAVE_IRDP
|
|
#include "zebra/irdp.h"
|
|
#endif
|
|
|
|
/* For interface multicast configuration. */
|
|
#define IF_ZEBRA_MULTICAST_UNSPEC 0
|
|
#define IF_ZEBRA_MULTICAST_ON 1
|
|
#define IF_ZEBRA_MULTICAST_OFF 2
|
|
|
|
/* For interface shutdown configuration. */
|
|
#define IF_ZEBRA_SHUTDOWN_OFF 0
|
|
#define IF_ZEBRA_SHUTDOWN_ON 1
|
|
|
|
#if defined (HAVE_RTADV)
|
|
/* Router advertisement parameter. From RFC4861, RFC6275 and RFC4191. */
|
|
struct rtadvconf
|
|
{
|
|
/* A flag indicating whether or not the router sends periodic Router
|
|
Advertisements and responds to Router Solicitations.
|
|
Default: FALSE */
|
|
int AdvSendAdvertisements;
|
|
|
|
/* The maximum time allowed between sending unsolicited multicast
|
|
Router Advertisements from the interface, in milliseconds.
|
|
MUST be no less than 70 ms [RFC6275 7.5] and no greater
|
|
than 1800000 ms [RFC4861 6.2.1].
|
|
|
|
Default: 600000 milliseconds */
|
|
int MaxRtrAdvInterval;
|
|
#define RTADV_MAX_RTR_ADV_INTERVAL 600000
|
|
|
|
/* The minimum time allowed between sending unsolicited multicast
|
|
Router Advertisements from the interface, in milliseconds.
|
|
MUST be no less than 30 ms [RFC6275 7.5].
|
|
MUST be no greater than .75 * MaxRtrAdvInterval.
|
|
|
|
Default: 0.33 * MaxRtrAdvInterval */
|
|
int MinRtrAdvInterval; /* This field is currently unused. */
|
|
#define RTADV_MIN_RTR_ADV_INTERVAL (0.33 * RTADV_MAX_RTR_ADV_INTERVAL)
|
|
|
|
/* Unsolicited Router Advertisements' interval timer. */
|
|
int AdvIntervalTimer;
|
|
|
|
/* The TRUE/FALSE value to be placed in the "Managed address
|
|
configuration" flag field in the Router Advertisement. See
|
|
[ADDRCONF].
|
|
|
|
Default: FALSE */
|
|
int AdvManagedFlag;
|
|
|
|
|
|
/* The TRUE/FALSE value to be placed in the "Other stateful
|
|
configuration" flag field in the Router Advertisement. See
|
|
[ADDRCONF].
|
|
|
|
Default: FALSE */
|
|
int AdvOtherConfigFlag;
|
|
|
|
/* The value to be placed in MTU options sent by the router. A
|
|
value of zero indicates that no MTU options are sent.
|
|
|
|
Default: 0 */
|
|
int AdvLinkMTU;
|
|
|
|
|
|
/* The value to be placed in the Reachable Time field in the Router
|
|
Advertisement messages sent by the router. The value zero means
|
|
unspecified (by this router). MUST be no greater than 3,600,000
|
|
milliseconds (1 hour).
|
|
|
|
Default: 0 */
|
|
u_int32_t AdvReachableTime;
|
|
#define RTADV_MAX_REACHABLE_TIME 3600000
|
|
|
|
|
|
/* The value to be placed in the Retrans Timer field in the Router
|
|
Advertisement messages sent by the router. The value zero means
|
|
unspecified (by this router).
|
|
|
|
Default: 0 */
|
|
int AdvRetransTimer;
|
|
|
|
/* The default value to be placed in the Cur Hop Limit field in the
|
|
Router Advertisement messages sent by the router. The value
|
|
should be set to that current diameter of the Internet. The
|
|
value zero means unspecified (by this router).
|
|
|
|
Default: The value specified in the "Assigned Numbers" RFC
|
|
[ASSIGNED] that was in effect at the time of implementation. */
|
|
int AdvCurHopLimit;
|
|
|
|
/* The value to be placed in the Router Lifetime field of Router
|
|
Advertisements sent from the interface, in seconds. MUST be
|
|
either zero or between MaxRtrAdvInterval and 9000 seconds. A
|
|
value of zero indicates that the router is not to be used as a
|
|
default router.
|
|
|
|
Default: 3 * MaxRtrAdvInterval */
|
|
int AdvDefaultLifetime;
|
|
#define RTADV_MAX_RTRLIFETIME 9000 /* 2.5 hours */
|
|
|
|
/* A list of prefixes to be placed in Prefix Information options in
|
|
Router Advertisement messages sent from the interface.
|
|
|
|
Default: all prefixes that the router advertises via routing
|
|
protocols as being on-link for the interface from which the
|
|
advertisement is sent. The link-local prefix SHOULD NOT be
|
|
included in the list of advertised prefixes. */
|
|
struct list *AdvPrefixList;
|
|
|
|
/* The TRUE/FALSE value to be placed in the "Home agent"
|
|
flag field in the Router Advertisement. See [RFC6275 7.1].
|
|
|
|
Default: FALSE */
|
|
int AdvHomeAgentFlag;
|
|
#ifndef ND_RA_FLAG_HOME_AGENT
|
|
#define ND_RA_FLAG_HOME_AGENT 0x20
|
|
#endif
|
|
|
|
/* The value to be placed in Home Agent Information option if Home
|
|
Flag is set.
|
|
Default: 0 */
|
|
int HomeAgentPreference;
|
|
|
|
/* The value to be placed in Home Agent Information option if Home
|
|
Flag is set. Lifetime (seconds) MUST not be greater than 18.2
|
|
hours.
|
|
The value 0 has special meaning: use of AdvDefaultLifetime value.
|
|
|
|
Default: 0 */
|
|
int HomeAgentLifetime;
|
|
#define RTADV_MAX_HALIFETIME 65520 /* 18.2 hours */
|
|
|
|
/* The TRUE/FALSE value to insert or not an Advertisement Interval
|
|
option. See [RFC 6275 7.3]
|
|
|
|
Default: FALSE */
|
|
int AdvIntervalOption;
|
|
|
|
/* The value to be placed in the Default Router Preference field of
|
|
a router advertisement. See [RFC 4191 2.1 & 2.2]
|
|
|
|
Default: 0 (medium) */
|
|
int DefaultPreference;
|
|
#define RTADV_PREF_MEDIUM 0x0 /* Per RFC4191. */
|
|
};
|
|
|
|
#endif /* HAVE_RTADV */
|
|
|
|
/* `zebra' daemon local interface structure. */
|
|
struct zebra_if
|
|
{
|
|
/* Shutdown configuration. */
|
|
u_char shutdown;
|
|
|
|
/* Multicast configuration. */
|
|
u_char multicast;
|
|
|
|
/* Router advertise configuration. */
|
|
u_char rtadv_enable;
|
|
|
|
/* Installed addresses chains tree. */
|
|
struct route_table *ipv4_subnets;
|
|
|
|
/* Information about up/down changes */
|
|
unsigned int up_count;
|
|
char up_last[QUAGGA_TIMESTAMP_LEN];
|
|
unsigned int down_count;
|
|
char down_last[QUAGGA_TIMESTAMP_LEN];
|
|
|
|
#if defined(HAVE_RTADV)
|
|
struct rtadvconf rtadv;
|
|
#endif /* HAVE_RTADV */
|
|
|
|
#ifdef HAVE_IRDP
|
|
struct irdp_interface irdp;
|
|
#endif
|
|
|
|
#ifdef SUNOS_5
|
|
/* the real IFF_UP state of the primary interface.
|
|
* need this to differentiate between all interfaces being
|
|
* down (but primary still plumbed) and primary having gone
|
|
* ~IFF_UP, and all addresses gone.
|
|
*/
|
|
u_char primary_state;
|
|
#endif /* SUNOS_5 */
|
|
|
|
/* ptm enable configuration */
|
|
u_char ptm_enable;
|
|
};
|
|
|
|
|
|
extern struct interface *if_lookup_by_index_per_ns (struct zebra_ns *, u_int32_t);
|
|
extern struct interface *if_link_per_ns (struct zebra_ns *, struct interface *);
|
|
extern const char *ifindex2ifname_per_ns (struct zebra_ns *, unsigned int);
|
|
|
|
extern void if_unlink_per_ns (struct interface *);
|
|
extern void if_nbr_ipv6ll_to_ipv4ll_neigh_update (struct interface *ifp,
|
|
struct in6_addr *address, int add);
|
|
extern void if_nbr_ipv6ll_to_ipv4ll_neigh_del_all (struct interface *ifp);
|
|
extern void if_delete_update (struct interface *ifp);
|
|
extern void if_add_update (struct interface *ifp);
|
|
extern void if_up (struct interface *);
|
|
extern void if_down (struct interface *);
|
|
extern void if_refresh (struct interface *);
|
|
extern void if_flags_update (struct interface *, uint64_t);
|
|
extern int if_subnet_add (struct interface *, struct connected *);
|
|
extern int if_subnet_delete (struct interface *, struct connected *);
|
|
extern int ipv6_address_configured (struct interface *ifp);
|
|
extern void if_handle_vrf_change (struct interface *ifp, vrf_id_t vrf_id);
|
|
|
|
extern void vrf_add_update (struct vrf *vrfp);
|
|
|
|
#ifdef HAVE_PROC_NET_DEV
|
|
extern void ifstat_update_proc (void);
|
|
#endif /* HAVE_PROC_NET_DEV */
|
|
#ifdef HAVE_NET_RT_IFLIST
|
|
extern void ifstat_update_sysctl (void);
|
|
|
|
#endif /* HAVE_NET_RT_IFLIST */
|
|
#ifdef HAVE_PROC_NET_DEV
|
|
extern int interface_list_proc (void);
|
|
#endif /* HAVE_PROC_NET_DEV */
|
|
#ifdef HAVE_PROC_NET_IF_INET6
|
|
extern int ifaddr_proc_ipv6 (void);
|
|
#endif /* HAVE_PROC_NET_IF_INET6 */
|
|
|
|
#ifdef BSDI
|
|
extern int if_kvm_get_mtu (struct interface *);
|
|
#endif /* BSDI */
|
|
|
|
#endif /* _ZEBRA_INTERFACE_H */
|