If there is no DNS available on system start the capwap-wtp will stop while evaluating the configuration. I fixed that by checking if the address was yet translated on every address access. If not a DNS request is started before continuing.

This commit is contained in:
Moritz Rosenthal
2016-03-24 07:09:29 +01:00
parent 1d95a62061
commit 7b9f515bd7
4 changed files with 90 additions and 36 deletions

View File

@ -11,6 +11,7 @@
/* */
#define CAPWAP_MACADDRESS_EUI48_BUFFER 18
#define CAPWAP_MACADDRESS_EUI64_BUFFER 24
#define CAPWAP_MAX_FQDN_SIZE 128
/* */
union sockaddr_capwap {
@ -20,6 +21,12 @@ union sockaddr_capwap {
struct sockaddr_storage ss;
};
struct addr_capwap {
char fqdn[CAPWAP_MAX_FQDN_SIZE];
union sockaddr_capwap socket;
char resolved;
};
/* Helper */
#define CAPWAP_GET_NETWORK_PORT(addr) ntohs((((addr)->ss.ss_family == AF_INET) ? (addr)->sin.sin_port : (((addr)->ss.ss_family == AF_INET6) ? (addr)->sin6.sin6_port : 0)))
#define CAPWAP_SET_NETWORK_PORT(addr, port) if ((addr)->ss.ss_family == AF_INET) { \