From 09da832c9799647f78ee8d1af34d9dd629ea7570 Mon Sep 17 00:00:00 2001 From: Quentin Armitage Date: Sat, 7 Nov 2015 18:39:56 +0000 Subject: Don't report error on interface creation/deletion netlink_reflect_filter was returning an error if it didn't already know about an interface that has just been created. If we don't know about the interface, simply ignore it. Likewise on interface deletion, if we don't know about the interface, ignore it. Signed-off-by: Quentin Armitage (cherry picked from commit 8aa1eca389238e6f637b5637e7f53de83821ec23) --- keepalived/vrrp/vrrp_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keepalived/vrrp/vrrp_netlink.c b/keepalived/vrrp/vrrp_netlink.c index dfa082f..96f885c 100644 --- a/keepalived/vrrp/vrrp_netlink.c +++ b/keepalived/vrrp/vrrp_netlink.c @@ -664,10 +664,10 @@ netlink_reflect_filter(struct sockaddr_nl *snl, struct nlmsghdr *h) if (ifi->ifi_type == ARPHRD_LOOPBACK) return 0; - /* find the interface_t */ + /* find the interface_t. Ignore it if we don't know about the interface */ ifp = if_get_by_ifindex(ifi->ifi_index); if (!ifp) - return -1; + return 0; /* * Update flags. -- 1.7.12.1