Fix issue that VPN connection fail when L2TP secret enable
Possibly, this patch may fix issue #4111 and #8943.
l2tp.c
>line#432:"answer_challenge();"
This function add message "CHALLENGE RESPONSE"
to the end of structure"outgoing".
>line#433:"set_message(0, SCCCN);"
This function set basic message "SCCCN" to structure "outgoing".
Then, the member variable "outgoing.length" is initialized.
Therefore, the message "CHALLENGE RESPONSE" is disabled.
Usually, set up basic message by "set_message()" at first,
and add message by "add_attribute_XXX".(ex. line#450-452)
Replacing these two lines each other, normal message is generated.
After we applied this patch, and testing it, we were able to be
connected normally.
Change-Id: I5f79a6272aa0c7eeac0f4264eb360b5623cc034b
Signed-off-by: shimizu.junichi <shimizu.junichi@sharp.co.jp>
diff --git a/l2tp.c b/l2tp.c
index 8a58b1a..47d33ce 100644
--- a/l2tp.c
+++ b/l2tp.c
@@ -429,8 +429,8 @@
log_print(DEBUG, "Received SCCRP (remote_tunnel = %d) -> "
"Sending SCCCN", remote_tunnel);
state = SCCCN;
- answer_challenge();
set_message(0, SCCCN);
+ answer_challenge();
break;
}
log_print(DEBUG, "Received SCCRP without %s", tunnel ?