ipa-proxy: Only handle some stuff of the CCM locally...
This is a good interim solution for messages not handled by us,
right now this would include the NVRAM attributes that I do not
feel like caching right now.
diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c
index 56e9101..59895c4 100644
--- a/openbsc/src/ipaccess/ipaccess-proxy.c
+++ b/openbsc/src/ipaccess/ipaccess-proxy.c
@@ -654,6 +654,10 @@
DEBUGP(DMI, "ID_ACK? -> ACK!\n");
ret = write(bfd->fd, id_ack, sizeof(id_ack));
break;
+ default:
+ LOGP(DMI, LOGL_ERROR, "Unhandled IPA type; %d\n", msg_type);
+ return 1;
+ break;
}
return 0;
}
@@ -880,11 +884,14 @@
close(bfd->fd);
bfd->fd = -1;
talloc_free(bfd);
+ msgb_free(msg);
+ return ret;
+ } else if (ret == 0) {
+ /* we do not forward parts of the CCM protocol
+ * through the proxy but rather terminate it ourselves. */
+ msgb_free(msg);
+ return ret;
}
- /* we do not forward the CCM protocol through the
- * proxy but rather terminate it ourselves */
- msgb_free(msg);
- return ret;
}
if (!ipbc) {