diff --git a/go.mod b/go.mod index 3f0df70b..0c7787e9 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 // indirect github.com/dsnet/compress v0.0.1 - github.com/eyedeekay/goSam v0.32.27 + github.com/eyedeekay/goSam v0.32.28 github.com/eyedeekay/sam3 v0.32.3 // indirect github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect diff --git a/go.sum b/go.sum index 695a7c8e..34983e1b 100644 --- a/go.sum +++ b/go.sum @@ -142,6 +142,8 @@ github.com/eyedeekay/goSam v0.32.22 h1:SD0GEQ8MGJ1wZ4MepSa0mpZjiZAGMSTUhSwAZVrm2 github.com/eyedeekay/goSam v0.32.22/go.mod h1:YIklxqKiJ3I5JNRgb5pM7VCQOSNDGnVulHnrKBbbECM= github.com/eyedeekay/goSam v0.32.27 h1:yYdL384sLPge4K0vK7l7v4vBakrK/kf6qW9hQ7uyW/E= github.com/eyedeekay/goSam v0.32.27/go.mod h1:YIklxqKiJ3I5JNRgb5pM7VCQOSNDGnVulHnrKBbbECM= +github.com/eyedeekay/goSam v0.32.28 h1:8O9aDGr45EIS82TRm4x0xAnGnz6ZHW0/8oyqziYiN9U= +github.com/eyedeekay/goSam v0.32.28/go.mod h1:YIklxqKiJ3I5JNRgb5pM7VCQOSNDGnVulHnrKBbbECM= github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab/go.mod h1:h7mvUAMgZ/rtRDUOkvKTK+8LnDMeUhJSoa5EPdB51fc= github.com/eyedeekay/sam3 v0.32.2/go.mod h1:Y3igFVzN4ybqkkpfUWULGhw7WRp8lieq0ORXbLBbcZM= github.com/eyedeekay/sam3 v0.32.3 h1:PW1vQoo2H7c3Q4l2DngJqpSdsdJprMCk9NOkUHtcdmM= diff --git a/vendor/github.com/eyedeekay/goSam/Makefile b/vendor/github.com/eyedeekay/goSam/Makefile index 94fdae3f..c73825aa 100644 --- a/vendor/github.com/eyedeekay/goSam/Makefile +++ b/vendor/github.com/eyedeekay/goSam/Makefile @@ -1,6 +1,6 @@ USER_GH=eyedeekay -VERSION=0.32.27 +VERSION=0.32.28 packagename=gosam echo: fmt diff --git a/vendor/github.com/eyedeekay/goSam/README.md b/vendor/github.com/eyedeekay/goSam/README.md index 5fae8727..d39e25d3 100644 --- a/vendor/github.com/eyedeekay/goSam/README.md +++ b/vendor/github.com/eyedeekay/goSam/README.md @@ -85,6 +85,7 @@ to produce an unsigned deb for personal use only. For packagers, will produce a viable source package for use with Launchpad PPA's and other similar systems. + ### TODO * Improve recovery on failed sockets diff --git a/vendor/github.com/eyedeekay/goSam/dial.go b/vendor/github.com/eyedeekay/goSam/dial.go index 7bd9dac7..50b426c0 100644 --- a/vendor/github.com/eyedeekay/goSam/dial.go +++ b/vendor/github.com/eyedeekay/goSam/dial.go @@ -15,7 +15,11 @@ func (c *Client) DialContext(ctx context.Context, network, addr string) (net.Con if conn, err := c.Dial(network, addr); err != nil { errCh <- err } else if ctx.Err() != nil { - conn.Close() + var err error + c, err = c.NewClient() + if err != nil { + conn.Close() + } } else { connCh <- conn } diff --git a/vendor/github.com/eyedeekay/goSam/go.sum b/vendor/github.com/eyedeekay/goSam/go.sum index 6f9cf05b..30187b66 100644 --- a/vendor/github.com/eyedeekay/goSam/go.sum +++ b/vendor/github.com/eyedeekay/goSam/go.sum @@ -1,3 +1,4 @@ +github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab h1:EfTRHxGSbiaEyxNzvKRBWVIDw3mD8xXGxj4gvwFzY7Q= github.com/eyedeekay/ramp v0.0.0-20190429201811-305b382042ab/go.mod h1:h7mvUAMgZ/rtRDUOkvKTK+8LnDMeUhJSoa5EPdB51fc= github.com/eyedeekay/sam3 v0.32.2 h1:xODDY5nBVg0oK7KaYk7ofkXFoHPsmI1umhSv1TZlS7s= github.com/eyedeekay/sam3 v0.32.2/go.mod h1:Y3igFVzN4ybqkkpfUWULGhw7WRp8lieq0ORXbLBbcZM= diff --git a/vendor/github.com/eyedeekay/goSam/options.go b/vendor/github.com/eyedeekay/goSam/options.go index b812d45b..68f64448 100644 --- a/vendor/github.com/eyedeekay/goSam/options.go +++ b/vendor/github.com/eyedeekay/goSam/options.go @@ -369,6 +369,12 @@ func SetSignatureType(s string) func(*Client) error { //return the from port as a string. func (c *Client) from() string { + if c.fromport == "FROM_PORT=0" { + return "" + } + if c.fromport == "0" { + return "" + } if c.fromport == "" { return "" } @@ -377,6 +383,12 @@ func (c *Client) from() string { //return the to port as a string. func (c *Client) to() string { + if c.fromport == "TO_PORT=0" { + return "" + } + if c.fromport == "0" { + return "" + } if c.toport == "" { return "" } diff --git a/vendor/github.com/eyedeekay/goSam/replyParser.go b/vendor/github.com/eyedeekay/goSam/replyParser.go index c5d2e616..4abffa7e 100644 --- a/vendor/github.com/eyedeekay/goSam/replyParser.go +++ b/vendor/github.com/eyedeekay/goSam/replyParser.go @@ -39,7 +39,6 @@ type Reply struct { } func parseReply(line string) (*Reply, error) { - fmt.Println("PARSER PARTS", line) line = strings.TrimSpace(line) parts := strings.Split(line, " ") if len(parts) < 3 { @@ -54,9 +53,13 @@ func parseReply(line string) (*Reply, error) { for _, v := range parts[2:] { if strings.Contains(v, "FROM_PORT") { - r.From = v + if v != "FROM_PORT=0" { + r.From = v + } } else if strings.Contains(v, "TO_PORT") { - r.To = v + if v != "TO_PORT=0" { + r.To = v + } } else { kvPair := strings.SplitN(v, "=", 2) if kvPair != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 8d83c201..5880207b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -81,7 +81,7 @@ github.com/davecgh/go-spew/spew github.com/dsnet/compress/brotli github.com/dsnet/compress/internal github.com/dsnet/compress/internal/errors -# github.com/eyedeekay/goSam v0.32.27 +# github.com/eyedeekay/goSam v0.32.28 ## explicit github.com/eyedeekay/goSam # github.com/eyedeekay/sam3 v0.32.3