From 46ecf0e5867ea88cd9ec184b6731efbadf887392 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Mon, 28 Oct 2013 21:37:24 +0100 Subject: l2tp: No iprange check for locally created tunnels There's no need to check for iprange when creating a new tunnel upon administrator's request. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'accel-pppd/ctrl/l2tp') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index e14bab8..e018e5b 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -3786,12 +3786,6 @@ static int l2tp_create_tunnel_exec(const char *cmd, char * const *fields, return CLI_CMD_SYNTAX; } - if (iprange_client_check(peer.sin_addr.s_addr) < 0) { - cli_sendv(client, "peer address %s out of IP range\r\n", - fields[peer_indx]); - return CLI_CMD_INVAL; - } - conn = l2tp_tunnel_alloc(&peer, &host, 3, lns_mode, 0, hide_avps); if (conn == NULL) { cli_send(client, "tunnel allocation failed\r\n"); -- cgit v1.2.3 From f1adc930c84f02ff845dce3013c05bc027a8bda4 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Mon, 28 Oct 2013 21:37:29 +0100 Subject: l2tp: Don't send Assigned Sesssion ID in ICCN The Assigned Session ID AVP should only be sent in ICRQ, ICRP, OCRQ, OCRP and CDN messages. An LNS receiving an ICCN with Assigned Session ID may reject the message because of this unexpected mandatory AVP. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'accel-pppd/ctrl/l2tp') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index e018e5b..3b2e3f2 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -1822,12 +1822,6 @@ static int l2tp_send_ICCN(struct l2tp_sess_t *sess) return -1; } - if (l2tp_packet_add_int16(pack, Assigned_Session_ID, - sess->sid, 1) < 0) { - log_session(log_error, sess, "impossible to send ICCN:" - " adding data to packet failed\n"); - goto out_err; - } if (l2tp_packet_add_int32(pack, TX_Speed, 1000, 1) < 0) { log_session(log_error, sess, "impossible to send ICCN:" " adding data to packet failed\n"); -- cgit v1.2.3