mirror of
https://github.com/torvalds/linux.git
synced 2024-10-27 23:31:45 +00:00
IB/ipath: Discard multicast packets without a GRH
This patch fixes a bug where multicast packets without a GRH were not being dropped as per the IB spec. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
0ed3c594e3
commit
5a7d4eea91
|
@ -438,6 +438,10 @@ void ipath_ib_rcv(struct ipath_ibdev *dev, void *rhdr, void *data,
|
||||||
struct ipath_mcast *mcast;
|
struct ipath_mcast *mcast;
|
||||||
struct ipath_mcast_qp *p;
|
struct ipath_mcast_qp *p;
|
||||||
|
|
||||||
|
if (lnh != IPATH_LRH_GRH) {
|
||||||
|
dev->n_pkt_drops++;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
mcast = ipath_mcast_find(&hdr->u.l.grh.dgid);
|
mcast = ipath_mcast_find(&hdr->u.l.grh.dgid);
|
||||||
if (mcast == NULL) {
|
if (mcast == NULL) {
|
||||||
dev->n_pkt_drops++;
|
dev->n_pkt_drops++;
|
||||||
|
@ -445,8 +449,7 @@ void ipath_ib_rcv(struct ipath_ibdev *dev, void *rhdr, void *data,
|
||||||
}
|
}
|
||||||
dev->n_multicast_rcv++;
|
dev->n_multicast_rcv++;
|
||||||
list_for_each_entry_rcu(p, &mcast->qp_list, list)
|
list_for_each_entry_rcu(p, &mcast->qp_list, list)
|
||||||
ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data,
|
ipath_qp_rcv(dev, hdr, 1, data, tlen, p->qp);
|
||||||
tlen, p->qp);
|
|
||||||
/*
|
/*
|
||||||
* Notify ipath_multicast_detach() if it is waiting for us
|
* Notify ipath_multicast_detach() if it is waiting for us
|
||||||
* to finish.
|
* to finish.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user