Deleted Added
sdiff udiff text old ( 251859 ) new ( 252511 )
full compact
1/* $OpenBSD: if_trunk.c,v 1.30 2007/01/31 06:20:19 reyk Exp $ */
2
3/*
4 * Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
5 * Copyright (c) 2007 Andrew Thompson <thompsa@FreeBSD.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

--- 4 unchanged lines hidden (view full) ---

13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20#include <sys/cdefs.h>
21__FBSDID("$FreeBSD: head/sys/net/if_lagg.c 251859 2013-06-17 19:31:03Z delphij $");
22
23#include "opt_inet.h"
24#include "opt_inet6.h"
25
26#include <sys/param.h>
27#include <sys/kernel.h>
28#include <sys/malloc.h>
29#include <sys/mbuf.h>

--- 28 unchanged lines hidden (view full) ---

58#ifdef INET
59#include <netinet/in_systm.h>
60#include <netinet/if_ether.h>
61#include <netinet/ip.h>
62#endif
63
64#ifdef INET6
65#include <netinet/ip6.h>
66#endif
67
68#include <net/if_vlan_var.h>
69#include <net/if_lagg.h>
70#include <net/ieee8023ad_lacp.h>
71
72/* Special flags we should propagate to the lagg ports. */
73static struct {

--- 464 unchanged lines hidden (view full) ---

538 return (EEXIST);
539 return (EBUSY);
540 }
541
542 /* XXX Disallow non-ethernet interfaces (this should be any of 802) */
543 if (ifp->if_type != IFT_ETHER)
544 return (EPROTONOSUPPORT);
545
546 /* Allow the first Ethernet member to define the MTU */
547 if (SLIST_EMPTY(&sc->sc_ports))
548 sc->sc_ifp->if_mtu = ifp->if_mtu;
549 else if (sc->sc_ifp->if_mtu != ifp->if_mtu) {
550 if_printf(sc->sc_ifp, "invalid MTU for %s\n",
551 ifp->if_xname);
552 return (EINVAL);
553 }

--- 1373 unchanged lines hidden ---