}
}
- int32_t devclass = packmsg_get_int32(&in);
+ dev_class_t devclass = packmsg_get_int32(&in);
bool blacklisted = packmsg_get_bool(&in);
config_free(&config);
- if(!packmsg_input_ok(&in) || devclass < 0 || devclass > _DEV_CLASS_MAX) {
+ if(!packmsg_input_ok(&in) || devclass < 0 || devclass >= DEV_CLASS_COUNT) {
return false;
}
struct addrinfo *ai;
struct addrinfo hint = {
- .ai_family = addressfamily,
+ .ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM,
.ai_protocol = IPPROTO_TCP,
.ai_flags = AI_PASSIVE,
bool setup_myself(meshlink_handle_t *mesh) {
/* Set some defaults */
- mesh->localdiscovery = true;
- keylifetime = 3600; // TODO: check if this can be removed as well
mesh->maxtimeout = 900;
- mesh->self->options |= OPTION_PMTU_DISCOVERY;
/* Done */
mesh->self->nexthop = mesh->self;
- mesh->self->via = mesh->self;
mesh->self->status.reachable = true;
mesh->self->last_state_change = mesh->loop.now.tv_sec;
mesh->pinginterval = 60;
mesh->pingtimeout = 5;
- maxoutbufsize = 10 * MTU;
if(!setup_myself(mesh)) {
return false;