Patch "i40e: Disallow ip4 and ip6 l4_4_bytes" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i40e: Disallow ip4 and ip6 l4_4_bytes

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-disallow-ip4-and-ip6-l4_4_bytes.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6bbeac2b596bffd9e6d044b6f747f7ee3427f9d7
Author: Przemyslaw Patynowski <przemyslawx.patynowski@xxxxxxxxx>
Date:   Tue Nov 15 09:49:25 2022 +0100

    i40e: Disallow ip4 and ip6 l4_4_bytes
    
    [ Upstream commit d64aaf3f7869f915fd120763d75f11d6b116424d ]
    
    Return -EOPNOTSUPP, when user requests l4_4_bytes for raw IP4 or
    IP6 flow director filters. Flow director does not support filtering
    on l4 bytes for PCTYPEs used by IP4 and IP6 filters.
    Without this patch, user could create filters with l4_4_bytes fields,
    which did not do any filtering on L4, but only on L3 fields.
    
    Fixes: 36777d9fa24c ("i40e: check current configured input set when adding ntuple filters")
    Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@xxxxxxxxx>
    Signed-off-by: Kamil Maziarz  <kamil.maziarz@xxxxxxxxx>
    Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Tested-by: Gurucharan G <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 16adba824811..fbfd43a7e592 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -3850,11 +3850,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
 			return -EOPNOTSUPP;
 
 		/* First 4 bytes of L4 header */
-		if (usr_ip4_spec->l4_4_bytes == htonl(0xFFFFFFFF))
-			new_mask |= I40E_L4_SRC_MASK | I40E_L4_DST_MASK;
-		else if (!usr_ip4_spec->l4_4_bytes)
-			new_mask &= ~(I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
-		else
+		if (usr_ip4_spec->l4_4_bytes)
 			return -EOPNOTSUPP;
 
 		/* Filtering on Type of Service is not supported. */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux