Skip to content

Commit 212a338

Browse files
committed
restrict imei mapping to MNR project
1 parent 2d64d6e commit 212a338

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

metadata_writer_zeromq.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,17 @@ static json_object *md_zeromq_create_iface_json(const struct md_writer_zeromq *m
375375
return NULL;
376376
}
377377

378-
if (mie->ifname && mie->imei) {
379-
int iifindex=map_imei(mie->imei, mwz);
380-
if (iifindex > -1) {
381-
char iifname[4]="opX";
382-
iifname[2]=iifindex + '0';
383-
if (!md_zeromq_create_json_string(obj, mwz->keys[MD_ZMQ_KEY_MONROE_IIF_NAME], iifname)) {
384-
json_object_put(obj);
385-
return NULL;
378+
if (mwz->metadata_project == MD_PROJECT_MNR) {
379+
if (mie->ifname && mie->imei) {
380+
int iifindex=map_imei(mie->imei, mwz);
381+
if (iifindex > -1) {
382+
char iifname[4]="opX";
383+
iifname[2]=iifindex + '0';
384+
if (!md_zeromq_create_json_string(obj,
385+
mwz->keys[MD_ZMQ_KEY_MONROE_IIF_NAME], iifname)) {
386+
json_object_put(obj);
387+
return NULL;
388+
}
386389
}
387390
}
388391
}

0 commit comments

Comments
 (0)