Hi there,

While more and more Ethernet NIC drivers start supporting long
frames (>1518 bytes), the user/admin still cannot raise MTU on an
Ethernet interface above the 1500 byte limit due to outdated code
in net/if_ethersubr.c

Please review the following patch that removes the limitation, and
also substitutes predefined symbolic names for some numeric constants.

-- 
Yar

--- if_ethersubr.c      Wed Mar 14 01:00:32 2001
+++ /home/yar/if_ethersubr.c    Mon Jun 25 22:45:25 2001
@@ -677,8 +677,8 @@
 
        if_attach(ifp);
        ifp->if_type = IFT_ETHER;
-       ifp->if_addrlen = 6;
-       ifp->if_hdrlen = 14;
+       ifp->if_addrlen = ETHER_ADDR_LEN;
+       ifp->if_hdrlen = ETHER_HDR_LEN;
        ifp->if_mtu = ETHERMTU;
        ifp->if_resolvemulti = ether_resolvemulti;
        if (ifp->if_baudrate == 0)
@@ -805,7 +805,7 @@
                /*
                 * Set the interface MTU.
                 */
-               if (ifr->ifr_mtu > ETHERMTU) {
+               if (ifr->ifr_mtu > ETHERMTU + ifp->if_hdrlen - ETHER_HDR_LEN) {
                        error = EINVAL;
                } else {
                        ifp->if_mtu = ifr->ifr_mtu;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to