diff --git a/src/IPMeow.Dhcp/Server/Dhcp6/DhcpServer.cs b/src/IPMeow.Dhcp/Server/Dhcp6/DhcpServer.cs index b6f4463..7b82c19 100644 --- a/src/IPMeow.Dhcp/Server/Dhcp6/DhcpServer.cs +++ b/src/IPMeow.Dhcp/Server/Dhcp6/DhcpServer.cs @@ -62,8 +62,7 @@ public class Dhcp6Server : IDhcpServer, IDisposable MacAddress = null }; - - _addrProvider.GetAddress(ctx); + await _addrProvider.GetAddress(ctx); //TODO } diff --git a/src/IPMeow.Dhcp/Standalone/DecoupledAddressProvider.cs b/src/IPMeow.Dhcp/Standalone/DecoupledAddressProvider.cs index bf375b3..5a7ae5d 100644 --- a/src/IPMeow.Dhcp/Standalone/DecoupledAddressProvider.cs +++ b/src/IPMeow.Dhcp/Standalone/DecoupledAddressProvider.cs @@ -12,9 +12,9 @@ public class DecoupledIPAddressProvider : IAddressProvider GetAddress(AddressRequestContext ctx) { - _http.GetAsync($"/api/request/{(ctx.IsV6 ? "6" : "4")}/free"); + var resp = await _http.GetAsync($"/api/request/{(ctx.IsV6 ? "6" : "4")}/free"); throw new NotImplementedException(); } } diff --git a/src/IPMeow.Lib/Address/Network.cs b/src/IPMeow.Lib/Address/Prefix.cs similarity index 58% rename from src/IPMeow.Lib/Address/Network.cs rename to src/IPMeow.Lib/Address/Prefix.cs index 59f8613..d6f88ae 100644 --- a/src/IPMeow.Lib/Address/Network.cs +++ b/src/IPMeow.Lib/Address/Prefix.cs @@ -2,9 +2,9 @@ using System.Net; namespace IPMeow.Lib.Address; -public abstract class Network +public abstract class Prefix { public abstract bool IsInNetwork(IPAddress addr); - public abstract bool IsSubnetOf(Network n); + public abstract bool IsSubnetOf(Prefix n); }; diff --git a/src/IPMeow.Lib/Request/IAddressProvider.cs b/src/IPMeow.Lib/Request/IAddressProvider.cs index 0f36726..269681c 100644 --- a/src/IPMeow.Lib/Request/IAddressProvider.cs +++ b/src/IPMeow.Lib/Request/IAddressProvider.cs @@ -4,5 +4,5 @@ namespace IPMeow.Lib.Request; public interface IAddressProvider where T : AddressRequestContext { - public IPAddress GetAddress(T ctx); + public Task GetAddress(T ctx); } diff --git a/src/IPMeow.Lib/Site/Network.cs b/src/IPMeow.Lib/Site/Network.cs index 6484c3f..b34bcac 100644 --- a/src/IPMeow.Lib/Site/Network.cs +++ b/src/IPMeow.Lib/Site/Network.cs @@ -9,5 +9,5 @@ public class Network [Key] public required string Name { get; set; } public virtual ICollection DnsServers { get; set; } - public virtual ICollection Networks { get; set; } + public virtual ICollection Networks { get; set; } }