Rework some things into packages (#489)
This commit is contained in:
10
handshake.go
10
handshake.go
@ -1,11 +1,11 @@
|
||||
package nebula
|
||||
|
||||
const (
|
||||
handshakeIXPSK0 = 0
|
||||
handshakeXXPSK0 = 1
|
||||
import (
|
||||
"github.com/slackhq/nebula/header"
|
||||
"github.com/slackhq/nebula/udp"
|
||||
)
|
||||
|
||||
func HandleIncomingHandshake(f *Interface, addr *udpAddr, packet []byte, h *Header, hostinfo *HostInfo) {
|
||||
func HandleIncomingHandshake(f *Interface, addr *udp.Addr, packet []byte, h *header.H, hostinfo *HostInfo) {
|
||||
// First remote allow list check before we know the vpnIp
|
||||
if !f.lightHouse.remoteAllowList.AllowUnknownVpnIp(addr.IP) {
|
||||
f.l.WithField("udpAddr", addr).Debug("lighthouse.remote_allow_list denied incoming handshake")
|
||||
@ -13,7 +13,7 @@ func HandleIncomingHandshake(f *Interface, addr *udpAddr, packet []byte, h *Head
|
||||
}
|
||||
|
||||
switch h.Subtype {
|
||||
case handshakeIXPSK0:
|
||||
case header.HandshakeIXPSK0:
|
||||
switch h.MessageCounter {
|
||||
case 1:
|
||||
ixHandshakeStage1(f, addr, packet, h)
|
||||
|
Reference in New Issue
Block a user