dont allow strange ports in the beacon addr list
This commit is contained in:
@@ -51,6 +51,23 @@
|
||||
|
||||
#include "server.h"
|
||||
|
||||
/*
|
||||
* forcePort ()
|
||||
*/
|
||||
static void forcePort (ELLLIST *pList, unsigned short port)
|
||||
{
|
||||
osiSockAddrNode *pNode;
|
||||
|
||||
pNode = (osiSockAddrNode *) ellFirst ( pList );
|
||||
while ( pNode ) {
|
||||
if ( pNode->addr.sa.sa_family == AF_INET ) {
|
||||
pNode->addr.ia.sin_port = htons (port);
|
||||
}
|
||||
pNode = (osiSockAddrNode *) ellNext ( &pNode->node );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* RSRV_ONLINE_NOTIFY_TASK
|
||||
*/
|
||||
@@ -130,6 +147,9 @@ int rsrv_online_notify_task()
|
||||
if ( ellCount ( &beaconAddrList ) == 0 ) {
|
||||
errlogPrintf ("The CA server's beacon address list was empty after initialization?\n");
|
||||
}
|
||||
else {
|
||||
forcePort ( &beaconAddrList, port );
|
||||
}
|
||||
|
||||
# ifdef DEBUG
|
||||
printChannelAccessAddressList (&beaconAddrList);
|
||||
|
||||
Reference in New Issue
Block a user