ATTRIBUTE FreeRADIUS-Client-Src-IP-Address 1153 ipaddr
ATTRIBUTE FreeRADIUS-Client-Src-IPv6-Address 1154 ipv6addr
ATTRIBUTE FreeRADIUS-Response-Delay-USec 1155 integer
-ATTRIBUTE FreeRADIUS-Client-Behind-NAT 1156 bool
ATTRIBUTE REST-HTTP-Header 1160 string
ATTRIBUTE REST-HTTP-Body 1161 string
bool active; //!< for dynamic clients
bool negative; //!< negative cache entry
bool expired; //!< has it expired?
- bool is_nat; //!< is this client a NATed one?
- bool behind_nat; //!< is the dynamic client behind a NAT?
#ifdef WITH_TLS
bool tls_required; //!< whether TLS encryption is required.
if (!client) return false;
- if (client->behind_nat) {
- ERROR("Clients cannot be defined to be behind a NAT.");
- return false;
- }
-
/*
* Hack to fixup wildcard clients
*
{ FR_CONF_OFFSET("virtual_server", FR_TYPE_STRING, RADCLIENT, server) },
{ FR_CONF_OFFSET("response_window", FR_TYPE_TIMEVAL, RADCLIENT, response_window) },
- /*
- * This should only be set for dynamic clients.
- */
- { FR_CONF_OFFSET("behind_nat", FR_TYPE_BOOL, RADCLIENT, behind_nat) },
-
#ifdef WITH_TCP
{ FR_CONF_POINTER("proto", FR_TYPE_STRING, &hs_proto) },
{ FR_CONF_POINTER("limit", FR_TYPE_SUBSECTION, NULL), .subcs = (void const *) limit_config },
value = vp->vp_strvalue;
break;
- case FR_FREERADIUS_CLIENT_BEHIND_NAT:
- attr = "behind_nat";
- if (vp->vp_bool) {
- value = "yes";
- } else {
- value = "no";
- }
- break;
-
default:
RERROR("Ignoring attribute %s", vp->da->name);
continue;
return 1;
}
- /*
- * If we're not using connected sockets, we can't have
- * clients behind a NAT.
- */
- if (!inst->use_connected) {
- client->is_nat = false;
- client->behind_nat = false;
- }
-
memcpy(buffer, &client, sizeof(client));
return sizeof(client);
}
return 0;
}
- /*
- * We can only do NAT gateways if we're using connected
- * sockets. This code catches *statically* defined
- * clients, not dynamic ones.
- */
- if (!inst->use_connected && (address.client->is_nat || address.client->behind_nat)) {
- WARN("Ignoring NAT settings for client %s as we are not using connected sockets for listener %s",
- address.client->shortname, inst->name);
- address.client->is_nat = false;
- address.client->behind_nat = false;
- }
-
/*
* Check for a socket that SHOULD be connected. If so,
* either create the socket, OR find it in the list of
PTHREAD_MUTEX_UNLOCK(&inst->master.mutex);
}
- /*
- * This dynamic client is behind a NAT. We've
- * read all of the outstanding packets for it, so
- * we just delete the client now.
- */
- if (address.client->dynamic && address.client->behind_nat &&
- (address.client->received == 0)) {
- talloc_free(address.client);
- }
-
/*
* We're no longer tracking this packet.
* Instead, the child socket is. So we just