2016-03-07 18:57:01 +01:00
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#include "capwap.h"
|
|
|
|
#include "intavltree.h"
|
|
|
|
#include "dbg.h"
|
|
|
|
#include "log.h"
|
|
|
|
#include "capwap_items.h"
|
|
|
|
|
2016-03-07 19:09:13 +01:00
|
|
|
int cw_in_check_generic_req(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
2016-03-07 18:57:01 +01:00
|
|
|
int len,struct sockaddr *from)
|
|
|
|
{
|
|
|
|
cw_action_in_t * mlist[60];
|
|
|
|
|
|
|
|
/* Check for mandatory elements */
|
|
|
|
int n = cw_check_missing_mand(mlist,conn,a);
|
2016-03-07 19:09:13 +01:00
|
|
|
if (n) {
|
|
|
|
if ( conn->strict_capwap ){
|
|
|
|
cw_dbg_missing_mand(DBG_MSG_ERR,conn,mlist,n,a);
|
|
|
|
return CW_RESULT_MISSING_MAND_ELEM;
|
|
|
|
}
|
2016-03-07 18:57:01 +01:00
|
|
|
cw_dbg_missing_mand(DBG_RFC,conn,mlist,n,a);
|
|
|
|
}
|
2016-03-07 19:09:13 +01:00
|
|
|
|
2016-03-07 18:57:01 +01:00
|
|
|
return 0;
|
2016-03-07 19:09:13 +01:00
|
|
|
|
2016-03-07 18:57:01 +01:00
|
|
|
}
|