lldpad/lldpad-0.9.41-lldpad-initialize-ports-after-netlink-interface-is-c.patch
2011-04-21 09:10:21 +02:00

46 lines
1.3 KiB
Diff

From aa0294cd1a48ea34180be4d7235b4b13f9c6418b Mon Sep 17 00:00:00 2001
From: John Fastabend <john.r.fastabend@intel.com>
Date: Wed, 6 Apr 2011 08:48:31 -0700
Subject: [PATCH 47/51] lldpad: initialize ports after netlink interface is
created
Initialize netlink interface before ports are initialized. This
resolves an issue where an interface comes up after init_ports()
runs but before the netlinnk interface is up. In this case
we were missing a netlink ifup event. This can be seen on boot
occasionally.
Reported-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Petr Sabata <psabata@redhat.com>
---
lldpad.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lldpad.c b/lldpad.c
index 8a5df5b..3a4a721 100644
--- a/lldpad.c
+++ b/lldpad.c
@@ -393,15 +393,15 @@ int main(int argc, char *argv[])
exit(1);
}
- /* Find available interfaces and add adapters */
- init_ports();
-
/* setup event RT netlink interface */
if (event_iface_init() < 0) {
LLDPAD_ERR("failed to register event interface\n");
exit(1);
}
+ /* Find available interfaces and add adapters */
+ init_ports();
+
if (ctrl_iface_register(clifd) < 0) {
if (!daemonize)
fprintf(stderr, "failed to register control interface\n");
--
1.7.4.4