Change in osmo-hlr[master]: gsup_router.c: gsup_route_find(): support blob

osmith gerrit-no-reply at
Tue Apr 2 12:55:18 UTC 2019

osmith has posted comments on this change. ( )

Change subject: gsup_router.c: gsup_route_find(): support blob

Patch Set 2:


> I am not fully decided which way to go, but I lean towards: now always send the terminating nul from GSUP clients as contained in destination addresses (counted in the addr_len), i.e. we contain the nul in the BLOB, but the code should ignore that fact as much as currently possible -- towards a future where no code depends on the nul.

This sounds like a good solution to me. The patch only seems to make it more complex. I'll update the follow up patch to not depend on this one anymore, and just send the \0 at the end: ("hlr.c: forward GSUP messages between clients")

Then I'll abandon this one.
File src/gsup_router.c:
PS2, Line 43: talloc_total_size
> You could alternatively extend struct 'gsup_route' with 'addr_len', and modify gsup_route_add() to s […]
PS2, Line 45: a lot of code assumes that addr is also nul-terminated
> Wait, your previous comment also states that "gr->addr is a nul-terminated string" o_O.
Yes, that is redundant.
PS2, Line 49: Compare addr as non-nul-terminated blob
> Wouldn't this cause a collision when e.g. both (read in hex): […]
IIRC it would work, because gs->routes would always have \0 at the end ("gr->addr is a nul-terminated string"). So it would look like this:

 - 0xff, 0x00, 0x00, 0xbb, 0xaa, 0xff, 0x00  (gr->addr)
 - 0xff, 0x00, 0x00, 0xbb, 0xaa, 0x77        (addr)

addrlen would be 6, the check would return false.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I01a45900e14d41bcd338f50ad85d9fabf2c61405
Gerrit-Change-Number: 13048
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-CC: Vadim Yanitskiy <axilirator at>
Gerrit-Comment-Date: Tue, 02 Apr 2019 12:55:18 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list