diff options
author | 2013-10-21 12:27:11 +0000 | |
---|---|---|
committer | 2013-10-21 12:27:11 +0000 | |
commit | 0e446ca263cfe2a96d5d4b8903d44bf807605d9c (patch) | |
tree | c2fda4f9f531844950c1a245ae586161a3754c2a /sys/netinet/ip_icmp.c | |
parent | Fix lies in comments, and apply some KNF and unused or duplicate prototype (diff) | |
download | wireguard-openbsd-0e446ca263cfe2a96d5d4b8903d44bf807605d9c.tar.xz wireguard-openbsd-0e446ca263cfe2a96d5d4b8903d44bf807605d9c.zip |
There are gasps of shock! Add a pmtu delay sysctl BUTTON for netinet6,
making the code the same as netinet4 along the way.
ok bluhm phessler
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 11 |
1 files changed, 4 insertions, 7 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)); |