gtphub: fix echo reply to SGSNs: wrong fd. Add test.
The actual fix is just one character, but also add a regression test against
this, on both CTRL and USER plane.
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 22da9a3..e86620f 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -1559,7 +1559,7 @@
if (reply_len > 0) {
/* It was an echo. Nothing left to do. */
osmo_sockaddr_copy(to_addr, from_addr);
- *to_ofd = &hub->to_ggsns[plane_idx].ofd;
+ *to_ofd = &hub->to_sgsns[plane_idx].ofd;
return reply_len;
}
if (reply_len < 0)