[Pkg-privacy-commits] [Git][pkg-privacy-team/golang-goptlib][upstream] New upstream version 1.6.0
Antoine Beaupré (@anarcat)
anarcat at debian.org
Fri Dec 6 18:45:58 GMT 2024
Antoine Beaupré pushed to branch upstream at Privacy Maintainers / golang-goptlib
Commits:
18c0cc22 by Antoine Beaupré at 2024-12-06T13:36:10-05:00
New upstream version 1.6.0
- - - - -
3 changed files:
- ChangeLog
- pt.go
- pt_test.go
Changes:
=====================================
ChangeLog
=====================================
@@ -1,8 +1,18 @@
+== v1.6.0
+
+Fixed a type assertion panic in DialOr that occurred when the network dial
+failed. Patch by Rob Jansen.
+https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib/-/issues/2
+
+Enhanced the TestGetServerBindaddrs test to compare not only MethodName and
+Addr, but also Options, and fixed a test case that expected the wrong Options.
+Patch by Jack Wampler.
+https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib/-/merge_requests/2
+
== v1.5.0
Added the ReportVersion function that lets a client or server report its
implementation version using the new STATUS TYPE=version feature.
-
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib/-/issues/1
== v1.4.0
=====================================
pt.go
=====================================
@@ -1045,5 +1045,8 @@ func DialOrWithDialer(dialer *net.Dialer, info *ServerInfo, addr, methodName str
// sent.
func DialOr(info *ServerInfo, addr, methodName string) (*net.TCPConn, error) {
c, err := DialOrWithDialer(&net.Dialer{}, info, addr, methodName)
- return c.(*net.TCPConn), err
+ if err != nil {
+ return nil, err
+ }
+ return c.(*net.TCPConn), nil
}
=====================================
pt_test.go
=====================================
@@ -275,7 +275,7 @@ func TestResolveAddr(t *testing.T) {
func bindaddrSliceContains(s []Bindaddr, v Bindaddr) bool {
for _, sv := range s {
- if sv.MethodName == v.MethodName && tcpAddrsEqual(sv.Addr, v.Addr) {
+ if sv.MethodName == v.MethodName && tcpAddrsEqual(sv.Addr, v.Addr) && argsEqual(sv.Options, v.Options) {
return true
}
}
@@ -354,12 +354,21 @@ func TestGetServerBindaddrs(t *testing.T) {
{
"alpha-1.2.3.4:1111,beta-[1:2::3:4]:2222",
"alpha,beta,gamma",
- "alpha:k1=v1,beta:k2=v2,gamma:k3=v3",
+ "alpha:k1=v1;beta:k2=v2;gamma:k3=v3",
[]Bindaddr{
{"alpha", &net.TCPAddr{IP: net.ParseIP("1.2.3.4"), Port: 1111}, Args{"k1": []string{"v1"}}},
{"beta", &net.TCPAddr{IP: net.ParseIP("1:2::3:4"), Port: 2222}, Args{"k2": []string{"v2"}}},
},
},
+ {
+ "alpha-1.2.3.4:1111,beta-[1:2::3:4]:2222",
+ "alpha,beta,gamma",
+ "alpha:k1=v1,beta:k2=v2,gamma:k3=v3",
+ []Bindaddr{
+ {"alpha", &net.TCPAddr{IP: net.ParseIP("1.2.3.4"), Port: 1111}, Args{"k1": []string{"v1,beta:k2=v2,gamma:k3=v3"}}},
+ {"beta", &net.TCPAddr{IP: net.ParseIP("1:2::3:4"), Port: 2222}, Args{}},
+ },
+ },
{
"alpha-1.2.3.4:1111",
"xxx",
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/golang-goptlib/-/commit/18c0cc226bcbe82bae23a5d10cb6d2d6f3b50f9d
--
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/golang-goptlib/-/commit/18c0cc226bcbe82bae23a5d10cb6d2d6f3b50f9d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20241206/dfcf557b/attachment-0001.htm>
More information about the Pkg-privacy-commits
mailing list