Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 inet6: Ensure that route MTU is guarded by ARC_...
details: https://anonhg.NetBSD.org/src/rev/0a4780de52b2
branches: trunk
changeset: 971575:0a4780de52b2
user: roy <roy%NetBSD.org@localhost>
date: Tue Apr 28 15:12:28 2020 +0000
description:
inet6: Ensure that route MTU is guarded by ARC_PHDS_MAXMTU
This mirrors the ARP behavior for ARCnet interfaces based on current
kernel RA handling.
diffstat:
sys/netinet6/nd6.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r 55c9c996fa90 -r 0a4780de52b2 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Tue Apr 28 14:45:23 2020 +0000
+++ b/sys/netinet6/nd6.c Tue Apr 28 15:12:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.269 2020/04/12 12:13:52 roy Exp $ */
+/* $NetBSD: nd6.c,v 1.270 2020/04/28 15:12:28 roy Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.269 2020/04/12 12:13:52 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.270 2020/04/28 15:12:28 roy Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1462,8 +1462,22 @@
return;
}
- if ((rt->rt_flags & RTF_GATEWAY) != 0)
+ if ((rt->rt_flags & RTF_GATEWAY) != 0) {
+ if (req != RTM_ADD)
+ return;
+ /*
+ * linklayers with particular MTU limitation.
+ */
+ switch(ifp->if_type) {
+#if NARCNET > 0
+ case IFT_ARCNET:
+ if (rt->rt_rmx.rmx_mtu > ARC_PHDS_MAXMTU) /* RFC2497 */
+ rt->rt_rmx.rmx_mtu = ARC_PHDS_MAXMTU;
+ break;
+#endif
+ }
return;
+ }
if (nd6_need_cache(ifp) == 0 && (rt->rt_flags & RTF_HOST) == 0) {
RT_DPRINTF("rt_getkey(rt) = %p\n", rt_getkey(rt));
Home |
Main Index |
Thread Index |
Old Index