summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <josef.sipek@nexenta.com>2014-05-07 10:58:42 -0400
committerRichard Lowe <richlowe@richlowe.net>2014-05-14 19:37:52 -0400
commit12928d597a28b7743c3fc254b6fcfc05560c1720 (patch)
tree9c882714d808cf143cb91876693f3429c4cadaa0
parente5815e7afac983d9ae9b2316e5056c8401cf7e5e (diff)
downloadillumos-joyent-12928d597a28b7743c3fc254b6fcfc05560c1720.tar.gz
4787 ipf: remove rate_limit_message
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: David Höppner <0xffea@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/uts/common/inet/ipf/ip_fil_solaris.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/usr/src/uts/common/inet/ipf/ip_fil_solaris.c b/usr/src/uts/common/inet/ipf/ip_fil_solaris.c
index 98cda0b7cc..d6475d85b3 100644
--- a/usr/src/uts/common/inet/ipf/ip_fil_solaris.c
+++ b/usr/src/uts/common/inet/ipf/ip_fil_solaris.c
@@ -1292,44 +1292,6 @@ int dst;
#include <stdio.h>
#endif
-#define NULLADDR_RATE_LIMIT 10 /* 10 seconds */
-
-
-/*
- * Print out warning message at rate-limited speed.
- */
-static void rate_limit_message(ipf_stack_t *ifs,
- int rate, const char *message, ...)
-{
- static time_t last_time = 0;
- time_t now;
- va_list args;
- char msg_buf[256];
- int need_printed = 0;
-
- now = ddi_get_time();
-
- /* make sure, no multiple entries */
- ASSERT(MUTEX_NOT_HELD(&(ifs->ifs_ipf_rw.ipf_lk)));
- MUTEX_ENTER(&ifs->ifs_ipf_rw);
- if (now - last_time >= rate) {
- need_printed = 1;
- last_time = now;
- }
- MUTEX_EXIT(&ifs->ifs_ipf_rw);
-
- if (need_printed) {
- va_start(args, message);
- (void)vsnprintf(msg_buf, 255, message, args);
- va_end(args);
-#ifdef _KERNEL
- cmn_err(CE_WARN, msg_buf);
-#else
- fprintf(std_err, msg_buf);
-#endif
- }
-}
-
/*
* Return the first IP Address associated with an interface
* For IPv6, we walk through the list of logical interfaces and return