It is currently Mon Sep 25, 2017 11:18 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: host name is always null
PostPosted: Tue Nov 27, 2012 10:28 am 

Joined: Tue Nov 27, 2012 10:02 am
Posts: 2
The problem is that the Host Name AVP is always returns null (NOT SET) when I display the tunnel show info .
the strange thing is that the HOST_NAME is set in the log correctly!!

from syslog :
Nov 27 11:23:58 mhammod openl2tpd[1156]: AVPDATA: HOST_NAME: name=mamoun-068f0520
as you can see the host name has a value .

l2tpconfig tunnel show tunnel_id=54906
Tunnel 54906, from 192.168.0.90 to 192.168.0.9:-
state: ESTABLISHED
created at: Nov 27 11:23:58 2012
created by admin: NO, tunnel mode: LNS
peer tunnel id: 1, host name: NOT SET
UDP ports: local 47171, peer 1701
authorization mode: NONE, hide AVPs: OFF, allow PPP proxy: OFF
session limit: 0, session count: 1
tunnel profile: default, peer profile: default
session profile: default, ppp profile: default

here the host name is null and returns NOT SET . so what is the problem ?


Top
 Profile  
 
 Post subject: Re: host name is always null
PostPosted: Thu Nov 29, 2012 11:11 am 

Joined: Tue Nov 27, 2012 10:02 am
Posts: 2
got it!
There is a small bug in the l2tp_tunnel.c file.
in the function l2tp_tunnel_get_1_svc when we populate the tunnel information we should add the following code :

if (tunnel->peer.host_name != NULL) {
OPTSTRING(result->peer.host_name) = strdup((char *)tunnel->peer.host_name);
if (OPTSTRING(result->peer.host_name) == NULL) {
goto nomem;
}
result->peer.host_name.valid = 1;
}

.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group