Age | Commit message (Collapse) | Author |
|
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
|
|
Define l2tp_packet_add_int64() to create attributes of 64 bits long
integers.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Add option "hide-avps" in the "l2tp" section for hiding attributes
sent to peer. This same option is also made available on accel-ppp's
command line interface:
accel-ppp# tunnel create tunnel peer-addr 192.0.2.1 hide-avps 1
Attribute hiding is performed upon attribute creation (in the
l2tp_packet_add_*() functions family) rather than upon packet sending.
This avoid running the cipher for every retransmission; the counterpart
is that l2tp_packet_print() can't dump original attributes of hidden
AVPs.
Currently, only one random vector is used for all hidden AVPs in a
packet. This is easily extensible though, as the 'last_RV' field in
struct l2tp_packet_t may be overridden to use new vectors for next
AVPs.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Decode hidden AVPs on reception. This is transparent for functions in
l2tp.c (except for the presence of the Random Vector AVP).
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Received attributes of type ATTR_TYPE_INT64 are transferred to upper
layer in network byte order while any other integer type uses host
byte order.
This patch converts int64 values to host byte order so that they can be
used like other integer types.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
When adding a string AVP to an L2TP packet, the attribute value is
allocated and set using strdup(). There's no need to memcpy() it
again afterwards.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Define the address parameter of l2tp_packet_alloc() as constant.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Declare parameters and variables of l2tp_packet_print() as constant.
Also update l2tp_dict_find_value() prototype to accept options passed
by l2tp_packet_print().
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Send L2TP messages to the host set in the addr field of l2tp_packet_t,
instead of relying on the file descriptor's connection state. This
will allow the file descriptor to be disconnected (allowing it to
wait for a message from an arbitrary source port) while still being
able to retransmit previous L2TP messages.
This possibility is necessary for initiating tunnel establishment: the
initial SCCRQ is sent to the peer on port 1701, but the peer may reply
with an arbitrary source port. The socket thus needs to be disconnected
to be able to receive the peer's SCCRP. But in the mean time, the
initial SCCRQ may need to be retransmitted (if no answer is received
from the peer after a given amount of time). Hence the need for sending
L2TP messages over unconnected sockets.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
* l2tp: Fix allocation checking when adding octets AVP
* cli, tcp: Fix non-NULL terminated string reception
* Fix va_end() missing calls
* chap-secrets: implemented encryption
* auth_pap: make messages like other auth modules
* cli: check xmit_buf is not null at enter to write function
* pppoe: implemented regular expression support
* chap-secrets: implemented encryption
* ippool: fixed initialization order
* optional shaper compiling
* ppp: dns/wins code cleanup
|
|
|
|
Fix several errors and compiler warnings in format string
arguments.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Stop sending messages on tunnels for which no peer is listening.
Discard retransmissions too.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
to ignore them, instead of refusing connection.
Signed-off-by: Denys Fedoryshchenko <denys@visp.net.lb>
|
|
|
|
|