Thread (13 messages) 13 messages, 4 authors, 2020-10-01
STALE2076d

[PATCH net-next 4/6] l2tp: add netlink attributes for ac_ppp session creation

From: Tom Parkin <hidden>
Date: 2020-09-30 21:07:30
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help