summaryrefslogtreecommitdiffstats
path: root/lib/sockunion.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-06-12 16:59:11 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-06-12 16:59:11 +0200
commited40466af80c9d0b88436c637a1d54b28a669b1c (patch)
treeb092d22e9591da81776a56006dc2883f445b0ddd /lib/sockunion.h
parentThis patch changes BGP from only listening mode for BFD status updates to int... (diff)
downloadfrr-ed40466af80c9d0b88436c637a1d54b28a669b1c.tar.xz
frr-ed40466af80c9d0b88436c637a1d54b28a669b1c.zip
bgpd-set-somark.patch
BGP: Set SO_MARK on connecting sockets to ensure lookup in right routing table In the presence of a function such as management VRF/MRF, bgpd needs to be able to specify that it intends to run in the dataplane and not the front panel. To ensure this, we add a mark in the connecting socket so that the kernel does the routing lookup in the right table. This assumes that an appropriate ip rule has been configured (outside the scope of this package). While we've forced the mark to be 254 for now, it maybe required to make it configurable at a later time.
Diffstat (limited to 'lib/sockunion.h')
-rw-r--r--lib/sockunion.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sockunion.h b/lib/sockunion.h
index 8f0a9be37..78356e4cb 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -23,6 +23,8 @@
#ifndef _ZEBRA_SOCKUNION_H
#define _ZEBRA_SOCKUNION_H
+#include "privs.h"
+
#if 0
union sockunion {
struct sockinet {
@@ -99,6 +101,7 @@ extern int sockunion_bind (int sock, union sockunion *,
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 (union sockunion *su);
extern const char *inet_sutop (union sockunion *su, char *str);
extern enum connect_result sockunion_connect (int fd, union sockunion *su,