diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index ec65a8cebb99..d6844c5593e8 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -75,6 +75,7 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh)
  * @src_net: Source netns of rtnetlink socket
  * @link_net: Link netns by IFLA_LINK_NETNSID, NULL if not specified
  * @peer_net: Peer netns
+ * @portid: Netlink port ID of the message sender
  * @tb: IFLA_* attributes
  * @data: IFLA_INFO_DATA attributes
  */
@@ -82,6 +83,7 @@ struct rtnl_newlink_params {
 	struct net *src_net;
 	struct net *link_net;
 	struct net *peer_net;
+	u32 portid;
 	struct nlattr **tb;
 	struct nlattr **data;
 };
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 6a5e9ace55a0..ed4918a1fc03 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3846,6 +3846,7 @@ static int rtnl_newlink_create(struct sk_buff *skb, struct ifinfomsg *ifm,
 		.src_net = sock_net(skb->sk),
 		.link_net = link_net,
 		.peer_net = peer_net,
+		.portid = NETLINK_CB(skb).portid,
 		.tb = tb,
 		.data = data,
 	};
