diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-02-26 14:23:54 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-02-26 14:23:54 +0100 |
commit | cb5303927188de9504a6e18aedec299956a22b6f (patch) | |
tree | 0d8ac146c9d84b85e382fb994d9e10688c2e3e36 /sysdep/linux | |
parent | a9dc5e1ef2fd08c53bceb54690f6dac83ddf0c81 (diff) | |
download | bird-cb5303927188de9504a6e18aedec299956a22b6f.tar bird-cb5303927188de9504a6e18aedec299956a22b6f.zip |
Rate limit for most abundant log messages
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/netlink/netlink.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index 08817ca..734247e 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -129,6 +129,8 @@ nl_get_reply(void) } } +static struct rate_limit rl_netlink_err; + static int nl_error(struct nlmsghdr *h) { @@ -143,7 +145,7 @@ nl_error(struct nlmsghdr *h) e = (struct nlmsgerr *) NLMSG_DATA(h); ec = -e->error; if (ec) - log(L_WARN "Netlink: %s", strerror(ec)); + log_rl(&rl_netlink_err, L_WARN "Netlink: %s", strerror(ec)); return ec; } |