Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Fix a couple of brainos in the last.
details: https://anonhg.NetBSD.org/src/rev/08f14006aab9
branches: trunk
changeset: 482129:08f14006aab9
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Feb 15 00:31:08 2000 +0000
description:
Fix a couple of brainos in the last.
diffstat:
sys/netinet6/icmp6.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r bfa232b79516 -r 08f14006aab9 sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Mon Feb 14 23:13:49 2000 +0000
+++ b/sys/netinet6/icmp6.c Tue Feb 15 00:31:08 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.20 2000/02/14 19:45:50 thorpej Exp $ */
+/* $NetBSD: icmp6.c,v 1.21 2000/02/15 00:31:08 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2060,17 +2060,21 @@
&icmp6stat, sizeof(icmp6stat));
case ICMPV6CTL_ERRRATELIMIT:
{
- int rate_usec, error;
+ int rate_usec, error, s;
/*
* The sysctl specifies the rate in usec-between-icmp,
- * so we must convert to a timeval.
+ * so we must convert from/to a timeval.
*/
+ rate_usec = (icmp6errratelim.tv_sec * 1000000) +
+ icmp6errratelim.tv_usec;
error = sysctl_int(oldp, oldlenp, newp, newlen, &rate_usec);
if (error)
return (error);
+ s = splsoftnet();
icmp6errratelim.tv_sec = rate_usec / 1000000;
icmp6errratelim.tv_usec = rate_usec % 1000000;
+ splx(s);
return (0);
}
Home |
Main Index |
Thread Index |
Old Index