summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 08:30:53 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 08:35:35 -0400
commit51da3896265c601f79f765122e73304cf0943f70 (patch)
treec7ca7bfcaf15e9ff724ca4a2c52ffd4c5be855f6
parentcac9e917ebcf8551f2fe05295ddeeae69a352f5f (diff)
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 ed40466af80c9d0b88436c637a1d54b28a669b1c ). 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>
-rw-r--r--bgpd/bgp_errors.c6
-rw-r--r--bgpd/bgp_errors.h1
-rw-r--r--bgpd/bgp_network.c6
-rw-r--r--lib/sockunion.c15
-rw-r--r--lib/sockunion.h1
5 files changed, 0 insertions, 29 deletions
diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c
index 753ee6baf1..6e181697d6 100644
--- a/bgpd/bgp_errors.c
+++ b/bgpd/bgp_errors.c
@@ -122,12 +122,6 @@ static struct log_ref ferr_bgp_warn[] = {
.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",
.description = "BGP has received a type-3 NLRI with PMSI information. At this time FRR is not capable of properly handling this NLRI type",
diff --git a/bgpd/bgp_errors.h b/bgpd/bgp_errors.h
index 13bd318e27..39d043ff13 100644
--- a/bgpd/bgp_errors.h
+++ b/bgpd/bgp_errors.h
@@ -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,
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 6a5c2c4b38..8e18ed7529 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -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) {
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 5afd10eb48..8fa9a3fad9 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -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
diff --git a/lib/sockunion.h b/lib/sockunion.h
index b996735550..7091c1b5e7 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -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,