diff --git a/l2tp/pppd/pppd/plugins/pppol2tp/nt_msg.h b/l2tp/pppd/pppd/plugins/pppol2tp/nt_msg.h index e6ec381..786a704 100644 --- a/l2tp/pppd/pppd/plugins/pppol2tp/nt_msg.h +++ b/l2tp/pppd/pppd/plugins/pppol2tp/nt_msg.h @@ -20,6 +20,8 @@ typedef struct _notify_msg { int remote_tunnel; int local_session; int remote_session; + int local_port; + int remote_port; struct in_addr local_addr; struct in_addr remote_addr; struct in_addr va_addr; diff --git a/l2tp/pppd/pppd/plugins/pppol2tp/pppnotify.c b/l2tp/pppd/pppd/plugins/pppol2tp/pppnotify.c index 83227a3..a0526b4 100644 --- a/l2tp/pppd/pppd/plugins/pppol2tp/pppnotify.c +++ b/l2tp/pppd/pppd/plugins/pppol2tp/pppnotify.c @@ -117,6 +117,8 @@ char* notify_format_cjson(notify_msg_t *msg, char *remote_addr, char*local_addr) cJSON_AddNumberToObject(cjson_params, "remote_tunnel", msg->remote_tunnel); cJSON_AddNumberToObject(cjson_params, "local_session", msg->local_session); cJSON_AddNumberToObject(cjson_params, "remote_session", msg->remote_session); + cJSON_AddNumberToObject(cjson_params, "local_port", msg->local_port); + cJSON_AddNumberToObject(cjson_params, "remote_port", msg->remote_port); cJSON_AddStringToObject(cjson_params, "local_addr", local_addr); cJSON_AddStringToObject(cjson_params, "remote_addr", remote_addr); cJSON_AddStringToObject(cjson_params, "va_addr", inet_ntoa(msg->va_addr)); @@ -155,6 +157,8 @@ int notify_ppp_status(char *remote, char*local, int status) msg.remote_tunnel = remote_tunnel_id; msg.local_session = pppol2tp_session_id; msg.remote_session = remote_session_id; + msg.local_port = local_port; + msg.remote_port = remote_port; //inet_aton(local, &msg.local_addr); //inet_aton(remote, &msg.remote_addr);