mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:11:36 +00:00
Merge branch 'pr4392'
... with an extra space character added. Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
commit
fa468cd946
@ -121,12 +121,6 @@ static struct log_ref ferr_bgp_warn[] = {
|
|||||||
.description = "BGP attempted to setup TCP MD5 configuration on the socket as per configuration but was unable to",
|
.description = "BGP attempted to setup TCP MD5 configuration on the socket as per configuration but was unable to",
|
||||||
.suggestion = "Please collect log files and open Issue",
|
.suggestion = "Please collect log files and open Issue",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.code = EC_BGP_NO_SOCKOPT_MARK,
|
|
||||||
.title = "Unable to set socket MARK option",
|
|
||||||
.description = "BGP attempted to set the SO_MARK option for a socket and was unable to do so",
|
|
||||||
.suggestion = "Please collect log files and open Issue",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.code = EC_BGP_EVPN_PMSI_PRESENT,
|
.code = EC_BGP_EVPN_PMSI_PRESENT,
|
||||||
.title = "BGP Received a EVPN NLRI with PMSI included",
|
.title = "BGP Received a EVPN NLRI with PMSI included",
|
||||||
|
@ -88,7 +88,6 @@ enum bgp_log_refs {
|
|||||||
EC_BGP_UPDATE_PACKET_LONG,
|
EC_BGP_UPDATE_PACKET_LONG,
|
||||||
EC_BGP_UNRECOGNIZED_CAPABILITY,
|
EC_BGP_UNRECOGNIZED_CAPABILITY,
|
||||||
EC_BGP_NO_TCP_MD5,
|
EC_BGP_NO_TCP_MD5,
|
||||||
EC_BGP_NO_SOCKOPT_MARK,
|
|
||||||
EC_BGP_EVPN_PMSI_PRESENT,
|
EC_BGP_EVPN_PMSI_PRESENT,
|
||||||
EC_BGP_EVPN_VPN_VNI,
|
EC_BGP_EVPN_VPN_VNI,
|
||||||
EC_BGP_EVPN_ESI,
|
EC_BGP_EVPN_ESI,
|
||||||
|
@ -588,8 +588,6 @@ static int bgp_update_source(struct peer *peer)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DATAPLANE_MARK 254 /* main table ID */
|
|
||||||
|
|
||||||
/* BGP try to connect to the peer. */
|
/* BGP try to connect to the peer. */
|
||||||
int bgp_connect(struct peer *peer)
|
int bgp_connect(struct peer *peer)
|
||||||
{
|
{
|
||||||
@ -619,10 +617,6 @@ int bgp_connect(struct peer *peer)
|
|||||||
|
|
||||||
sockopt_reuseaddr(peer->fd);
|
sockopt_reuseaddr(peer->fd);
|
||||||
sockopt_reuseport(peer->fd);
|
sockopt_reuseport(peer->fd);
|
||||||
if (sockopt_mark_default(peer->fd, DATAPLANE_MARK, &bgpd_privs) < 0)
|
|
||||||
flog_warn(EC_BGP_NO_SOCKOPT_MARK,
|
|
||||||
"Unable to set mark on FD for peer %s, err=%s",
|
|
||||||
peer->host, safe_strerror(errno));
|
|
||||||
|
|
||||||
#ifdef IPTOS_PREC_INTERNETCONTROL
|
#ifdef IPTOS_PREC_INTERNETCONTROL
|
||||||
frr_elevate_privs(&bgpd_privs) {
|
frr_elevate_privs(&bgpd_privs) {
|
||||||
|
@ -10909,11 +10909,11 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
|
|||||||
if (p->password)
|
if (p->password)
|
||||||
vty_out(vty, "Peer Authentication Enabled\n");
|
vty_out(vty, "Peer Authentication Enabled\n");
|
||||||
|
|
||||||
vty_out(vty, "Read thread: %s Write thread: %s\n",
|
vty_out(vty, "Read thread: %s Write thread: %s FD used: %d\n",
|
||||||
p->t_read ? "on" : "off",
|
p->t_read ? "on" : "off",
|
||||||
CHECK_FLAG(p->thread_flags, PEER_THREAD_WRITES_ON)
|
CHECK_FLAG(p->thread_flags, PEER_THREAD_WRITES_ON)
|
||||||
? "on"
|
? "on"
|
||||||
: "off");
|
: "off", p->fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->notify.code == BGP_NOTIFY_OPEN_ERR
|
if (p->notify.code == BGP_NOTIFY_OPEN_ERR
|
||||||
|
@ -414,6 +414,22 @@ Terminal Mode Commands
|
|||||||
(view) show [ip] bgp l2vpn evpn all overlay
|
(view) show [ip] bgp l2vpn evpn all overlay
|
||||||
...
|
...
|
||||||
|
|
||||||
|
.. _common-show-commands:
|
||||||
|
|
||||||
|
.. index:: show thread cpu
|
||||||
|
.. clicmd:: show thread cpu [r|w|t|e|x]
|
||||||
|
|
||||||
|
This command displays system run statistics for all the different event
|
||||||
|
types. If no options is specified all different run types are displayed
|
||||||
|
together. Additionally you can ask to look at (r)ead, (w)rite, (t)imer,
|
||||||
|
(e)vent and e(x)ecute thread event types.
|
||||||
|
|
||||||
|
.. index:: show thread poll
|
||||||
|
.. clicmd:: show thread poll
|
||||||
|
|
||||||
|
This command displays FRR's poll data. It allows a glimpse into how
|
||||||
|
we are setting each individual fd for the poll command at that point
|
||||||
|
in time.
|
||||||
|
|
||||||
.. _common-invocation-options:
|
.. _common-invocation-options:
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ Basic Setup
|
|||||||
After installing FRR, some basic configuration must be completed before it is
|
After installing FRR, some basic configuration must be completed before it is
|
||||||
ready to use.
|
ready to use.
|
||||||
|
|
||||||
Daemons File
|
Daemons Configuration File
|
||||||
------------
|
--------------------------
|
||||||
After a fresh install, starting FRR will do nothing. This is because daemons
|
After a fresh install, starting FRR will do nothing. This is because daemons
|
||||||
must be explicitly enabled by editing a file in your configuration directory.
|
must be explicitly enabled by editing a file in your configuration directory.
|
||||||
This file is usually located at :file:`/etc/frr/daemons` and determines which
|
This file is usually located at :file:`/etc/frr/daemons` and determines which
|
||||||
@ -34,19 +34,6 @@ systemd. The file initially looks like this:
|
|||||||
bfdd=no
|
bfdd=no
|
||||||
fabricd=no
|
fabricd=no
|
||||||
|
|
||||||
To enable a particular daemon, simply change the corresponding 'no' to 'yes'.
|
|
||||||
Subsequent service restarts should start the daemon.
|
|
||||||
|
|
||||||
Daemons Configuration File
|
|
||||||
--------------------------
|
|
||||||
There is another file that controls the default options passed to daemons when
|
|
||||||
starting FRR as a service. This file is located in your configuration
|
|
||||||
directory, usually at :file:`/etc/frr/daemons`.
|
|
||||||
|
|
||||||
This file has several parts. Here is an example:
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# If this option is set the /etc/init.d/frr script automatically loads
|
# If this option is set the /etc/init.d/frr script automatically loads
|
||||||
# the config via "vtysh -b" when the servers are started.
|
# the config via "vtysh -b" when the servers are started.
|
||||||
@ -71,6 +58,7 @@ This file has several parts. Here is an example:
|
|||||||
bfdd_options=" --daemon -A 127.0.0.1"
|
bfdd_options=" --daemon -A 127.0.0.1"
|
||||||
fabricd_options=" --daemon -A 127.0.0.1"
|
fabricd_options=" --daemon -A 127.0.0.1"
|
||||||
|
|
||||||
|
#MAX_FDS=1024
|
||||||
# The list of daemons to watch is automatically generated by the init script.
|
# The list of daemons to watch is automatically generated by the init script.
|
||||||
#watchfrr_options=""
|
#watchfrr_options=""
|
||||||
|
|
||||||
@ -83,6 +71,13 @@ This file has several parts. Here is an example:
|
|||||||
|
|
||||||
Breaking this file down:
|
Breaking this file down:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
bgpd=yes
|
||||||
|
|
||||||
|
To enable a particular daemon, simply change the corresponding 'no' to 'yes'.
|
||||||
|
Subsequent service restarts should start the daemon.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
vtysh_enable=yes
|
vtysh_enable=yes
|
||||||
@ -91,6 +86,16 @@ As the comment says, this causes :ref:`VTYSH <vty-shell>` to apply
|
|||||||
configuration when starting the daemons. This is useful for a variety of
|
configuration when starting the daemons. This is useful for a variety of
|
||||||
reasons touched on in the VTYSH documentation and should generally be enabled.
|
reasons touched on in the VTYSH documentation and should generally be enabled.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
MAX_FDS=1024
|
||||||
|
|
||||||
|
This allows the operator to control the number of open file descriptors
|
||||||
|
each daemon is allowed to start with. The current assumed value on
|
||||||
|
most operating systems is 1024. If the operator plans to run bgp with
|
||||||
|
several thousands of peers than this is where we would modify FRR to
|
||||||
|
allow this to happen.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
|
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
|
||||||
|
@ -366,21 +366,6 @@ int sockopt_cork(int sock, int onoff)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sockopt_mark_default(int sock, int mark, struct zebra_privs_t *cap)
|
|
||||||
{
|
|
||||||
#ifdef SO_MARK
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
frr_elevate_privs(cap) {
|
|
||||||
ret = setsockopt(sock, SOL_SOCKET, SO_MARK, &mark,
|
|
||||||
sizeof(mark));
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int sockopt_minttl(int family, int sock, int minttl)
|
int sockopt_minttl(int family, int sock, int minttl)
|
||||||
{
|
{
|
||||||
#ifdef IP_MINTTL
|
#ifdef IP_MINTTL
|
||||||
|
@ -93,7 +93,6 @@ extern int sockunion_bind(int sock, union sockunion *, unsigned short,
|
|||||||
extern int sockopt_ttl(int family, int sock, int ttl);
|
extern int sockopt_ttl(int family, int sock, int ttl);
|
||||||
extern int sockopt_minttl(int family, int sock, int minttl);
|
extern int sockopt_minttl(int family, int sock, int minttl);
|
||||||
extern int sockopt_cork(int sock, int onoff);
|
extern int sockopt_cork(int sock, int onoff);
|
||||||
extern int sockopt_mark_default(int sock, int mark, struct zebra_privs_t *);
|
|
||||||
extern int sockunion_socket(const union sockunion *su);
|
extern int sockunion_socket(const union sockunion *su);
|
||||||
extern const char *inet_sutop(const union sockunion *su, char *str);
|
extern const char *inet_sutop(const union sockunion *su, char *str);
|
||||||
extern enum connect_result sockunion_connect(int fd, const union sockunion *su,
|
extern enum connect_result sockunion_connect(int fd, const union sockunion *su,
|
||||||
|
@ -281,7 +281,7 @@ DEFUN (show_thread_cpu,
|
|||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Thread information\n"
|
||||||
"Thread CPU usage\n"
|
"Thread CPU usage\n"
|
||||||
"Display filter (rwtexb)\n")
|
"Display filter (rwtex)\n")
|
||||||
{
|
{
|
||||||
uint8_t filter = (uint8_t)-1U;
|
uint8_t filter = (uint8_t)-1U;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@ -312,7 +312,8 @@ static void show_thread_poll_helper(struct vty *vty, struct thread_master *m)
|
|||||||
|
|
||||||
vty_out(vty, "\nShowing poll FD's for %s\n", name);
|
vty_out(vty, "\nShowing poll FD's for %s\n", name);
|
||||||
vty_out(vty, "----------------------%s\n", underline);
|
vty_out(vty, "----------------------%s\n", underline);
|
||||||
vty_out(vty, "Count: %u\n", (uint32_t)m->handler.pfdcount);
|
vty_out(vty, "Count: %u/%d\n", (uint32_t)m->handler.pfdcount,
|
||||||
|
m->fd_limit);
|
||||||
for (i = 0; i < m->handler.pfdcount; i++)
|
for (i = 0; i < m->handler.pfdcount; i++)
|
||||||
vty_out(vty, "\t%6d fd:%6d events:%2d revents:%2d\n", i,
|
vty_out(vty, "\t%6d fd:%6d events:%2d revents:%2d\n", i,
|
||||||
m->handler.pfds[i].fd,
|
m->handler.pfds[i].fd,
|
||||||
|
@ -56,6 +56,14 @@ bfdd_options=" -A 127.0.0.1"
|
|||||||
fabricd_options="-A 127.0.0.1"
|
fabricd_options="-A 127.0.0.1"
|
||||||
vrrpd_options=" -A 127.0.0.1"
|
vrrpd_options=" -A 127.0.0.1"
|
||||||
|
|
||||||
|
#
|
||||||
|
# This is the maximum number of FD's that will be available.
|
||||||
|
# Upon startup this is read by the control files and ulimit
|
||||||
|
# is called. Uncomment and use a reasonable value for your
|
||||||
|
# setup if you are expecting a large number of peers in
|
||||||
|
# say BGP.
|
||||||
|
#MAX_FDS=1024
|
||||||
|
|
||||||
# The list of daemons to watch is automatically generated by the init script.
|
# The list of daemons to watch is automatically generated by the init script.
|
||||||
#watchfrr_options=""
|
#watchfrr_options=""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user