From f08bdbd48a34cf1564710cd0e23c289a25ad3041 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Wed, 8 Apr 2015 18:09:13 +0000 Subject: [PATCH] Inital commit. FossilOrigin-Name: 893522ceb3cf083d3d35a6c186e8509d719b8c520215ed0e344a8432a430ac52 --- src/capwap/cw_in_check_disc_resp.c | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/capwap/cw_in_check_disc_resp.c diff --git a/src/capwap/cw_in_check_disc_resp.c b/src/capwap/cw_in_check_disc_resp.c new file mode 100644 index 00000000..bf6f2a23 --- /dev/null +++ b/src/capwap/cw_in_check_disc_resp.c @@ -0,0 +1,32 @@ + +#include "capwap.h" +#include "intavltree.h" +#include "cw_log.h" +#include "dbg.h" +#include "sock.h" + +int cw_in_check_disc_resp(struct conn *conn, struct cw_action_in *a, uint8_t * data, + int len) +{ + cw_action_in_t *mlist[20]; + int n = cw_check_missing_mand(mlist, conn, a); + cw_dbg_missing_mand(DBG_ELEM, conn, mlist, n, a); + + cw_dbg(DBG_CW_INFO,"This response came from: %s\n",sock_addr2str(conn->addr)); + + + /* if mandatory elements are missing, ignore this response */ + if (n) { + cw_dbg(DBG_CW_INFO, + "Ignoring Discovery Response from %s - missing mandatory elements.", + sock_addr2str(&conn->addr)); + return -1; + } + + + + + + /* ok, send response */ + return 0; +}