Skip to content
Snippets Groups Projects
Commit f03cb68e authored by chrissi^'s avatar chrissi^
Browse files

gluon-radv-filterd: Increase timeout when calling `ebtables`


A popen of `ebtables` can block, when there is already another instance
running.
This timeout was intended to be 1 second.
So we should wait at least that long.

Signed-off-by: default avatarChris Fiege <cfi@pengutronix.de>
parent 3a2e50d0
No related branches found
No related tags found
No related merge requests found
......@@ -53,8 +53,8 @@
// seconds). Re-read it from the transtable afterwards.
#define ORIGINATOR_CACHE_TTL 300
// max execution time of a single ebtables call in nanoseconds
#define EBTABLES_TIMEOUT 500000000 // 500ms
// max execution time of a single ebtables call in seconds
#define EBTABLES_TIMEOUT 2
// TQ value assigned to local routers
#define LOCAL_TQ 512
......@@ -143,7 +143,7 @@ static int timespec_diff(struct timespec *tv1, struct timespec *tv2,
static void cleanup(void) {
struct router *router;
struct timespec timeout = {
.tv_nsec = EBTABLES_TIMEOUT,
.tv_sec = EBTABLES_TIMEOUT,
};
close(G.sock);
......@@ -658,7 +658,7 @@ static void update_tqs(void) {
static void update_redirect(void) {
struct router *router;
struct timespec timeout = {
.tv_nsec = EBTABLES_TIMEOUT,
.tv_sec = EBTABLES_TIMEOUT,
};
foreach(router, G.routers) {
......@@ -770,7 +770,7 @@ static bool election_required(void)
static void update_ebtables(void) {
struct timespec timeout = {
.tv_nsec = EBTABLES_TIMEOUT,
.tv_sec = EBTABLES_TIMEOUT,
};
char mac[F_MAC_LEN + 1];
struct router *router;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment