rib: Fixing bug with RibUnregister when route origin is not specified

Change-Id: Ica250a1c45ed42f1dc7862a12916f893fa846312
Refs: #1773
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index fa26b8e..28a1e3e 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -263,8 +263,10 @@
   //so passing only the required arguments.
   ControlParameters parameters;
   parameters.setName(params.getName());
-  parameters.setFaceId(params.getFaceId());
-  parameters.setOrigin(params.getOrigin());
+  if (params.hasFaceId())
+    parameters.setFaceId(params.getFaceId());
+  if (params.hasOrigin())
+    parameters.setOrigin(params.getOrigin());
 
   if (!validateParameters(command, parameters))
     {