mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-11 11:56:28 +00:00
Add regexp to limit which link-local IPv6 zones allow peering, and check that a peer isn't from within the networks address block (prevents accidental tunneling)
This commit is contained in:
@ -11,6 +11,7 @@ import _ "golang.org/x/net/ipv6" // TODO put this somewhere better
|
||||
import "fmt"
|
||||
import "net"
|
||||
import "log"
|
||||
import "regexp"
|
||||
|
||||
// Core
|
||||
|
||||
@ -334,6 +335,10 @@ func (c *Core) DEBUG_setLogger(log *log.Logger) {
|
||||
c.log = log
|
||||
}
|
||||
|
||||
func (c *Core) DEBUG_setIfceExpr(expr *regexp.Regexp) {
|
||||
c.ifceExpr = expr
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func DEBUG_simLinkPeers(p, q *peer) {
|
||||
|
Reference in New Issue
Block a user