All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, jchapman@katalix.com, liuhangbin@gmail.com
Subject: [PATCH net-next 1/2] l2tp: fix missing print session offset info
Date: Fri, 22 Dec 2017 15:10:17 +0100	[thread overview]
Message-ID: <3b589995fde2d5fc78f37ba616b346b923b84476.1513951129.git.lorenzo.bianconi@redhat.com> (raw)
In-Reply-To: <cover.1513951129.git.lorenzo.bianconi@redhat.com>

From: Hangbin Liu <liuhangbin@gmail.com>

Report offset parameter in L2TP_CMD_SESSION_GET command if
it has been configured by userspace

Fixes: 309795f4bec ("l2tp: Add netlink control API for L2TP")
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 net/l2tp/l2tp_netlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index a1f24fb2be98..7e9c50125556 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -761,6 +761,8 @@ static int l2tp_nl_session_send(struct sk_buff *skb, u32 portid, u32 seq, int fl
 
 	if ((session->ifname[0] &&
 	     nla_put_string(skb, L2TP_ATTR_IFNAME, session->ifname)) ||
+	    (session->offset &&
+	     nla_put_u16(skb, L2TP_ATTR_OFFSET, session->offset)) ||
 	    (session->cookie_len &&
 	     nla_put(skb, L2TP_ATTR_COOKIE, session->cookie_len,
 		     &session->cookie[0])) ||
-- 
2.13.6

  reply	other threads:[~2017-12-22 14:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 14:10 [PATCH net-next 0/2] l2tp: fix offset/peer_offset conf parameters Lorenzo Bianconi
2017-12-22 14:10 ` Lorenzo Bianconi [this message]
2017-12-22 14:10 ` [PATCH net-next 2/2] l2tp: add peer_offset parameter Lorenzo Bianconi
2017-12-28 14:53   ` Guillaume Nault
2017-12-28 18:23     ` Lorenzo Bianconi
2017-12-28 19:45       ` Guillaume Nault
2017-12-29 18:53         ` James Chapman
2017-12-29 22:21           ` Lorenzo Bianconi
2018-01-02 18:05             ` Guillaume Nault
2018-01-02 19:28               ` Lorenzo Bianconi
2018-01-02 20:18                 ` James Chapman
2018-01-03 14:16                 ` Guillaume Nault
2018-01-03 15:06                   ` Lorenzo Bianconi
2018-01-03 16:35                     ` Guillaume Nault
2018-01-08 17:27                       ` Lorenzo Bianconi
2018-01-02 20:08               ` James Chapman
2018-01-02 20:59                 ` James Chapman
2018-01-03 14:27                   ` Guillaume Nault
2018-01-02 17:50           ` Guillaume Nault
2018-01-02 20:08             ` James Chapman
2017-12-27 17:12 ` [PATCH net-next 0/2] l2tp: fix offset/peer_offset conf parameters David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b589995fde2d5fc78f37ba616b346b923b84476.1513951129.git.lorenzo.bianconi@redhat.com \
    --to=lorenzo.bianconi@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jchapman@katalix.com \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.