Skip to content

Commit 8be3dad

Browse files
Michal Kalderondavem330
authored andcommitted
qed: Fix iWARP syn packet mac address validation.
The ll2 forwards all syn packets to the driver without validating the mac address. Add validation check in the driver's iWARP listener flow and drop the packet if it isn't intended for the device. Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Michal Kalderon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9addc92 commit 8be3dad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/ethernet/qlogic/qed/qed_iwarp.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,15 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn,
16881688

16891689
eth_hlen = ETH_HLEN + (vlan_valid ? sizeof(u32) : 0);
16901690

1691+
if (!ether_addr_equal(ethh->h_dest,
1692+
p_hwfn->p_rdma_info->iwarp.mac_addr)) {
1693+
DP_VERBOSE(p_hwfn,
1694+
QED_MSG_RDMA,
1695+
"Got unexpected mac %pM instead of %pM\n",
1696+
ethh->h_dest, p_hwfn->p_rdma_info->iwarp.mac_addr);
1697+
return -EINVAL;
1698+
}
1699+
16911700
ether_addr_copy(remote_mac_addr, ethh->h_source);
16921701
ether_addr_copy(local_mac_addr, ethh->h_dest);
16931702

0 commit comments

Comments
 (0)