TBR:
veyron/profiles/net: fix the build.
Change-Id: Ib20e47081117a2b45d014a98c9956fa8e870b649
diff --git a/profiles/net/gce_linux.go b/profiles/net/gce_linux.go
index 785d38e..fa09109 100644
--- a/profiles/net/gce_linux.go
+++ b/profiles/net/gce_linux.go
@@ -6,6 +6,7 @@
"net"
"veyron2"
+ "veyron2/config"
"veyron/profiles/internal/gce"
)
@@ -14,15 +15,12 @@
log := rt.Logger()
if gce.RunningOnGCE() {
var pub net.IP
- pub = publish_addr.IP
- if pub == nil {
- // Determine the IP address from GCE's metadata
- if ip, err := gce.ExternalIPAddress(); err != nil {
- log.Infof("failed to query GCE metadata: %s", err)
- } else {
- // 1:1 NAT case, our network config will not change.
- pub = ip
- }
+ // Determine the IP address from GCE's metadata
+ if ip, err := gce.ExternalIPAddress(); err != nil {
+ log.Infof("failed to query GCE metadata: %s", err)
+ } else {
+ // 1:1 NAT case, our network config will not change.
+ pub = ip
}
if pub == nil {
log.Infof("failed to determine public IP address to publish with")
@@ -31,9 +29,9 @@
ch := make(chan config.Setting)
defer close(ch)
if _, err := publisher.CreateStream(StreamName, "network configuration", ch); err != nil {
- return nil, nil, err
+ return false
}
- publishInitialSettings(ch, listenProtocol, listenSpec, prevAddr)
+ publishInitialSettings(ch, listen_protocol, listen_addr.IP.String(), pub)
return true
}
return false