diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-21 03:52:43 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-21 03:52:43 +0000 |
commit | 489127962563af610e84a5d77090ad8990ca89dd (patch) | |
tree | bce01b2b2c38e502b47f5d516e210485072cc6ad /sys | |
parent | 5dc0599022dccd6e453ce0ac0890eaccd5d5616e (diff) |
Do not report RTM_MISS up on IP encapsulation implicit lookups. This should
fix RARP as well as improving performance. Chances are that it will fix
an error having to do with renumbering net interfaces too. Thanks to
Angelos and Theo for help with the fix, and Martin and Phil for reassuring
it was a general bug.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/route.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index daaebc86673..def1e123a44 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.4 1997/07/27 23:30:33 niklas Exp $ */ +/* $OpenBSD: route.c,v 1.5 1997/09/21 03:52:42 niklas Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -113,7 +113,7 @@ rtalloc1(dst, report) newrt = rt = (struct rtentry *)rn; if (report && (rt->rt_flags & RTF_CLONING)) { err = rtrequest(RTM_RESOLVE, dst, SA(0), - SA(0), 0, &newrt); + SA(0), 0, &newrt); if (err) { newrt = rt; rt->rt_refcnt++; @@ -127,7 +127,12 @@ rtalloc1(dst, report) rt->rt_refcnt++; } else { rtstat.rts_unreach++; - miss: if (report) { + /* + * IP encapsulation does lots of lookups where we don't need nor want + * the RTM_MISSes that would be generated. It causes RTM_MISS storms + * sent upward breaking user-level routing queries. + */ + miss: if (report && dst->sa_family != AF_ENCAP) { bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = dst; rt_missmsg(msgtype, &info, 0, err); |