aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'net/l2tp/l2tp_netlink.c')
-rw-r--r--net/l2tp/l2tp_netlink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index 2caaa84ce92d..665cc74df5c5 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -827,7 +827,7 @@ static int l2tp_nl_cmd_session_dump(struct sk_buff *skb, struct netlink_callback
827 goto out; 827 goto out;
828 } 828 }
829 829
830 session = l2tp_session_find_nth(tunnel, si); 830 session = l2tp_session_get_nth(tunnel, si, false);
831 if (session == NULL) { 831 if (session == NULL) {
832 ti++; 832 ti++;
833 tunnel = NULL; 833 tunnel = NULL;
@@ -837,8 +837,11 @@ static int l2tp_nl_cmd_session_dump(struct sk_buff *skb, struct netlink_callback
837 837
838 if (l2tp_nl_session_send(skb, NETLINK_CB(cb->skb).portid, 838 if (l2tp_nl_session_send(skb, NETLINK_CB(cb->skb).portid,
839 cb->nlh->nlmsg_seq, NLM_F_MULTI, 839 cb->nlh->nlmsg_seq, NLM_F_MULTI,
840 session, L2TP_CMD_SESSION_GET) < 0) 840 session, L2TP_CMD_SESSION_GET) < 0) {
841 l2tp_session_dec_refcount(session);
841 break; 842 break;
843 }
844 l2tp_session_dec_refcount(session);
842 845
843 si++; 846 si++;
844 } 847 }