[PATCH 09/17] BUGFIX: check for existence of ifup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



added an additional check for existence of the ifup operation.
If it does not exist, just skip it.

Signed-off-by: Jens Osterkamp <jens@xxxxxxxxxxxxxxxxxx>
---
 config.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c
index 5cfac83..26afe3b 100644
--- a/config.c
+++ b/config.c
@@ -370,8 +370,10 @@ void init_ports(void)
 		} else if (check_link_status(p->if_name)) {
 			add_adapter(p->if_name);
 
-			LIST_FOREACH(np, &lldp_head, lldp)
-				np->ops->lldp_mod_ifup(p->if_name);
+			LIST_FOREACH(np, &lldp_head, lldp) {
+				if (np->ops->lldp_mod_ifup)
+					np->ops->lldp_mod_ifup(p->if_name);
+			}
 			set_lldp_port_enable_state(p->if_name, 1);
 		}
 		p++;
-- 
1.7.1

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux