AW: AW: Read Client Hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I understand it correctly there is at the moment no possibility to get the hostname value in the up or down scripts. If this is correct does ocserv has the possibitlity to forward the DHCP Request to another DHCP Server and the external DHCP Server will do the DNS Update? An other idea that I have if it is possible that the Up Script will be executed at a later time when the Hostname is known by ocserv?

Regards

Matthias

-----Urspr?ngliche Nachricht-----
Von: Nikos Mavrogiannopoulos [mailto:n.mavrogiannopoulos at gmail.com] 
Gesendet: Freitag, 4. M?rz 2016 17:01
An: Matthias Mandlmeier <matthias.mandlmeier at online.de>
Cc: openconnect-devel <openconnect-devel at lists.infradead.org>
Betreff: Re: AW: Read Client Hostname

On Thu, Mar 3, 2016 at 7:00 PM, Matthias Mandlmeier <matthias.mandlmeier at online.de> wrote:
> I tested it with the the ocserv-script and added the value $Hostname in it get the Hostname.
> The Line in the ocserv-script now looks like echo "User '$USERNAME' from '$IP_REAL' connected. Local IP is '$IP_REMOTE' Hostname is '$Hostname'" >> /etc/ocserv/test2.txt and output it to a file that I can see the variables. When a client connects I get the following Output "User 'test' from 'X.X.X.X' connected. Local IP is 'X.X.X.X' Hostname is ''" and the Value of the Hostname variable is empty all other variables in the script has the correct value in it. In the debug log I see the correct hostname in this entry HTTP: X-CSTP-Hostname.

You're right, that's indeed an issue. It seems that the hostname information is only known to ocserv after the user successfully connects so it cannot forward it to the up-down scripts. Due to a bug it wasn't even available on occtl (fixed now in master branch). Not sure what we can do there except document the fact that this variable is not provided to the up script.

regards,
Nikos




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux