mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
on systems without IPv6 support remove the IPv6 lease.
This commit is contained in:
@@ -436,3 +436,9 @@ void remove_ip_leases(main_server_st* s, struct proc_st* proc)
|
|||||||
proc->ipv6 = NULL;
|
proc->ipv6 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void remove_ip_lease(main_server_st* s, struct ip_lease_st * lease)
|
||||||
|
{
|
||||||
|
htable_del(&s->ip_leases.ht, rehash(lease, NULL), lease);
|
||||||
|
free(lease);
|
||||||
|
}
|
||||||
|
|||||||
@@ -40,5 +40,6 @@ void ip_lease_init(struct ip_lease_db_st* db);
|
|||||||
|
|
||||||
int get_ip_leases(struct main_server_st* s, struct proc_st* proc);
|
int get_ip_leases(struct main_server_st* s, struct proc_st* proc);
|
||||||
void remove_ip_leases(struct main_server_st* s, struct proc_st* proc);
|
void remove_ip_leases(struct main_server_st* s, struct proc_st* proc);
|
||||||
|
void remove_ip_lease(main_server_st* s, struct ip_lease_st * lease);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ static int set_network_info( main_server_st* s, struct proc_st* proc)
|
|||||||
close(fd);
|
close(fd);
|
||||||
fd = -1;
|
fd = -1;
|
||||||
#else
|
#else
|
||||||
|
remove_ip_lease(s, proc->ipv6);
|
||||||
|
proc->ipv6 = NULL;
|
||||||
# warn "No IPv6 support on this platform"
|
# warn "No IPv6 support on this platform"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user