]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
Add MTU support to carp interfaces
authorsmh <smh@FreeBSD.org>
Thu, 5 Nov 2015 17:23:02 +0000 (17:23 +0000)
committersmh <smh@FreeBSD.org>
Thu, 5 Nov 2015 17:23:02 +0000 (17:23 +0000)
MFC after: 2 weeks
Sponsored by: Multiplay

sys/netinet/ip_carp.c

index 7e4506937680ad349b1c751677f38740d7b0a173..c09d89550f609e400fe9ec1609bf542bac36693d 100644 (file)
@@ -1769,6 +1769,13 @@ carp_ioctl(struct ifreq *ifr, u_long cmd, struct thread *td)
                }
                break;
            }
+       case SIOCSIFMTU:
+               if (ifr->ifr_mtu > ETHERMTU_JUMBO) {
+                       error = EINVAL;
+               } else {
+                       ifp->if_mtu = ifr->ifr_mtu;
+               }
+               break;
        default:
                error = EINVAL;
        }