Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/34739?usp=email )
Change subject: IPv4-in-IPv6-GTP and IPv6-in-IPv4-GTP ......................................................................
Patch Set 1:
(1 comment)
File src/gtp-genl.c:
https://gerrit.osmocom.org/c/libgtpnl/+/34739/comment/4e39e7df_8990025b PS1, Line 136: struct { IIUC ms_addr is the upper layer IP address and sgsn_addr (inside gtp) is the lower layer IP address (below gtp)?
I already thought about this in the first patch, but now I think it even makes more sense: Shouldn't we actually packing together sgsn-addr and ms_addr instead?
struct { struct in_addr ip; struct in6_addr ip6; } sgsn_addr; struct { struct in_addr ip; struct in6_addr ip6; } ms_addr;
TBH we could even use a sockaddr_storage and fill the sa_fanmily for each one:
struct sockaddr_storage sgsn_addr; struct sockaddr_storage ms_addr;
Because AFAIU they should be actually a union for ipv4 and ipv6, because they cannot be used both at the same time.
Even reuse osmo_sockaddr idea:
struct osmo_sockaddr { union { struct sockaddr sa; struct sockaddr_storage sas; struct sockaddr_in sin; struct sockaddr_in6 sin6; } u; };