From owner-freebsd-net Wed Jan 19 6:49: 0 2000 Delivered-To: freebsd-net@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by hub.freebsd.org (Postfix) with ESMTP id 0FEB714DAF; Wed, 19 Jan 2000 06:48:47 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id QAA47681; Wed, 19 Jan 2000 16:50:51 +0200 (EET) (envelope-from ru) Date: Wed, 19 Jan 2000 16:50:51 +0200 From: Ruslan Ermilov To: Garrett Wollman , Bill Fenner Cc: net@FreeBSD.org Subject: [Request for review] Message-ID: <20000119165050.A45061@relay.ucb.crimea.ua> Mail-Followup-To: Garrett Wollman , Bill Fenner , net@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=G4iJoqBmSsgzjUCe X-Mailer: Mutt 0.95.3i X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Hi! Attached patch makes it possible for the user process to be notified about the interface MTU change via the routing socket. This will assist to resolve PR 15494. Comments? Objections? Opinions? Thanks, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: if.c =================================================================== RCS file: /home/ncvs/src/sys/net/if.c,v retrieving revision 1.82 diff -u -p -1 -2 -r1.82 if.c --- if.c 1999/12/30 18:29:55 1.82 +++ if.c 2000/01/19 14:36:19 @@ -839,26 +839,28 @@ ifioctl(so, cmd, data, p) case SIOCSIFMTU: { u_long oldmtu = ifp->if_mtu; error = suser(p); if (error) return (error); if (ifp->if_ioctl == NULL) return (EOPNOTSUPP); if (ifr->ifr_mtu < IF_MINMTU || ifr->ifr_mtu > IF_MAXMTU) return (EINVAL); error = (*ifp->if_ioctl)(ifp, cmd, data); - if (error == 0) + if (error == 0) { getmicrotime(&ifp->if_lastchange); + rt_ifmsg(ifp); + } /* * If the link MTU changed, do network layer specific procedure. */ if (ifp->if_mtu != oldmtu) { #ifdef INET6 nd6_setmtu(ifp); #endif } return (error); } case SIOCADDMULTI: --G4iJoqBmSsgzjUCe-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message