diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2005-01-20 15:00:14 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2005-01-20 15:00:14 +0000 |
commit | 9e6bd8f9af7a936e87d3b2c6ac32e1a753859271 (patch) | |
tree | 4df22770824282ac2e6d5f22b0da021a8a5b88f7 | |
parent | 08dee77d2396f27ae518c58e3f1c370ee315edea (diff) |
expire ipforward_rt cache in ip_slowtimeo; fixes pr 1697; ok claudio
-rw-r--r-- | sys/netinet/ip_input.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 4d18a606827..09d452dbe05 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.124 2004/10/18 07:41:28 otto Exp $ */ +/* $OpenBSD: ip_input.c,v 1.125 2005/01/20 15:00:13 markus Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -908,8 +908,8 @@ ip_freef(fp) /* * IP timer processing; - * if a timer expires on a reassembly - * queue, discard it. + * if a timer expires on a reassembly queue, discard it. + * clear the forwarding cache, there might be a better route. */ void ip_slowtimo() @@ -926,6 +926,10 @@ ip_slowtimo() } } ipq_unlock(); + if (ipforward_rt.ro_rt) { + RTFREE(ipforward_rt.ro_rt); + ipforward_rt.ro_rt = 0; + } splx(s); } |