From 54396a4e4bb1da8ee5fba09beabba9d14e76f747 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Thu, 20 Jun 2019 22:44:19 -0700 Subject: [PATCH] BUILDOPTS passed to client/server makes --- Makefile | 8 ++++++++ hkexnet/hkexnet.go | 2 +- hkexnet/hkextun.go | 4 ++-- hkexsh/Makefile | 2 +- hkexshd/Makefile | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ec49fe6..84dc642 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ .PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall +#ifeq ($(MAKEOPTS),) + MAKEOPTS = $(MAKEOPTS) +#endif + +#ifeq ($(BUILDOPTS),) + BUILDOPTS = $(BUILDOPTS) +#endif + SUBPKGS = logger spinsult hkexnet TOOLS = hkexpasswd hkexsh hkexshd SUBDIRS = $(LIBS) $(TOOLS) diff --git a/hkexnet/hkexnet.go b/hkexnet/hkexnet.go index 077a350..66c2adb 100644 --- a/hkexnet/hkexnet.go +++ b/hkexnet/hkexnet.go @@ -70,7 +70,7 @@ type ( // Conn is a connection wrapping net.Conn with KEX & session state Conn struct { - kex KEXAlg // KEX/KEM propsal (client -> server) + kex KEXAlg // KEX/KEM proposal (client -> server) m *sync.Mutex // (internal) c *net.Conn // which also implements io.Reader, io.Writer, ... immClose bool diff --git a/hkexnet/hkextun.go b/hkexnet/hkextun.go index 200469e..da22882 100644 --- a/hkexnet/hkextun.go +++ b/hkexnet/hkextun.go @@ -331,8 +331,8 @@ func (hc *Conn) StartServerTunnel(lport, rport uint16) { } if (*hc.tuns)[rport].KeepAlive > 50 { - (*hc.tuns)[rport].Died = true - logger.LogDebug("[ServerTun] worker A: Client died, hanging up.") + (*hc.tuns)[rport].Died = true + logger.LogDebug("[ServerTun] worker A: Client died, hanging up.") } else { (*hc.tuns)[rport].KeepAlive += 1 } diff --git a/hkexsh/Makefile b/hkexsh/Makefile index 3aa39a8..ea7eb69 100644 --- a/hkexsh/Makefile +++ b/hkexsh/Makefile @@ -4,7 +4,7 @@ EXTPKGS = bytes,errors,flag,fmt,internal,io,log,net,os,path,runtime,time,strings EXE = $(notdir $(shell pwd)) all: - go build . + go build $(BUILDOPTS) . clean: $(RM) $(EXE) $(EXE).exe diff --git a/hkexshd/Makefile b/hkexshd/Makefile index 69f66d3..9963a7b 100644 --- a/hkexshd/Makefile +++ b/hkexshd/Makefile @@ -4,7 +4,7 @@ EXTPKGS = binary,bytes,crypto,encoding,errors,flag,fmt,internal,io,log,net,os,pa EXE = $(notdir $(shell pwd)) all: - go build . + go build $(BUILDOPTS) . clean: $(RM) $(EXE) $(EXE).exe