-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netcat integration test #149
Conversation
38d3877
to
404eac6
Compare
404eac6
to
efbad07
Compare
Fixes issues with quic-go trying to parse the SCION address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a non blocking comment/request
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @FR4NK-W)
netcat/netcat_integration_test.go, line 47 at r1 (raw file):
// Server serverPort := "1234" serverArgs := []string{"-l", serverPort}
it would be great to test also -k
, accept a new connection after closing, as it failed a couple of times in the past.
pkg/appnet/appquic/appquic.go, line 137 at r1 (raw file):
func mangleSCIONAddr(raddr *snet.UDPAddr) string { // Turn this into [IA,IP]:port format. // Same mangling as for the host part in MangleSCIONAddrURL github.com/netsec-ethz/scion-apps/pkg/shttp/transport.go
it is indeed the same. Could we make it one function for all uses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @FR4NK-W)
netcat/netcat_integration_test.go, line 108 at r1 (raw file):
} // UDP tests
Make this a separate test function
netcat/netcat_integration_test.go, line 152 at r1 (raw file):
} func wrapperCommand(tmpDir string, inputSource string, command string) (wrapperCmd string, err error){
OK for now, but once we need another one of these, we should make running more complex command lines a feature of the integration test framework.
pkg/appnet/appquic/appquic.go, line 71 at r1 (raw file):
if tlsConf.ServerName == "" { tlsConf.ServerName = mangleSCIONAddr(raddr) }
The default should be the remote
string, which can be a host name.
This should be moved to DialAddr
.
As far as I understand, it should be enough to just mangle the host
parameter passed to quic.Dial
(in DialAddr
) -- the tlsConf.ServerName
does not need to be touched.
pkg/appnet/appquic/appquic.go, line 105 at r1 (raw file):
if tlsConf.ServerName == "" { tlsConf.ServerName = mangleSCIONAddr(raddr) }
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 7 files reviewed, 5 unresolved discussions (waiting on @juagargi and @matzf)
netcat/netcat_integration_test.go, line 47 at r1 (raw file):
Previously, juagargi (Juan A. García Pardo Giménez de los Galanes) wrote…
it would be great to test also
-k
, accept a new connection after closing, as it failed a couple of times in the past.
Seems to require -c
in some cases, maybe in the next PR when we cleanup the wrapping.
netcat/netcat_integration_test.go, line 108 at r1 (raw file):
Previously, matzf (Matthias Frei) wrote…
Make this a separate test function
Done.
netcat/netcat_integration_test.go, line 152 at r1 (raw file):
Previously, matzf (Matthias Frei) wrote…
OK for now, but once we need another one of these, we should make running more complex command lines a feature of the integration test framework.
Done.
pkg/appnet/appquic/appquic.go, line 71 at r1 (raw file):
Previously, matzf (Matthias Frei) wrote…
The default should be the
remote
string, which can be a host name.
This should be moved toDialAddr
.
As far as I understand, it should be enough to just mangle thehost
parameter passed toquic.Dial
(inDialAddr
) -- thetlsConf.ServerName
does not need to be touched.
You are absolutely right.
Done.
pkg/appnet/appquic/appquic.go, line 105 at r1 (raw file):
Previously, matzf (Matthias Frei) wrote…
Ditto
Done.
pkg/appnet/appquic/appquic.go, line 137 at r1 (raw file):
Previously, juagargi (Juan A. García Pardo Giménez de los Galanes) wrote…
it is indeed the same. Could we make it one function for all uses?
We cannot import mangleSCIONAddr directly even if we made it public from github.com/netsec-ethz/scion-apps/pkg/shttp/ because of circular imports.
Also the parameter types are different. But the other way around works.
Moved those address mangling functions to appnet/hosts.go, but I don't like the string typedness of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r2.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @matzf)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved
Add integration test for scion-netcat
Catch panic (and fail test, when SplitHostPort is called on a SCION address)
Add workaround to not trigger SplitHostPort in quic-go use by scion-netcat
This change is