shill: vpn: Create a VPN IPConfig instance before updating it.

BUG=chromium-os:27774
TEST=unit tests, 000VPNGenesis reaches the ping stage

Change-Id: I9abc5e7e00e50cebe11563ca7bd2232db3bfccf9
Reviewed-on: https://gerrit.chromium.org/gerrit/18103
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/device.h b/device.h
index 76ed0e4..dde6970 100644
--- a/device.h
+++ b/device.h
@@ -108,11 +108,13 @@
   const std::string &link_name() const { return link_name_; }
   int interface_index() const { return interface_index_; }
   const ConnectionRefPtr &connection() const { return connection_; }
-  const IPConfigRefPtr &ipconfig() const { return ipconfig_; }
   bool powered() const { return powered_; }
   virtual Technology::Identifier technology() const { return technology_; }
   std::string GetTechnologyString(Error *error);
 
+  const IPConfigRefPtr &ipconfig() const { return ipconfig_; }
+  void set_ipconfig(const IPConfigRefPtr &config) { ipconfig_ = config; }
+
   const std::string &FriendlyName() const;
 
   // Returns a string that is guaranteed to uniquely identify this Device