diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 96ae61f326e8..d4e0d78a1f5c 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -1399,7 +1399,7 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
static int vxlan_fdb_get(struct sk_buff *skb,
struct nlattr *tb[],
- const struct ndo_fdb_parms *parms, u32 portid, u32 seq,
+ const struct ndo_fdb_parms *parms, u32 seq,
struct netlink_ext_ack *extack)
{
struct vxlan_dev *vxlan = netdev_priv(parms->dev);@@ -1424,7 +1424,7 @@ static int vxlan_fdb_get(struct sk_buff *skb,
goto errout;
}
- err = vxlan_fdb_info(skb, vxlan, f, portid, seq,
+ err = vxlan_fdb_info(skb, vxlan, f, parms->portid, seq,
RTM_NEWNEIGH, 0, first_remote_rcu(f));
errout:
rcu_read_unlock();
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 6d2af23d8bf0..27c0554f66c0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1093,12 +1093,14 @@ struct netdev_net_notifier {
* @addr: MAC address of the FDB entry
* @vid: VLAN ID of the FDB entry, 0 if none
* @flags: netlink message flags (NLM_F_*) of the request; ndo_fdb_add only
+ * @portid: netlink port ID of the requester
*/
struct ndo_fdb_parms {
struct net_device *dev;
const unsigned char *addr;
u16 vid;
u16 flags;
+ u32 portid;
};
/*@@ -1645,7 +1647,7 @@ struct net_device_ops {
int (*ndo_fdb_get)(struct sk_buff *skb,
struct nlattr *tb[],
const struct ndo_fdb_parms *parms,
- u32 portid, u32 seq,
+ u32 seq,
struct netlink_ext_ack *extack);
int (*ndo_mdb_add)(struct net_device *dev,
struct nlattr *tb[],diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 8ed7af3e410d..9e2fdcc5ca9b 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -1146,7 +1146,7 @@ int br_fdb_dump(struct sk_buff *skb,
int br_fdb_get(struct sk_buff *skb,
struct nlattr *tb[],
- const struct ndo_fdb_parms *parms, u32 portid, u32 seq,
+ const struct ndo_fdb_parms *parms, u32 seq,
struct netlink_ext_ack *extack)
{
struct net_bridge *br = netdev_priv(parms->dev);@@ -1161,8 +1161,7 @@ int br_fdb_get(struct sk_buff *skb,
goto errout;
}
- err = fdb_fill_info(skb, br, f, portid, seq,
- RTM_NEWNEIGH, 0);
+ err = fdb_fill_info(skb, br, f, parms->portid, seq, RTM_NEWNEIGH, 0);
errout:
rcu_read_unlock();
return err;
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 7f308b3463d0..9f83a69bab1e 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -1031,7 +1031,7 @@ int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[],
int br_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
struct net_device *dev, struct net_device *fdev, int *idx);
int br_fdb_get(struct sk_buff *skb, struct nlattr *tb[],
- const struct ndo_fdb_parms *parms, u32 portid, u32 seq,
+ const struct ndo_fdb_parms *parms, u32 seq,
struct netlink_ext_ack *extack);
int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p);
void br_fdb_unsync_static(struct net_bridge *br, struct net_bridge_port *p);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e7d683952838..f31549923848 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -5420,10 +5420,10 @@ static int rtnl_fdb_get(struct sk_buff *in_skb, struct nlmsghdr *nlh,
.dev = dev,
.addr = addr,
.vid = vid,
+ .portid = NETLINK_CB(in_skb).portid,
};
- err = ops->ndo_fdb_get(skb, tb, &parms, NETLINK_CB(in_skb).portid,
- nlh->nlmsg_seq, extack);
+ err = ops->ndo_fdb_get(skb, tb, &parms, nlh->nlmsg_seq, extack);
if (err)
goto out;
--
2.56.1