Skip to content

Changes

Started by upstream project gerrit-libosmocore #2371
Started 17 hr ago
Queued 11 sec
Took 2 min 16 sec on build4-deb12build-ansible
gsup: encode_pdp_info(): fix wrong pdp_address index

The `PDP_TYPE_N_IETF_IPv4v6` case encodes two addresses: IPv4 from
`pdp_address[0]` and IPv6 from `pdp_address[1]`.  The IPv4 part is
encoded correctly, but the IPv6 part checks the wrong index.

The decoder decode_pdp_address() correctly puts the IPv4 address in
`pdp_address[0]` and the IPv6 address in `pdp_address[1]`.  Because
`pdp_address[0].sa_family` is `AF_INET` (not `AF_INET6`), the second
condition is always false in a proper dual-stack context, so the IPv6
part is silently dropped from every outgoing dual-stack GSUP message.

Change-Id: Ibc4a438ee7b06346839e78dc14d9d5b11b1c5bbd
Vadim Yanitskiy at