actube/src/cw/cw_in_check_generic_req.c
7u83@mail.ru 0ec4826478 Checks always for mandatory elements.
FossilOrigin-Name: 2e73b184e82e247388dd98ddcb7b4209a5063d58841d3df4600b71ce5732aad1
2016-03-19 11:57:47 +00:00

28 lines
563 B
C

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