Date: Wed, 28 Jul 2021 20:07:27 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 01ad0c007964 - main - net: disallow MTU changes on bridge member interfaces Message-ID: <202107282007.16SK7RwN062539@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=01ad0c0079646a31afa20e1f07e5b62b82613493 commit 01ad0c0079646a31afa20e1f07e5b62b82613493 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-07-26 10:18:27 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-07-28 20:03:30 +0000 net: disallow MTU changes on bridge member interfaces if_bridge member interfaces should always have the same MTU as the bridge itself, so disallow MTU changes on interfaces that are part of an if_bridge. Reviewed by: donner Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31304 --- sys/net/if.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index cfa795904bc9..8d2a66471836 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2746,6 +2746,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) return (EINVAL); if (ifp->if_ioctl == NULL) return (EOPNOTSUPP); + /* Disallow MTU changes on bridge member interfaces. */ + if (ifp->if_bridge) + return (EOPNOTSUPP); error = (*ifp->if_ioctl)(ifp, cmd, data); if (error == 0) { getmicrotime(&ifp->if_lastchange);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107282007.16SK7RwN062539>