mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 16:30:27 +00:00
change mtu and enable udp chunking
This commit is contained in:
parent
63aadf6e88
commit
b704d7b497
@ -322,7 +322,7 @@ func (iface *udpInterface) reader() {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const udp_chunkSize = 65535
|
const udp_chunkSize = 1024
|
||||||
|
|
||||||
func udp_decode(bs []byte) (chunks, chunk, count uint8, payload []byte) {
|
func udp_decode(bs []byte) (chunks, chunk, count uint8, payload []byte) {
|
||||||
if len(bs) >= 3 {
|
if len(bs) >= 3 {
|
||||||
|
@ -249,8 +249,8 @@ func main() {
|
|||||||
n := node{}
|
n := node{}
|
||||||
n.init(cfg, logger)
|
n.init(cfg, logger)
|
||||||
logger.Println("Starting tun...")
|
logger.Println("Starting tun...")
|
||||||
n.core.DEBUG_startTun(cfg.IfName) // 1280, the smallest supported MTU
|
//n.core.DEBUG_startTun(cfg.IfName) // 1280, the smallest supported MTU
|
||||||
//n.core.DEBUG_startTunWithMTU(cfg.IfName, 65535) // Largest supported MTU
|
n.core.DEBUG_startTunWithMTU(cfg.IfName, 65535) // Largest supported MTU
|
||||||
defer func() {
|
defer func() {
|
||||||
logger.Println("Closing...")
|
logger.Println("Closing...")
|
||||||
n.core.DEBUG_stopTun()
|
n.core.DEBUG_stopTun()
|
||||||
|
Loading…
Reference in New Issue
Block a user