From c7edeb2b4f7122f9ec6f685b7b39d1b09bf6447d Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 25 Jul 2001 03:05:33 +0000 Subject: [PATCH] If we change the MTU, kick the interface; it may have to reprogram registers for the new MTU. --- sys/net/if_ethersubr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index c5431ec438b0..1984aab9e993 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.86 2001/06/29 18:12:09 thorpej Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.87 2001/07/25 03:05:33 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1410,6 +1410,10 @@ ether_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = EINVAL; else ifp->if_mtu = ifr->ifr_mtu; + + /* Make sure the device notices the MTU change. */ + if (ifp->if_flags & IFF_UP) + error = (*ifp->if_init)(ifp); break; }