提交 3ae5536b 编写于 作者: G Guillaume Nault 提交者: David S. Miller

l2tp: ignore L2TP_ATTR_DATA_SEQ netlink attribute

The value of this attribute is never used.
Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3e4e3643
...@@ -65,9 +65,9 @@ struct sockaddr_l2tpip6 { ...@@ -65,9 +65,9 @@ struct sockaddr_l2tpip6 {
* TUNNEL_MODIFY - CONN_ID, udpcsum * TUNNEL_MODIFY - CONN_ID, udpcsum
* TUNNEL_GETSTATS - CONN_ID, (stats) * TUNNEL_GETSTATS - CONN_ID, (stats)
* TUNNEL_GET - CONN_ID, (...) * TUNNEL_GET - CONN_ID, (...)
* SESSION_CREATE - SESSION_ID, PW_TYPE, data_seq, cookie, peer_cookie, l2spec * SESSION_CREATE - SESSION_ID, PW_TYPE, cookie, peer_cookie, l2spec
* SESSION_DELETE - SESSION_ID * SESSION_DELETE - SESSION_ID
* SESSION_MODIFY - SESSION_ID, data_seq * SESSION_MODIFY - SESSION_ID
* SESSION_GET - SESSION_ID, (...) * SESSION_GET - SESSION_ID, (...)
* SESSION_GETSTATS - SESSION_ID, (stats) * SESSION_GETSTATS - SESSION_ID, (stats)
* *
...@@ -95,7 +95,7 @@ enum { ...@@ -95,7 +95,7 @@ enum {
L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */ L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */
L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */ L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */
L2TP_ATTR_OFFSET, /* u16 (not used) */ L2TP_ATTR_OFFSET, /* u16 (not used) */
L2TP_ATTR_DATA_SEQ, /* u16 */ L2TP_ATTR_DATA_SEQ, /* u16 (not used) */
L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */ L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */
L2TP_ATTR_L2SPEC_LEN, /* u8 (not used) */ L2TP_ATTR_L2SPEC_LEN, /* u8 (not used) */
L2TP_ATTR_PROTO_VERSION, /* u8 */ L2TP_ATTR_PROTO_VERSION, /* u8 */
...@@ -169,6 +169,7 @@ enum l2tp_encap_type { ...@@ -169,6 +169,7 @@ enum l2tp_encap_type {
L2TP_ENCAPTYPE_IP, L2TP_ENCAPTYPE_IP,
}; };
/* For L2TP_ATTR_DATA_SEQ. Unused. */
enum l2tp_seqmode { enum l2tp_seqmode {
L2TP_SEQ_NONE = 0, L2TP_SEQ_NONE = 0,
L2TP_SEQ_IP = 1, L2TP_SEQ_IP = 1,
......
...@@ -45,10 +45,6 @@ struct l2tp_tunnel; ...@@ -45,10 +45,6 @@ struct l2tp_tunnel;
*/ */
struct l2tp_session_cfg { struct l2tp_session_cfg {
enum l2tp_pwtype pw_type; enum l2tp_pwtype pw_type;
unsigned int data_seq:2; /* data sequencing level
* 0 => none, 1 => IP only,
* 2 => all
*/
unsigned int recv_seq:1; /* expect receive packets with unsigned int recv_seq:1; /* expect receive packets with
* sequence numbers? */ * sequence numbers? */
unsigned int send_seq:1; /* send packets with sequence unsigned int send_seq:1; /* send packets with sequence
...@@ -99,10 +95,6 @@ struct l2tp_session { ...@@ -99,10 +95,6 @@ struct l2tp_session {
char name[32]; /* for logging */ char name[32]; /* for logging */
char ifname[IFNAMSIZ]; char ifname[IFNAMSIZ];
unsigned int data_seq:2; /* data sequencing level
* 0 => none, 1 => IP only,
* 2 => all
*/
unsigned int recv_seq:1; /* expect receive packets with unsigned int recv_seq:1; /* expect receive packets with
* sequence numbers? */ * sequence numbers? */
unsigned int send_seq:1; /* send packets with sequence unsigned int send_seq:1; /* send packets with sequence
......
...@@ -191,12 +191,10 @@ static void l2tp_dfs_seq_session_show(struct seq_file *m, void *v) ...@@ -191,12 +191,10 @@ static void l2tp_dfs_seq_session_show(struct seq_file *m, void *v)
if (session->send_seq || session->recv_seq) if (session->send_seq || session->recv_seq)
seq_printf(m, " nr %hu, ns %hu\n", session->nr, session->ns); seq_printf(m, " nr %hu, ns %hu\n", session->nr, session->ns);
seq_printf(m, " refcnt %d\n", refcount_read(&session->ref_count)); seq_printf(m, " refcnt %d\n", refcount_read(&session->ref_count));
seq_printf(m, " config %d/%d/%c/%c/%s/%s %08x %u\n", seq_printf(m, " config %d/%d/%c/%c/-/%s %08x %u\n",
session->mtu, session->mru, session->mtu, session->mru,
session->recv_seq ? 'R' : '-', session->recv_seq ? 'R' : '-',
session->send_seq ? 'S' : '-', session->send_seq ? 'S' : '-',
session->data_seq == 1 ? "IPSEQ" :
session->data_seq == 2 ? "DATASEQ" : "-",
session->lns_mode ? "LNS" : "LAC", session->lns_mode ? "LNS" : "LAC",
session->debug, session->debug,
jiffies_to_msecs(session->reorder_timeout)); jiffies_to_msecs(session->reorder_timeout));
......
...@@ -560,9 +560,6 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf ...@@ -560,9 +560,6 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
} }
if (tunnel->version > 2) { if (tunnel->version > 2) {
if (info->attrs[L2TP_ATTR_DATA_SEQ])
cfg.data_seq = nla_get_u8(info->attrs[L2TP_ATTR_DATA_SEQ]);
if (info->attrs[L2TP_ATTR_L2SPEC_TYPE]) { if (info->attrs[L2TP_ATTR_L2SPEC_TYPE]) {
cfg.l2specific_type = nla_get_u8(info->attrs[L2TP_ATTR_L2SPEC_TYPE]); cfg.l2specific_type = nla_get_u8(info->attrs[L2TP_ATTR_L2SPEC_TYPE]);
if (cfg.l2specific_type != L2TP_L2SPECTYPE_DEFAULT && if (cfg.l2specific_type != L2TP_L2SPECTYPE_DEFAULT &&
...@@ -693,9 +690,6 @@ static int l2tp_nl_cmd_session_modify(struct sk_buff *skb, struct genl_info *inf ...@@ -693,9 +690,6 @@ static int l2tp_nl_cmd_session_modify(struct sk_buff *skb, struct genl_info *inf
if (info->attrs[L2TP_ATTR_DEBUG]) if (info->attrs[L2TP_ATTR_DEBUG])
session->debug = nla_get_u32(info->attrs[L2TP_ATTR_DEBUG]); session->debug = nla_get_u32(info->attrs[L2TP_ATTR_DEBUG]);
if (info->attrs[L2TP_ATTR_DATA_SEQ])
session->data_seq = nla_get_u8(info->attrs[L2TP_ATTR_DATA_SEQ]);
if (info->attrs[L2TP_ATTR_RECV_SEQ]) if (info->attrs[L2TP_ATTR_RECV_SEQ])
session->recv_seq = nla_get_u8(info->attrs[L2TP_ATTR_RECV_SEQ]); session->recv_seq = nla_get_u8(info->attrs[L2TP_ATTR_RECV_SEQ]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册