summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_icmp.c11
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/ip_var.h4
3 files changed, 8 insertions, 11 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index d34fc1eaeb5..65281ab8764 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.107 2013/10/20 11:03:01 phessler Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.108 2013/10/21 12:27:11 deraadt Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -1073,14 +1073,11 @@ icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r)
int
icmp_ratelimit(const struct in_addr *dst, const int type, const int code)
{
-
/* PPS limit */
if (!ppsratecheck(&icmperrppslim_last, &icmperrpps_count,
icmperrppslim))
- return 1;
-
- /*okay to send*/
- return 0;
+ return 1; /* The packet is subject to rate limit */
+ return 0; /* okay to send */
}
void
@@ -1128,7 +1125,7 @@ icmp_do_exthdr(struct mbuf *m, u_int16_t class, u_int8_t ctype, void *buf,
/* exthdr already present, giving up */
return (0);
- /* the actuall offset starts after the common ICMP header */
+ /* the actual offset starts after the common ICMP header */
hlen += ICMP_MINLEN;
/* exthdr must start on a word boundary */
off = roundup(ntohs(ip->ip_len) - hlen, sizeof(u_int32_t));
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index daf90221419..497b4403a0d 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.217 2013/08/21 09:02:12 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.218 2013/10/21 12:27:12 deraadt Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -76,8 +76,6 @@
#include <netinet/ip_carp.h>
#endif
-#define IPMTUDISCTIMEOUT (10 * 60) /* as per RFC 1191 */
-
struct ipqhead ipq;
int encdebug = 0;
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index c111109cfd8..098c8b4e46d 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_var.h,v 1.46 2013/08/13 09:52:53 mpi Exp $ */
+/* $OpenBSD: ip_var.h,v 1.47 2013/10/21 12:27:13 deraadt Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
@@ -152,6 +152,8 @@ extern int ip_defttl; /* default IP ttl */
extern struct socket *ip_mrouter; /* multicast routing daemon */
#endif
+#define IPMTUDISCTIMEOUT (10 * 60) /* as per RFC 1191 */
+
extern int ip_mtudisc; /* mtu discovery */
extern u_int ip_mtudisc_timeout; /* seconds to timeout mtu discovery */