The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=01ad0c0079646a31afa20e1f07e5b62b82613493

commit 01ad0c0079646a31afa20e1f07e5b62b82613493
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2021-07-26 10:18:27 +0000
Commit:     Kristof Provost <k...@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);
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to