From 1b34a059cb39721bf25de82bf9d9bfb40d779c1f Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 4 May 2006 18:41:08 +0000 Subject: [PATCH] Assert ip6_forward_rt protected by Giant adding GIANT_REQUIRED to functions not yet asserting it but working on global ip6_forward_rt route cache which is not locked and perhaps should go away in the future though cache hit/miss ration wasn't bad. It's #if 0ed in frag6 because the code working on ip6_forward_rt is. --- sys/netinet6/frag6.c | 4 ++++ sys/netinet6/ip6_forward.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index b3200db8ae9..7bb2e0d1d4a 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -688,6 +688,10 @@ frag6_slowtimo() { struct ip6q *q6; +#if 0 + GIANT_REQUIRED; /* XXX bz: ip6_forward_rt */ +#endif + IP6Q_LOCK(); q6 = ip6q.ip6q_next; if (q6) diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 3b542cf6845..18f03122d82 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -120,6 +120,8 @@ ip6_forward(m, srcrt) int ipsecrt = 0; #endif + GIANT_REQUIRED; /* XXX bz: ip6_forward_rt */ + #ifdef IPSEC /* * Check AH/ESP integrity.