[OpenSIPS-Devel] [OpenSIPS/opensips] 3e8721: b2b_logic: fix duplicate out_sdp serialization

Răzvan Crainea noreply at github.com
Tue Dec 9 09:15:48 UTC 2025


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 3e87218b01c75666a45672c41069f63e178c1cdc
      https://github.com/OpenSIPS/opensips/commit/3e87218b01c75666a45672c41069f63e178c1cdc
  Author: dirkbro <dirkbrouwers at hotmail.com>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M modules/b2b_logic/entity_storage.c

  Log Message:
  -----------
  b2b_logic: fix duplicate out_sdp serialization

When packing B2B entities for cluster replication in
b2bl_entity_pack(), the out_sdp field is currently serialized twice:
// Around line 133 (packing)
	if (event_type == B2B_EVENT_CREATE) {

		...

		bin_push_str(storage, &entity->hdrs);
		bin_push_str(storage, &entity->out_sdp);       // First time

		bin_push_str(storage, &entity->dlginfo->callid);
		bin_push_str(storage, &entity->dlginfo->fromtag);
		bin_push_str(storage, &entity->dlginfo->totag);
	}

	bin_push_str(storage, &entity->out_sdp);      // Second time - remove this

However, in receive_entity_create(), out_sdp is deserialized only once, with the expected sequence being:

// Around line 344 (unpacking)
	bin_pop_str(storage, &hdrs);
	bin_pop_str(storage, &sdp);

	...

	bin_pop_str(storage, &dlginfo.callid);
	bin_pop_str(storage, &dlginfo.fromtag);
	bin_pop_str(storage, &dlginfo.totag);

Because the pack side writes out_sdp twice but the unpack side reads it only once, the binary stream becomes misaligned and all subsequent fields are read from the wrong offset. In clustered deployments this
corrupts the reconstructed entity, including entity->no, which leads to
errors such as:

  ERROR:b2b_logic:receive_entity_create: Bad entity bridge no [21349]
  for tuple [549.0]


  Commit: 4264a0bc0dac30b8beb65b4c4f72b9982c8a0197
      https://github.com/OpenSIPS/opensips/commit/4264a0bc0dac30b8beb65b4c4f72b9982c8a0197
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M modules/auth_web3/README

  Log Message:
  -----------
  auth_web3: update README


  Commit: 8181d5a3ce0f956b9a979dc478c87ee5e4b40a7a
      https://github.com/OpenSIPS/opensips/commit/8181d5a3ce0f956b9a979dc478c87ee5e4b40a7a
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M packaging/debian/control
    M packaging/debian/rules
    M packaging/redhat_fedora/opensips.spec

  Log Message:
  -----------
  Revert "add auth_web3 module"

This reverts commit 7109f39a0f597b2d71f7369be5d41f12ef9d88e1.


  Commit: 433d33bc4819be45d5b21e28ddde9253d36b5486
      https://github.com/OpenSIPS/opensips/commit/433d33bc4819be45d5b21e28ddde9253d36b5486
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M Makefile.conf.template
    M packaging/debian/rules
    M packaging/redhat_fedora/opensips.spec

  Log Message:
  -----------
  auth_web3: prevent module from compiling


  Commit: b572d218addd4d49036d674a67a553619fd53d96
      https://github.com/OpenSIPS/opensips/commit/b572d218addd4d49036d674a67a553619fd53d96
  Author: Your Name <ron at cellact.nl>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M modules/auth_web3/README

  Log Message:
  -----------
  docs(auth_web3): regenerate README from updated XML

README now includes complete Multi-Network Configuration chapter


  Commit: d20655d5c7e84b36f832897dcf36f8e917d75b0c
      https://github.com/OpenSIPS/opensips/commit/d20655d5c7e84b36f832897dcf36f8e917d75b0c
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M modules/auth_web3/README

  Log Message:
  -----------
  [auth-web3] README re-generated


  Commit: fa9ca0f067181414d4aaa48ecb7a9ed132281013
      https://github.com/OpenSIPS/opensips/commit/fa9ca0f067181414d4aaa48ecb7a9ed132281013
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M Makefile.conf.template
    M packaging/debian/rules
    M packaging/redhat_fedora/opensips.spec

  Log Message:
  -----------
  Revert "auth_web3: prevent module from compiling"

This reverts commit e53c4c25908c59862a91a5d51202a3a5b8f492d5.


  Commit: b1e3e2bf336b11c9c226ec1fe5e55a7505cc0c24
      https://github.com/OpenSIPS/opensips/commit/b1e3e2bf336b11c9c226ec1fe5e55a7505cc0c24
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M packaging/debian/control
    M packaging/debian/rules
    M packaging/redhat_fedora/opensips.spec

  Log Message:
  -----------
  Reapply "add auth_web3 module"

This reverts commit 197adc02dae0741d5265cf08c2e14643f16aba59.


  Commit: b88203c1e8f13dc5eaf3ff38a7724d2d6ec6d85c
      https://github.com/OpenSIPS/opensips/commit/b88203c1e8f13dc5eaf3ff38a7724d2d6ec6d85c
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M modules/b2b_logic/entity_storage.c

  Log Message:
  -----------
  b2b_logic: also replicate in_sdp for created entity


Compare: https://github.com/OpenSIPS/opensips/compare/ebedd16027dd...b88203c1e8f1

To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications



More information about the Devel mailing list