Fixed typos

This commit is contained in:
Mathias Hall-Andersen 2017-11-29 21:12:09 +01:00
parent 471f7ff08e
commit 479a6f240e
3 changed files with 6 additions and 5 deletions

View file

@ -136,6 +136,7 @@ func NewDevice(tun TUNDevice, logger *Logger) *Device {
device.log = logger device.log = logger
device.peers = make(map[NoisePublicKey]*Peer) device.peers = make(map[NoisePublicKey]*Peer)
device.tun.device = tun device.tun.device = tun
device.tun.isUp.Set(false)
device.indices.Init() device.indices.Init()
device.ratelimiter.Init() device.ratelimiter.Init()

View file

@ -25,7 +25,7 @@ func (peer *Peer) KeepKeyFreshSending() {
} }
} }
/* Called when a new authenticated message has been recevied /* Called when a new authenticated message has been received
* *
* NOTE: Not thread safe (called by sequential receiver) * NOTE: Not thread safe (called by sequential receiver)
*/ */
@ -106,7 +106,7 @@ func (peer *Peer) TimerAnyAuthenticatedPacketTraversal() {
} }
} }
/* Called after succesfully completing a handshake. /* Called after successfully completing a handshake.
* i.e. after: * i.e. after:
* *
* - Valid handshake response * - Valid handshake response
@ -124,7 +124,7 @@ func (peer *Peer) TimerHandshakeComplete() {
/* Event: /* Event:
* An ephemeral key is generated * An ephemeral key is generated
* *
* i.e after: * i.e. after:
* *
* CreateMessageInitiation * CreateMessageInitiation
* CreateMessageResponse * CreateMessageResponse
@ -231,7 +231,7 @@ func (peer *Peer) RoutineHandshakeInitiator() {
logInfo := device.log.Info logInfo := device.log.Info
logError := device.log.Error logError := device.log.Error
logDebug := device.log.Debug logDebug := device.log.Debug
logDebug.Println("Routine, handshake initator, started for", peer.String()) logDebug.Println("Routine, handshake initiator, started for", peer.String())
var temp [256]byte var temp [256]byte

View file

@ -62,7 +62,7 @@ func (tun *NativeTun) File() *os.File {
} }
func (tun *NativeTun) RoutineHackListener() { func (tun *NativeTun) RoutineHackListener() {
/* This is needed for the detection to work accross network namespaces /* This is needed for the detection to work across network namespaces
* If you are reading this and know a better method, please get in touch. * If you are reading this and know a better method, please get in touch.
*/ */
fd := int(tun.fd.Fd()) fd := int(tun.fd.Fd())