[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200930210707.10717-5-tparkin@katalix.com>
Date: Wed, 30 Sep 2020 22:07:05 +0100
From: Tom Parkin <tparkin@...alix.com>
To: netdev@...r.kernel.org
Cc: jchapman@...alix.com, Tom Parkin <tparkin@...alix.com>
Subject: [PATCH net-next 4/6] l2tp: add netlink attributes for ac_ppp session creation
The AC PPPoE driver will require userspace to pass in both the PPPoE
session ID and the PPPoE peer's MAC address.
Add netlink attributes to allow this to be conveyed in the session
create command.
Signed-off-by: Tom Parkin <tparkin@...alix.com>
---
include/uapi/linux/l2tp.h | 2 ++
net/l2tp/l2tp_netlink.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/uapi/linux/l2tp.h b/include/uapi/linux/l2tp.h
index 30c80d5ba4bf..04e23b34669e 100644
--- a/include/uapi/linux/l2tp.h
+++ b/include/uapi/linux/l2tp.h
@@ -127,6 +127,8 @@ enum {
L2TP_ATTR_UDP_ZERO_CSUM6_TX, /* flag */
L2TP_ATTR_UDP_ZERO_CSUM6_RX, /* flag */
L2TP_ATTR_PAD,
+ L2TP_ATTR_PPPOE_SESSION_ID, /* u16 */
+ L2TP_ATTR_PPPOE_PEER_MAC_ADDR, /* 6 bytes */
__L2TP_ATTR_MAX,
};
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index 2abfea82203d..7050e8e5886e 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -920,6 +920,8 @@ static const struct nla_policy l2tp_nl_policy[L2TP_ATTR_MAX + 1] = {
.type = NLA_BINARY,
.len = 8,
},
+ [L2TP_ATTR_PPPOE_SESSION_ID] = { .type = NLA_U16, },
+ [L2TP_ATTR_PPPOE_PEER_MAC_ADDR] = NLA_POLICY_ETH_ADDR,
};
static const struct genl_ops l2tp_nl_ops[] = {
--
2.17.1
Powered by blists - more mailing lists