do not try to update rmx_mtu if rmx_mtu == 0 (obey ifmtu)
This commit is contained in:
parent
16e84a7542
commit
3449ca6d23
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip6_output.c,v 1.45 2002/05/29 07:53:41 itojun Exp $ */
|
||||
/* $NetBSD: ip6_output.c,v 1.46 2002/05/31 03:18:54 itojun Exp $ */
|
||||
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -66,7 +66,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.45 2002/05/29 07:53:41 itojun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.46 2002/05/31 03:18:54 itojun Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
|
@ -1220,7 +1220,9 @@ ip6_getpmtu(ro_pmtu, ro, ifp, dst, mtup)
|
|||
ifp = ro_pmtu->ro_rt->rt_ifp;
|
||||
ifmtu = IN6_LINKMTU(ifp);
|
||||
mtu = ro_pmtu->ro_rt->rt_rmx.rmx_mtu;
|
||||
if (mtu > ifmtu || mtu == 0) {
|
||||
if (mtu == 0)
|
||||
mtu = ifmtu;
|
||||
else if (mtu > ifmtu) {
|
||||
/*
|
||||
* The MTU on the route is larger than the MTU on
|
||||
* the interface! This shouldn't happen, unless the
|
||||
|
@ -1233,10 +1235,8 @@ ip6_getpmtu(ro_pmtu, ro, ifp, dst, mtup)
|
|||
* this case happens with path MTU discovery timeouts.
|
||||
*/
|
||||
mtu = ifmtu;
|
||||
if (!(ro_pmtu->ro_rt->rt_rmx.rmx_locks & RTV_MTU)) {
|
||||
/* XXX */
|
||||
if (!(ro_pmtu->ro_rt->rt_rmx.rmx_locks & RTV_MTU))
|
||||
ro_pmtu->ro_rt->rt_rmx.rmx_mtu = mtu;
|
||||
}
|
||||
}
|
||||
} else if (ifp) {
|
||||
mtu = IN6_LINKMTU(ifp);
|
||||
|
|
Loading…
Reference in New Issue