FreeRADIUS 2 not listening on right port

Casartello, Thomas tcasartello at
Fri May 16 16:54:03 CEST 2008

Yeah I just compiled without optimization and its working fine now.

Thomas E. Casartello, Jr.
Infrastructure Technician
Linux Specialist
Department of Information Technology
Westfield State College
Wilson 105-A
(413) 572-8245
E-Mail: tcasartello at

Red Hat Certified Technician (RHCT)

-----Original Message-----
From: at
[ at lists.freeradius
.org] On Behalf Of Phil Mayers
Sent: Friday, May 16, 2008 10:49 AM
To: FreeRadius users mailing list
Subject: Re: FreeRADIUS 2 not listening on right port

Alan DeKok wrote:
> Michael Griego wrote:
>> I did a little looking into this this evening.  This assessment looks
>> be correct as it looks to be related to compiler optimizations.  With
>> the optimizations disabled in, FreeRADIUS will start up on
>> correct port.  For the fr_socket function, gcc appears to be
>> the arguments by sending them through the registers instead of the
>> frame, but the "port" argument is being clobbered ("optimized out")
>> before the htons(port) call.  Specifically, according to a
>> with GDB, after the first function call in fr_socket (which is to
>> socket()), the port variable is gone ("optimized out").
>   <sigh>  I've started testing the server with other compilers.  GCC
> getting too ugly for my liking.
>   I'll put a note on the main web page.: DON'T USE -O2 ON FEDORA!

I can confirm this; I've opened a bug in the Fedora bugzilla:

...with any luck, the toolchain will get fixed - it's clearly not a 
FreeRadius bug, and I wonder what else it's broken...
List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list