upnp Controller: add upnpContext()

Change-Id: I8abe918b0e7405cff7df59c7d7f29479b270218a
diff --git a/include/upnp/upnp_control.h b/include/upnp/upnp_control.h
index 6958539..1a7d56a 100644
--- a/include/upnp/upnp_control.h
+++ b/include/upnp/upnp_control.h
@@ -54,6 +54,8 @@
     void releaseMapping(const Mapping& map);
     static uint16_t generateRandomPort(PortType);
 
+    std::shared_ptr<UPnPContext> upnpContext() const { return upnpContext_; }
+
 private:
     // Adds a mapping locally to the list.
     void addLocalMap(const Mapping& map);
diff --git a/src/connectionmanager.cpp b/src/connectionmanager.cpp
index 47e730f..f20d1fe 100644
--- a/src/connectionmanager.cpp
+++ b/src/connectionmanager.cpp
@@ -1473,7 +1473,7 @@
     IceTransportOptions opts;
     opts.factory = config_->factory;
     opts.upnpEnable = getUPnPActive();
-    opts.upnpContext = config_->upnpCtrl;
+    opts.upnpContext = config_->upnpCtrl->upnpContext();
 
     if (config_->stunEnabled)
         opts.stunServers.emplace_back(StunServerInfo().setUri(config_->stunServer));