gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp()
Subsystems (3)
PATCH 1/1 gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp()
In drivers/net/gtp.c, gtp_genl_dump_pdp() should set NLM_F_MULTI flag since it returns multipart message.
This patch adds a new arg "flags" in gtp_genl_fill_info() so that flags can be set by the callers.
Signed-off-by Yoshiyuki Kurauchi <[email protected]>
--- drivers/net/gtp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/gtp.c +5 -4
@@ -1169,11 +1169,11 @@ static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info)static struct genl_family gtp_genl_family;static int gtp_genl_fill_info (struct sk_buff *skb,u32 snd_portid,u32 snd_seq, -u32 type,struct pdp_ctx *pctx) +int flags,u32 type,struct pdp_ctx *pctx) {void *genlh; - genlh =genlmsg_put (skb, snd_portid, snd_seq, >p_genl_family,0 , + genlh =genlmsg_put (skb, snd_portid, snd_seq, >p_genl_family, flags, type);if (genlh ==NULL ) goto nlmsg_failure;
@@ -1227,8 +1227,8 @@ static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info) goto err_unlock; } - err =gtp_genl_fill_info (skb2,NETLINK_CB (skb).portid, - info->snd_seq, info->nlhdr->nlmsg_type, pctx); + err =gtp_genl_fill_info (skb2,NETLINK_CB (skb).portid, info->snd_seq, +0 , info->nlhdr->nlmsg_type, pctx);if (err <0 ) goto err_unlock_free;
@@ -1271,6 +1271,7 @@ static int gtp_genl_dump_pdp(struct sk_buff *skb,gtp_genl_fill_info (skb,NETLINK_CB (cb->skb).portid, cb->nlh->nlmsg_seq, +NLM_F_MULTI , cb->nlh->nlmsg_type, pctx)) { cb->args[0] = i; cb->args[1 ] = j;
Signature · 1 line
2.17.1
From: Yoshiyuki Kurauchi <[email protected]>
Date: Thu, 30 Apr 2020 14:01:36 +0900
Quoted 6 lines
In
drivers/net/gtp.c,gtp_genl_dump_pdp()should setNLM_F_MULTIflag since it returns multipart message.
This patch adds a new arg "flags" ingtp_genl_fill_info()so that flags can be set by the callers.Signed-off-by Yoshiyuki Kurauchi <[email protected]>
Applied.