]> jfr.im git - irc/rqf/shadowircd.git/blame - doc/technical/ts5.txt
Prevent cork usage as charybdis doesn't have its support
[irc/rqf/shadowircd.git] / doc / technical / ts5.txt
CommitLineData
212380e3 1 Overview of the TS5 system
2 Lee H <lee@leeh.co.uk>
3
4$Id: ts5.txt 6 2005-09-10 01:02:21Z nenolod $
5
6For the purposes of this document, ircd versions:
7 hybrid6.0
8 ircd-comstud-1.12
9 CSr31pl4
10
11and prior, are TS3.
12
13ircd-hybrid-6.2 and later support TS5.
14
15
16Whats TS5?
17----------
18
19The difference between TS5 and TS3 is what happened on opless channels. TS
20works by establishing which server has the oldest version of the channel,
21the version that is oldest, keeps its modes and ops, the version that is
22youngest, removes their modes and ops, and accepts the older version.
23
24There was an exception to this rule with opless channels, if a channel was
25opless, TS3 would allow anybody to keep their ops and modes on the channel.
26TS5 aims to stop this, by removing this exception.
27
28Example1:
29
30An irc network, with server A (every server is ts3)
31
32UserA is on ServerA, in channel #broken. This channel is opless, and has a
33TS of 800000000. ServerA splits, and whilst it is split, UserA cycles
34channel #broken, recreates the channel and is given ops. On ServerA #broken
35now has a TS of 900000000 and has ops. ServerA rejoins with the network,
36via HubB. HubB realises #broken is opless, so allows UserA to retain ops.
37The TS is moved forward to 900000000.
38
39The network now sees #broken as having a TS of 900000000, with UserA being
40opped.
41
42Example2:
43
44An irc network, with server C (every server is ts5)
45
46Same scenario as above. ServerC splits and UserC cycles channel #broken,
47recreating it with a TS of 900000000. ServerC rejoins with the network via
48HubD. HubD realises #broken has a TS of 800000000 locally, and ServerC is
49showing a TS of 900000000, it ignores ServerC's modes and ops. The channel
50remains opless. ServerC receives HubD's modes, and it notices HubD has a
51lower TS of channel #broken. It removes UserC's ops, removes the channel
52modes on #broken, and accepts HubD's status.
53
54The network version of #broken hasnt changed. It is still opless, with a TS
55of 800000000.
56
57
58As you can see, TS5 makes splitting a server to regain ops useless, as it
59cannot be abused to give ops after a netsplit.
60
61The problem with TS5 however, is what happens on a mixed TS5/TS3 network.
62Channels where the older TS has ops will behave the same way on TS5 and TS3,
63however an opless channel will behave differently, as you can see above.
64
65The result of TS5/TS3 mixed can be a desync:
66
67Example1:
68
69As per Example1 above, except the rest of the network is TS5, ServerA is
70TS3. ServerA would keep its modes and ops, whilst the rest of the network
71would remove them. This means only ServerA would see UserA as opped. The
72desync can be abused, as UserA can send modes. Hybrid6.0 servers will
73accept these modes from the unopped client, so if UserA ops UserB, who then
74ops UserA, the channel will be the same across all Hybrid6.0 and Hybrid6.1
75servers.
76
77Example2:
78
79As per Example2 above, except the rest of the network is TS3. ServerC is
80TS5. ServerC would remove its modes and ops, therefore UserC would not be
81opped on ServerC, therefore it could not send any mode changes to the
82channel. Although it is opped elsewhere, it isnt opped locally, so the
83desync cannot be abused.
84
85As you can see, the desync's that can occur can either be resynced, or are
86useless to the user, so a mixed TS5/TS3 network is not a huge problem,
87although a desync is NOT a good thing to have.
88
89
90Why TS5?
91--------
92
93We have jumped to TS5 from TS3, because there was a version of ircd that was
94TS4, so it was thought better to avoid a clash with an existing version.
95
96
97Advantages
98----------
99
100Its a realistic event that a server will be attacked so it splits off a
101network, then used to regain ops in a channel. TS5 makes this pointless,
102the server will never give ops on a netsplit. TS5 is network wide, so it
103leaves individual servers free to choose options like NO_JOIN_ON_SPLIT,
104whilst keeping splits useless to users.
105
106
107Disadvantages
108-------------
109
110Its virtually impossible for a user to actively regain ops themselves (some
111regard this as an advantage..) because on a large sized channel, its
112impossible to get people to leave so it can be recreated, therefore if a
113network did not have some form of services, it could possibly end up
114requiring oper intervention, as you cant get everybody to leave, and you
115cant use splits to regain ops, therefore if the channel is open (an
116invite-only channel would gradually destroy itself as noone new can join) it
117could be impossible for a user to regain ops.
118
119On a network that has some form of services, The effect of TS5 would be
120minimal, however the services must be of sufficient quality to fix opless
121channels, as TS5 renders netsplits for ops worthless.
122
123
124Recommendations
125---------------
126
127If your network has good stable services, we recommend TS5 is enabled, as
128people have no reason to abuse netsplits anyway.
129
130If your network has no services at all, then TS5 may cause problems with
131users being left with a permanently opless channel.
132
133If your network occupies the middle ground, then its a choice between users
134needing to be able to use splits to regain ops, or making netsplits that are
135caused to regain ops worthless.
136
137If TS5 is chosen, the FULL network must upgrade and this should be done in a
138relatively short space of time to minimise the possible desync effects.
139
140
141Alternatives
142------------
143
144There is also NO_JOIN_ON_SPLIT and NO_OP_ON_SPLIT, however these use the
145configuration of minimum servers and users, and sometimes a split that is
146above these limits is enough to be abused to regain ops, whereas if the
147limits are too high, clients will never be able to join anything or be opped
148when they create a channel.
149
150
151EOF