Commit 461a1fe
Fix cookie contest pseudocode
The cookie contest pseudocode can sometimes produce RESPONDER -
RESPONDER type of peers, because bit 31 is used both as a weight in a
64-bit 2's complement integer, and a sign bit. See the discussion here
for a detailed brief:
Haivision/srt#3208
This should be fixed asap in the RFC such that implementors do not end
up with this bug in their protocol stack.
We propose to avoid the use of bitmasks to
1) make the intention clearer
2) let the compiler handle the low-level details
We also propose to add a statement, reminding implementors of the
importance of considering endianness of the host and the network before
comparing the cookies.
squash1 parent d44d05f commit 461a1fe
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1663 | 1663 | | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | | - | |
1667 | | - | |
| 1666 | + | |
1668 | 1667 | | |
1669 | 1668 | | |
1670 | 1669 | | |
| |||
1680 | 1679 | | |
1681 | 1680 | | |
1682 | 1681 | | |
1683 | | - | |
| 1682 | + | |
1684 | 1683 | | |
1685 | 1684 | | |
1686 | | - | |
| 1685 | + | |
1687 | 1686 | | |
1688 | 1687 | | |
1689 | 1688 | | |
1690 | 1689 | | |
1691 | 1690 | | |
1692 | 1691 | | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1693 | 1698 | | |
1694 | 1699 | | |
1695 | 1700 | | |
| |||
0 commit comments