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 7a9ef389c75ae7b2c49fad3b201fab93e7a386ea..aa2e61947222fcee92afd2541403aca5f8053348 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;
 }