]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - keepalived/patches/keepalived-1.2.7-remove-debug-messages.patch
keepalived: Update to 1.2.7.
[people/ms/ipfire-3.x.git] / keepalived / patches / keepalived-1.2.7-remove-debug-messages.patch
1 From fd8665b424457accfa37703d4c9456be22ab8b53 Mon Sep 17 00:00:00 2001
2 From: Ryan O'Hara <rohara@redhat.com>
3 Date: Mon, 10 Dec 2012 13:25:01 -0600
4 Subject: [PATCH 10/10] Remove log_message calls from if_get_by_ifname.
5
6 The if_get_by_ifname function would log a message if either the
7 if_queue list was empty or if the interface name was not present in
8 the list. Since if_get_by_ifname is called to check for the existence
9 of an interface before adding it to the list, the "No such interface"
10 message is logged whenever adding a new interface to this list. This
11 is normal but can be confusing. Since if_get_by_ifname returns NULL
12 when the interface does not exist, the caller should be responsible
13 for logging any error messages.
14
15 Signed-off-by: Ryan O'Hara <rohara@redhat.com>
16 ---
17 keepalived/vrrp/vrrp_if.c | 6 +-----
18 1 files changed, 1 insertions(+), 5 deletions(-)
19
20 diff --git a/keepalived/vrrp/vrrp_if.c b/keepalived/vrrp/vrrp_if.c
21 index df38d9d..6d5735e 100644
22 --- a/keepalived/vrrp/vrrp_if.c
23 +++ b/keepalived/vrrp/vrrp_if.c
24 @@ -85,18 +85,14 @@ if_get_by_ifname(const char *ifname)
25 interface *ifp;
26 element e;
27
28 - if (LIST_ISEMPTY(if_queue)) {
29 - log_message(LOG_ERR, "Interface queue is empty");
30 + if (LIST_ISEMPTY(if_queue))
31 return NULL;
32 - }
33
34 for (e = LIST_HEAD(if_queue); e; ELEMENT_NEXT(e)) {
35 ifp = ELEMENT_DATA(e);
36 if (!strcmp(ifp->ifname, ifname))
37 return ifp;
38 }
39 -
40 - log_message(LOG_ERR, "No such interface, %s", ifname);
41 return NULL;
42 }
43
44 --
45 1.7.1
46