diff options
author | Kumar Sanghvi <kumaras@chelsio.com> | 2013-12-18 06:08:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-22 18:09:07 -0500 |
commit | 7c89e5550ccb2a3118854639d9525847e896c686 (patch) | |
tree | de3f741eb253821a442541a023af57b685abed42 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |
parent | b6f8eaece6d5f0247931b6dac140e6cf876f48de (diff) |
cxgb4: Include TCP as protocol when creating server filters
We were creating LE Workaround Server Filters without specifying
IPPROTO_TCP (6) in the filters (when F_PROTOCOL is set in TP_VLAN_PRI_MAP).
This meant that UDP packets with matching IP Addresses/Ports would get
caught up in the filter and be delivered to ULDs like iw_cxgb4.
So, include the protocol information in the server filter properly.
Based on original work by Casey Leedom <leedom@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index f36f8e1a101c..df1d6b8334a1 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -4217,6 +4217,11 @@ int cxgb4_create_server_filter(const struct net_device *dev, unsigned int stid, | |||
4217 | } | 4217 | } |
4218 | } | 4218 | } |
4219 | 4219 | ||
4220 | if (adap->filter_mode & F_PROTOCOL) { | ||
4221 | f->fs.val.proto = IPPROTO_TCP; | ||
4222 | f->fs.mask.proto = ~0; | ||
4223 | } | ||
4224 | |||
4220 | f->fs.dirsteer = 1; | 4225 | f->fs.dirsteer = 1; |
4221 | f->fs.iq = queue; | 4226 | f->fs.iq = queue; |
4222 | /* Mark filter as locked */ | 4227 | /* Mark filter as locked */ |