Skip to content

Commit

Permalink
fix(link): listen integer divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 16, 2024
1 parent dfc9f1a commit 45c8945
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gold/link/me.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func NewMe(cfg *MyConfig) (m Me) {
}
m.me = ip
m.subnet = *cidr
m.speedloop = cfg.SpeedLoop
if m.speedloop == 0 {
m.speedloop = 4096
}
m.conn, err = m.listen()
if err != nil {
panic(err)
Expand All @@ -110,10 +114,6 @@ func NewMe(cfg *MyConfig) (m Me) {
strconv.FormatUint(uint64(m.MTU()), 10), cfg.NICConfig.CIDRs...,
)
}
m.speedloop = cfg.SpeedLoop
if m.speedloop == 0 {
m.speedloop = 4096
}
m.mask = cfg.Mask
var buf [8]byte
binary.BigEndian.PutUint64(buf[:], m.mask)
Expand Down

0 comments on commit 45c8945

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy