mirror of
https://github.com/soypat/lneto.git
synced 2026-09-11 00:59:30 +00:00
add ipv6 to xnet.StackAsync (#107)
* add ipv6 to xnet.StackAsync * dns improvements * improve DNS workings of StackAsync * add tentative ICMPv6 * work on prefixes and fix some small bugs, plan UDP/TCP6 * fix bugs in StackAsync and ipv4.Prefix.Contains * update arpsubtable * completely remove legacy internet.StackIP for StackIPv4/v6 * ipv4/ipv6 tcp/udp * add TCP6/UDP6 dialing APIs * add xnet.Stack6 interface * more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs * add stack6 tests * replace netip.Prefix with ipv4.Prefix where it makes sense
This commit is contained in:
+3
-4
@@ -366,12 +366,11 @@ func (d *Client) DNSServerFirst() netip.Addr {
|
||||
return d.dns[0]
|
||||
}
|
||||
|
||||
func (d *Client) SubnetPrefix() netip.Prefix {
|
||||
func (d *Client) SubnetPrefix() ipv4.Prefix {
|
||||
if !d.offer.valid {
|
||||
return netip.Prefix{}
|
||||
return ipv4.Prefix{}
|
||||
}
|
||||
m, _ := netip.AddrFrom4(d.offer.addr).Prefix(int(d.SubnetCIDRBits()))
|
||||
return m
|
||||
return ipv4.PrefixFrom(d.offer.addr, d.SubnetCIDRBits())
|
||||
}
|
||||
|
||||
func (d *Client) SubnetCIDRBits() uint8 {
|
||||
|
||||
Reference in New Issue
Block a user