Unverified 提交 15f8b4c1 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Fix crash when two transports use colliding port ranges (#1469)

上级 f3bbd269
......@@ -2,6 +2,8 @@
### NEXT
- `Worker`: Fix crash when using colliding `portRange` values in different transports ([PR #1469](https://github.com/versatica/mediasoup/pull/1469)).
### 3.15.1
- Expose `extras` namespace which exports `EnhancedEventEmitter` and `enhancedOnce()` for now ([PR #1464](https://github.com/versatica/mediasoup/pull/1464)).
......
差异被折叠。
......@@ -109,24 +109,24 @@
"tar": "^7.4.3"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@eslint/js": "^9.15.0",
"@octokit/rest": "^21.0.2",
"@types/debug": "^4.1.12",
"@types/jest": "^29.5.14",
"@types/node": "^22.9.0",
"eslint": "^9.14.0",
"@types/node": "^22.9.1",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"jest": "^29.7.0",
"marked": "^15.0.0",
"marked": "^15.0.2",
"open-cli": "^8.0.0",
"pick-port": "^2.1.0",
"prettier": "^3.3.3",
"sctp": "^1.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0"
"typescript-eslint": "^8.15.0"
}
}
......@@ -678,8 +678,8 @@ namespace RTC
// We want it in network order.
const uint64_t address = bindAddrIn->sin_addr.s_addr;
hash = static_cast<uint64_t>(minPort) << 48;
hash = static_cast<uint64_t>(maxPort) << 32;
hash |= static_cast<uint64_t>(minPort) << 48;
hash |= static_cast<uint64_t>(maxPort) << 32;
hash |= (address >> 2) << 2;
hash |= 0x0000; // AF_INET.
......@@ -693,8 +693,8 @@ namespace RTC
const auto address = a[0] ^ a[1] ^ a[2] ^ a[3];
hash = static_cast<uint64_t>(minPort) << 48;
hash = static_cast<uint64_t>(maxPort) << 32;
hash |= static_cast<uint64_t>(minPort) << 48;
hash |= static_cast<uint64_t>(maxPort) << 32;
hash |= static_cast<uint64_t>(address) << 16;
hash |= (static_cast<uint64_t>(address) >> 2) << 2;
hash |= 0x0002; // AF_INET6.
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论