aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2012-11-01 01:00:44 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-11-22 05:00:42 -0500
commitb1ac1ef71b05f7127a2f344fc8219b37ed6859de (patch)
treeed557563fb5d03bfda6739ceaee563b1671c33c8 /drivers/net/ethernet/intel/ixgbe
parentdb2adc2df2c2f4250fead3e8418be2e387a5278f (diff)
ixgbe: fdb: only allow NUD_PERM fdb entries
There was a bitwise operation error in the fdb_add block that was only allowing FDB types that were not permanent. This was the opposite of the intent because the hardware never ages out address these are the _only_ type of addrs that should be allowed. This was missed because until recently iproute2 did not set any bit for this by default. And our test code to manage FDB entries on embedded devices similarly did not set these bits. I am going to chalk this up as a bug and fix it now. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 4f67fdc0d0d8..80e3cb7c39e8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6954,7 +6954,10 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
6954 if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)) 6954 if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
6955 return -EOPNOTSUPP; 6955 return -EOPNOTSUPP;
6956 6956
6957 if (ndm->ndm_state & NUD_PERMANENT) { 6957 /* Hardware does not support aging addresses so if a
6958 * ndm_state is given only allow permanent addresses
6959 */
6960 if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
6958 pr_info("%s: FDB only supports static addresses\n", 6961 pr_info("%s: FDB only supports static addresses\n",
6959 ixgbe_driver_name); 6962 ixgbe_driver_name);
6960 return -EINVAL; 6963 return -EINVAL;