diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-02-13 13:50:22 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-02-13 17:24:03 +0400 |
commit | bb608827a3f1aa243916b1550f2353ab844a86c6 (patch) | |
tree | e662da21e93754137d392cf2756540a936cdc66f /accel-pppd/ctrl/l2tp | |
parent | cb6680609a6e9c66d709c028d00f89fcf3ccb703 (diff) | |
download | accel-ppp-xebd-bb608827a3f1aa243916b1550f2353ab844a86c6.tar.gz accel-ppp-xebd-bb608827a3f1aa243916b1550f2353ab844a86c6.zip |
l2tp: Fix Result Code AVP byte order
Send the Result and Error fields of StopCCN and CDN messages in network
byte order.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 0fff3a0..1179e62 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -396,7 +396,7 @@ static int l2tp_send_StopCCN(struct l2tp_conn_t *conn, uint16_t res, uint16_t err) { struct l2tp_packet_t *pack = NULL; - struct l2tp_avp_result_code rc = {res, err}; + struct l2tp_avp_result_code rc = {htons(res), htons(err)}; pack = l2tp_packet_alloc(2, Message_Type_Stop_Ctrl_Conn_Notify, &conn->peer_addr); @@ -419,7 +419,7 @@ out_err: static int l2tp_send_CDN(struct l2tp_sess_t *sess, uint16_t res, uint16_t err) { struct l2tp_packet_t *pack = NULL; - struct l2tp_avp_result_code rc = {res, err}; + struct l2tp_avp_result_code rc = {htons(res), htons(err)}; pack = l2tp_packet_alloc(2, Message_Type_Call_Disconnect_Notify, &sess->paren_conn->peer_addr); |