should discard packet when received AUTH header length < 20 ?

Alan DeKok aland at deployingradius.com
Thu Apr 1 11:37:15 CEST 2010


WANG Tinggong wrote:
> hi all,
> 	
> in src/main/listen.c , auth_socket_recv function, rad_recv_header uses MSG_PEEK
> flag. in case 0 <= rcode < 20, malfromed request still in the receive queue, 

  No.  Read the rest of rad_recv_header().  If the message is too short,
it calls recvfrom() to discard the packet.

> should it be cleaned before line 757 ?

  No.   This would discard the *next* packet on the socket, which might
be fine!

  Alan DeKok.



More information about the Freeradius-Devel mailing list