diff options
author | 2005-01-20 15:00:13 +0000 | |
---|---|---|
committer | 2005-01-20 15:00:13 +0000 | |
commit | 75f13a575689aa568dbc4edc506bb7da57d36ca9 (patch) | |
tree | f5e151c215075a09012f6ede4f73b7d8eb4fe993 | |
parent | backout workaround from rev 1.29 as it breaks host routes and is not (diff) | |
download | wireguard-openbsd-75f13a575689aa568dbc4edc506bb7da57d36ca9.tar.xz wireguard-openbsd-75f13a575689aa568dbc4edc506bb7da57d36ca9.zip |
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); } |