diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2019-04-23 15:07:52 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2019-04-23 15:27:46 +0200 |
commit | 3cd48765b74e498f06397f4b90b64cafe3a82dd1 (patch) | |
tree | 9eb7f7f2177945baa3eb4e6a444a2684f25b0ff1 | |
parent | 79fbba18b175e717413722c6bbd82dfe86f97844 (diff) |
ndp: fix syslog flooding (FS#2242)
Only log a syslog error in case adding of a proxy neighbor fails as a delete
failure cannot be considered as a syslog error for all cases.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | src/ndp.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -361,11 +361,12 @@ static void setup_addr_for_relaying(struct in6_addr *addr, struct interface *ifa if (iface == c || c->ndp != MODE_RELAY) continue; - if (netlink_setup_proxy_neigh(addr, c->ifindex, add)) - syslog(LOG_ERR, "Failed to %s proxy neighbour entry %s on %s", - add ? "add" : "delete", ipbuf, c->name); - else + if (netlink_setup_proxy_neigh(addr, c->ifindex, add)) { + if (add) + syslog(LOG_ERR, "Failed to add proxy neighbour entry %s on %s", + ipbuf, c->name); + } else syslog(LOG_DEBUG, "%s proxy neighbour entry %s on %s", - add ? "Added" : "Deleted", ipbuf, c->name); + add ? "Added" : "Deleted", ipbuf, c->name); } } |