lagg(4): Tap traffic after protocol processing
Different lagg protocols have different means and policies to process incoming traffic. For example, for failover protocol, by default received traffic is only accepted when they are received through the active port. For lacp protocol, LACP control messages are tapped off, also traffic will be dropped if they are received through the port which is not in collecting state or is not joined to the active aggregator. It confuses if user dump and see inbound traffic on lagg(4) interfaces but they are actually silently dropped and not passed into the net stack. Tap traffic after protocol processing so that user will have consistent view of the inbound traffic, meanwhile mbuf is set with correct receiving interface and bpf(4) will diagnose the right direction of inbound packets. PR: 270417 Reviewed by: melifaro (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39225
This commit is contained in:
parent
90820ef121
commit
5f3d0399e9
@ -2171,13 +2171,15 @@ lagg_input_ethernet(struct ifnet *ifp, struct mbuf *m)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
m = lagg_proto_input(sc, lp, m);
|
||||
if (m != NULL) {
|
||||
ETHER_BPF_MTAP(scifp, m);
|
||||
|
||||
m = lagg_proto_input(sc, lp, m);
|
||||
if (m != NULL && (scifp->if_flags & IFF_MONITOR) != 0) {
|
||||
if ((scifp->if_flags & IFF_MONITOR) != 0) {
|
||||
m_freem(m);
|
||||
m = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEV_NETMAP
|
||||
if (m != NULL && scifp->if_capenable & IFCAP_NETMAP) {
|
||||
@ -2204,13 +2206,15 @@ lagg_input_infiniband(struct ifnet *ifp, struct mbuf *m)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
m = lagg_proto_input(sc, lp, m);
|
||||
if (m != NULL) {
|
||||
infiniband_bpf_mtap(scifp, m);
|
||||
|
||||
m = lagg_proto_input(sc, lp, m);
|
||||
if (m != NULL && (scifp->if_flags & IFF_MONITOR) != 0) {
|
||||
if ((scifp->if_flags & IFF_MONITOR) != 0) {
|
||||
m_freem(m);
|
||||
m = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (m);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user