vconn-stream: Copy stream's IP and port info into vconn at creation time.
authorTetsuo NAKAGAWA <nakagawa@mxc.nes.nec.co.jp>
Mon, 15 Mar 2010 17:16:02 +0000 (10:16 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 15 Mar 2010 17:17:33 +0000 (10:17 -0700)
This fixes in-band control, which depends on knowing the local and remote
IP and port.

lib/vconn-stream.c

index 7a9ef38..aa2e619 100644 (file)
@@ -64,6 +64,10 @@ vconn_stream_new(struct stream *stream, int connect_status)
     s->stream = stream;
     s->txbuf = NULL;
     s->rxbuf = NULL;
+    s->vconn.remote_ip = stream_get_remote_ip(stream);
+    s->vconn.remote_port = stream_get_remote_port(stream);
+    s->vconn.local_ip = stream_get_local_ip(stream);
+    s->vconn.local_port = stream_get_local_port(stream);
     return &s->vconn;
 }