mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-07 09:04:21 +00:00
bgpd, lib: Remove SO_MARK
The SO_MARK socket option was being used pre vrf to allow for the
separation of the front panel -vs- the management port. This
was facilitated by a ip rule. Since this is undocumented anywhere
in our system( other than old commits see
ed40466af8 ). We should remove this
because this will cause interference with people using rules
and are not aware of this offshoot of functionality.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
cac9e917eb
commit
51da389626
@ -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",
|
||||
.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,
|
||||
.title = "BGP Received a EVPN NLRI with PMSI included",
|
||||
|
||||
@ -88,7 +88,6 @@ enum bgp_log_refs {
|
||||
EC_BGP_UPDATE_PACKET_LONG,
|
||||
EC_BGP_UNRECOGNIZED_CAPABILITY,
|
||||
EC_BGP_NO_TCP_MD5,
|
||||
EC_BGP_NO_SOCKOPT_MARK,
|
||||
EC_BGP_EVPN_PMSI_PRESENT,
|
||||
EC_BGP_EVPN_VPN_VNI,
|
||||
EC_BGP_EVPN_ESI,
|
||||
|
||||
@ -588,8 +588,6 @@ static int bgp_update_source(struct peer *peer)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define DATAPLANE_MARK 254 /* main table ID */
|
||||
|
||||
/* BGP try to connect to the peer. */
|
||||
int bgp_connect(struct peer *peer)
|
||||
{
|
||||
@ -619,10 +617,6 @@ int bgp_connect(struct peer *peer)
|
||||
|
||||
sockopt_reuseaddr(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
|
||||
frr_elevate_privs(&bgpd_privs) {
|
||||
|
||||
@ -366,21 +366,6 @@ int sockopt_cork(int sock, int onoff)
|
||||
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)
|
||||
{
|
||||
#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_minttl(int family, int sock, int minttl);
|
||||
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 const char *inet_sutop(const union sockunion *su, char *str);
|
||||
extern enum connect_result sockunion_connect(int fd, const union sockunion *su,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user