diff options
author | bmilekic <bmilekic@FreeBSD.org> | 2001-02-11 07:39:51 +0000 |
---|---|---|
committer | bmilekic <bmilekic@FreeBSD.org> | 2001-02-11 07:39:51 +0000 |
commit | 0f9088da5625e8088bdbd7b3587fdadb265b1482 (patch) | |
tree | 05dfca28095c82a06dee66b4ae5d1541036a93af /sys/netinet/icmp_var.h | |
parent | cc52eb42bff57e11d166025d0d19cae8152a462d (diff) | |
download | FreeBSD-src-0f9088da5625e8088bdbd7b3587fdadb265b1482.zip FreeBSD-src-0f9088da5625e8088bdbd7b3587fdadb265b1482.tar.gz |
Clean up RST ratelimiting. Previously, ratelimiting occured before tests
were performed to determine if the received packet should be reset. This
created erroneous ratelimiting and false alarms in some cases. The code
has now been reorganized so that the checks for validity come before
the call to badport_bandlim. Additionally, a few changes in the symbolic
names of the bandlim types have been made, as well as a clarification of
exactly which type each RST case falls under.
Submitted by: Mike Silbersack <silby@silby.com>
Diffstat (limited to 'sys/netinet/icmp_var.h')
-rw-r--r-- | sys/netinet/icmp_var.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index fd04f27..814e932 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -77,12 +77,13 @@ struct icmpstat { #ifdef _KERNEL SYSCTL_DECL(_net_inet_icmp); extern int badport_bandlim __P((int)); -#define BANDLIM_UNREACH 0 -#define BANDLIM_RST_NOTOPEN 1 -#define BANDLIM_RST_OPEN 2 -#define BANDLIM_ECHO 3 -#define BANDLIM_TSTAMP 4 -#define BANDLIM_MAX 4 +#define BANDLIM_UNLIMITED -1 +#define BANDLIM_ICMP_UNREACH 0 +#define BANDLIM_ICMP_ECHO 1 +#define BANDLIM_ICMP_TSTAMP 2 +#define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */ +#define BANDLIM_RST_OPENPORT 4 /* No connection, listener */ +#define BANDLIM_MAX 4 #endif #endif |