Change in osmo-hlr[master]: gsup_router.c: gsup_route_find(): support blob
gerrit-no-reply at lists.osmocom.org
Tue Apr 2 12:55:18 UTC 2019
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13048 )
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:
https://gerrit.osmocom.org/#/c/osmo-hlr/+/13006/ ("hlr.c: forward GSUP messages between clients")
Then I'll abandon this one.
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 https://gerrit.osmocom.org/13048
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Comment-Date: Tue, 02 Apr 2019 12:55:18 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log