             return conReq(connectionRequestUrl, authString, (statusCode) -> callback(statusToError(statusCode)))
           callback(statusToError(statusCode))
         )
+      else if udpConnectionRequestAddress
+        return callback()
       else
         callback(statusToError(statusCode))
     )


  proj = {
    'Device.ManagementServer.ConnectionRequestURL._value' : 1,
    'Device.ManagementServer.ConnectionRequestUsername._value',
    'Device.ManagementServer.ConnectionRequestPassword._value',
    'InternetGatewayDevice.ManagementServer.ConnectionRequestURL._value' : 1,
    'InternetGatewayDevice.ManagementServer.ConnectionRequestUsername._value',
    'InternetGatewayDevice.ManagementServer.ConnectionRequestPassword._value'
  }

  db.devicesCollection.findOne({_id : deviceId}, proj, (err, device)->

# THE SOFTWARE.
###

crypto = require 'crypto'
dgram = require 'dgram'

config = require './config'
db = require './db'
http = require 'http'
