mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
move ICMP PacketTooBig sending into core
This commit is contained in:
parent
8621223a1f
commit
3393db8e77
5 changed files with 33 additions and 106 deletions
|
@ -231,6 +231,18 @@ func (c *Core) MaxMTU() uint64 {
|
|||
return c.store.maxSessionMTU()
|
||||
}
|
||||
|
||||
// SetMTU can only safely be called after Init and before Start.
|
||||
func (c *Core) SetMTU(mtu uint64) {
|
||||
if mtu < 1280 {
|
||||
mtu = 1280
|
||||
}
|
||||
c.store.mtu = mtu
|
||||
}
|
||||
|
||||
func (c *Core) MTU() uint64 {
|
||||
return c.store.mtu
|
||||
}
|
||||
|
||||
// Implement io.ReadWriteCloser
|
||||
|
||||
func (c *Core) Read(p []byte) (n int, err error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue