snet: Use correct base conn
This PR makes the reader and writer conn of snet to point to the correct
base conn.
fixes
@@ -60,12 +60,13 @@ type SCIONConn struct {
}
func newSCIONConn(base *scionConnBase, pr pathmgr.Resolver, conn PacketConn) *SCIONConn {
- return &SCIONConn{
+ c := &SCIONConn{
conn: conn,
scionConnBase: *base,
- scionConnWriter: *newScionConnWriter(base, pr, conn),
- scionConnReader: *newScionConnReader(base, conn),
}
+ c.scionConnWriter = *newScionConnWriter(&c.scionConnBase, pr, conn)
+ c.scionConnReader = *newScionConnReader(&c.scionConnBase, conn)
+ return c
}
// DialSCION calls DialSCION with infinite timeout on the default networking
