naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0055-bridge-add-calls-to-fflush-in-fdb-and-mdb-print-func.patch

4aca6e
From 284eed75d40124e365c49b3412441d31b9d70784 Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:11:52 +0100
4aca6e
Subject: [PATCH] bridge: add calls to fflush in fdb and mdb print functions
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit 4d45bf3bafa69
4aca6e
4aca6e
commit 4d45bf3bafa6960720193dbf57042a3b43b73868
4aca6e
Author: Wilson Kok <wkok@cumulusnetworks.com>
4aca6e
Date:   Thu Oct 15 14:53:17 2015 -0700
4aca6e
4aca6e
    bridge: add calls to fflush in fdb and mdb print functions
4aca6e
4aca6e
    This patch adds fflush in fdb and mdb print functions
4aca6e
4aca6e
    Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
4aca6e
    Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
4aca6e
---
4aca6e
 bridge/fdb.c | 2 ++
4aca6e
 bridge/mdb.c | 2 ++
4aca6e
 2 files changed, 4 insertions(+)
4aca6e
4aca6e
diff --git a/bridge/fdb.c b/bridge/fdb.c
4aca6e
index edf621c..8a706d8 100644
4aca6e
--- a/bridge/fdb.c
4aca6e
+++ b/bridge/fdb.c
4aca6e
@@ -162,6 +162,8 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
4aca6e
 		fprintf(fp, "offload ");
4aca6e
 
4aca6e
 	fprintf(fp, "%s\n", state_n2a(r->ndm_state));
4aca6e
+	fflush(fp);
4aca6e
+
4aca6e
 	return 0;
4aca6e
 }
4aca6e
 
4aca6e
diff --git a/bridge/mdb.c b/bridge/mdb.c
4aca6e
index b14bd01..24c4903 100644
4aca6e
--- a/bridge/mdb.c
4aca6e
+++ b/bridge/mdb.c
4aca6e
@@ -135,6 +135,8 @@ int print_mdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
4aca6e
 		}
4aca6e
 	}
4aca6e
 
4aca6e
+	fflush(fp);
4aca6e
+
4aca6e
 	return 0;
4aca6e
 }
4aca6e
 
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e