diff options
author | emaste <emaste@FreeBSD.org> | 2012-05-03 01:41:12 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2012-05-03 01:41:12 +0000 |
commit | 62cde8b2a25544589eae9eaf2fcf961f3a58a310 (patch) | |
tree | ed58bef7f8112eb6191c89b65e0c79cf473d6d84 /sys/net | |
parent | e65958af29e7a68b4aaaf6a7f467fbdb011ee452 (diff) | |
download | FreeBSD-src-62cde8b2a25544589eae9eaf2fcf961f3a58a310.zip FreeBSD-src-62cde8b2a25544589eae9eaf2fcf961f3a58a310.tar.gz |
Relax restriction on direct tx to child ports
Lagg(4) restricts the type of packet that may be sent directly to a child
port, to avoid undesired output from accidental misconfiguration.
Previously only ETHERTYPE_PAE was permitted.
BPF writes to a lagg(4) child port are presumably intentional, so just
allow them, while still blocking other packets that should take the
aggregation path.
PR: kern/138620
Approved by: thompsa@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_lagg.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index b7beb86..c8b8ecb 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -764,28 +764,18 @@ fallback: return (EINVAL); } +/* + * For direct output to child ports. + */ static int lagg_port_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct route *ro) { struct lagg_port *lp = ifp->if_lagg; - struct ether_header *eh; - short type = 0; switch (dst->sa_family) { case pseudo_AF_HDRCMPLT: case AF_UNSPEC: - eh = (struct ether_header *)dst->sa_data; - type = eh->ether_type; - break; - } - - /* - * Only allow ethernet types required to initiate or maintain the link, - * aggregated frames take a different path. - */ - switch (ntohs(type)) { - case ETHERTYPE_PAE: /* EAPOL PAE/802.1x */ return ((*lp->lp_output)(ifp, m, dst, ro)); } |