Index: /trunk/src/VBox/NetworkServices/DHCP/Config.cpp
===================================================================
--- /trunk/src/VBox/NetworkServices/DHCP/Config.cpp	(revision 49917)
+++ /trunk/src/VBox/NetworkServices/DHCP/Config.cpp	(revision 49918)
@@ -773,5 +773,5 @@
     RT_ZERO(opt);
 
-    std::vector<RawOption> extra(2);
+    std::vector<RawOption> extra;
     opt.u8OptId = RTNET_DHCP_OPT_MSG_TYPE;
     opt.au8RawOpt[0] = RTNET_DHCP_MT_OFFER;
@@ -789,5 +789,5 @@
     extra.push_back(opt);
 
-    processParameterReqList(client, pu8ReqList, cReqList);
+    processParameterReqList(client, pu8ReqList, cReqList, extra);
 
     return doReply(client, extra);
@@ -826,5 +826,5 @@
     RT_ZERO(opt);
 
-    std::vector<RawOption> extra(2);
+    std::vector<RawOption> extra;
     opt.u8OptId = RTNET_DHCP_OPT_MSG_TYPE;
     opt.au8RawOpt[0] = RTNET_DHCP_MT_ACK;
@@ -841,5 +841,5 @@
     extra.push_back(opt);
 
-    processParameterReqList(client, pu8ReqList, cReqList);
+    processParameterReqList(client, pu8ReqList, cReqList, extra);
 
     return doReply(client, extra);
@@ -979,25 +979,22 @@
 
 
-int NetworkManager::processParameterReqList(const Client& client, uint8_t *pu8ReqList, int cReqList)
-{
+int NetworkManager::processParameterReqList(const Client& client, const uint8_t *pu8ReqList, 
+                                            int cReqList, std::vector<RawOption>& extra)
+{
+    const Lease l = client.lease();
+    
+    const NetworkConfigEntity *pNetCfg = l.getConfig();
+
     /* request parameter list */
     RawOption opt;
-    int idxParam = 0;
-
-    uint8_t *pReqList = pu8ReqList;
-    
-    const Lease const_l = client.lease();
-    Lease l = Lease(const_l);
-    
-    const NetworkConfigEntity *pNetCfg = l.getConfig();
-
-    for (idxParam = 0; idxParam < cReqList; ++idxParam)
-    {
-
-        bool fIgnore = false;
+    bool fIgnore;
+    uint8_t u8Req;
+    for (int idxParam = 0; idxParam < cReqList; ++idxParam)
+    {
+        fIgnore = false;
         RT_ZERO(opt);
-        opt.u8OptId = pReqList[idxParam];
-
-        switch(pReqList[idxParam])
+        u8Req = opt.u8OptId = pu8ReqList[idxParam];
+
+        switch(u8Req)
         {
             case RTNET_DHCP_OPT_SUBNET_MASK:
@@ -1011,5 +1008,5 @@
                 {
                     const Ipv4AddressContainer lst =
-                      g_ConfigurationManager->getAddressList(pReqList[idxParam]);
+                      g_ConfigurationManager->getAddressList(u8Req);
                     PRTNETADDRIPV4 pAddresses = (PRTNETADDRIPV4)&opt.au8RawOpt[0];
 
@@ -1029,5 +1026,5 @@
             case RTNET_DHCP_OPT_DOMAIN_NAME:
                 {
-                    std::string domainName = g_ConfigurationManager->getString(pReqList[idxParam]);
+                    std::string domainName = g_ConfigurationManager->getString(u8Req);
                     if (domainName == g_ConfigurationManager->m_noString)
                     {
@@ -1043,5 +1040,5 @@
                 break;
             default:
-                Log(("opt: %d is ignored\n", pReqList[idxParam]));
+                Log(("opt: %d is ignored\n", u8Req));
                 fIgnore = true;
                 break;
@@ -1049,5 +1046,5 @@
 
         if (!fIgnore)
-            l.options().insert(std::map<uint8_t, RawOption>::value_type(opt.u8OptId, opt));
+            extra.push_back(opt);
 
     }
@@ -1220,10 +1217,4 @@
 
 const MapOptionId2RawOption& Lease::options() const
-{
-    return m->options;
-}
-
-
-MapOptionId2RawOption& Lease::options()
 {
     return m->options;
Index: /trunk/src/VBox/NetworkServices/DHCP/Config.h
===================================================================
--- /trunk/src/VBox/NetworkServices/DHCP/Config.h	(revision 49917)
+++ /trunk/src/VBox/NetworkServices/DHCP/Config.h	(revision 49918)
@@ -133,5 +133,4 @@
 
     const MapOptionId2RawOption& options() const;
-    MapOptionId2RawOption& options();
 
     bool toXML(xml::ElementNode *) const;
@@ -516,5 +515,5 @@
     int prepareReplyPacket4Client(const Client& client, uint32_t u32Xid);
     int doReply(const Client& client, const std::vector<RawOption>& extra);
-    int processParameterReqList(const Client& client, uint8_t *pu8ReqList, int cReqList);
+    int processParameterReqList(const Client& client, const uint8_t *pu8ReqList, int cReqList, std::vector<RawOption>& extra);
 
 private:
