mlxsw: spectrum_router: Fix build when IPv6 isn't enabled
authorIdo Schimmel <idosch@mellanox.com>
Mon, 24 Jul 2017 07:56:00 +0000 (09:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jul 2017 00:15:17 +0000 (17:15 -0700)
commitb5f3e0d430122a551cbc2b88068dae8b2c2c0031
tree57f1140cea6935efd00263af8389cc5faeba2069
parentf3eebe88195478b1bfbe8510d58a8c226ea759a8
mlxsw: spectrum_router: Fix build when IPv6 isn't enabled

When IPv6 isn't enabled the following error is generated:

ERROR: "nd_tbl" [drivers/net/ethernet/mellanox/mlxsw/mlxsw_spectrum.ko]
undefined!

Fix it by replacing 'arp_tbl' and 'nd_tbl' with 'tbl->family' wherever
possible and reference 'nd_tbl' only when IPV6 is enabled.

Fixes: d5eb89cf68d6 ("mlxsw: spectrum_router: Reflect IPv6 neighbours to the device")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c