View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003128 | unreal | ircd | public | 2006-11-27 12:04 | 2015-07-19 20:02 |
Reporter | Trocotronic | Assigned To | syzop | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | AMD K6 32bits | OS | Windows XP Professional | OS Version | SP2 |
Product Version | 3.2.6 | ||||
Fixed in Version | 3.4-beta1 | ||||
Summary | 0003128: Hub VS Leaf | ||||
Description | if (!aconf->hubmask) { sendto_locfailops("Link %s cancelled, is Non-Hub but introduced Leaf %s", cptr->name, servername); return exit_client(cptr, cptr, cptr, "Non-Hub Link"); } if (match(aconf->hubmask, servername)) { sendto_locfailops("Link %s cancelled, linked in %s, which hub config disallows", cptr->name, servername); return exit_client(cptr, cptr, cptr, "Not matching hub configuration"); } if (aconf->leafmask) { if (match(aconf->leafmask, servername)) { sendto_locfailops("Link %s(%s) cancelled, disallowed by leaf configuration", cptr->name, servername); return exit_client(cptr, cptr, cptr, "Disallowed by leaf configuration"); } } As you can see, if you want to use leafmask, you must use hubmask. So, in your conf will be those two entries: hubmask AND leafmask. This could be a confusion for some users (first on me!). I don't see the utility of leafmask. If you miss hubmask, this server acts like a leaf. I think we can remove this entry. Leafmask isn't used more on all code, only on those lines. Suggestions? | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
hubmask - mask of servernames that server CAN introduce, (hub *) - server can introduce any another server; leafmask - mask of servernames that server CANNOT introduce, (leaf *) - server cannot introduce any leafs; i guess - it can be useful, if we have new, not "fully trusted" hub, so we can protect the network for example from that hub to link "spurious" services by setting leaf services* or leaf services.mynet.com, but unfortunately there is no way to select multiple hub/leaf masks in the same link block.... Maybe it should be renamed? for example "hub *" > <link block>::options::hub (yes/no), and <link block>::allow-links::<allow-masks> and <link block>::deny-links::<deny-masks> or so.... |
|
The documentation was a bit sketchy on these two directives. See 0002623. As avb said, you use leaf with hub as a sort of "exception", for example: hub *.network.net; <- linked servers allowed if they are in the same domain leaf services.network.net; <- ensure nonhubs don't try to collide services off. |
|
So, my question is: if leafmask is a mask of servernames that server CANNOT introduce, this line if (match(aconf->leafmask, servername)) should be if (!match(aconf->leafmask, servername)) and reject the link. If servername IS like leafmask (!match), then link is aborted. Isn't it? |
|
if (match(aconf->leafmask, servername)) this means if servername (new server name) matches leafmask ("forbidden" servers mask) - (if hub introduces new server that it shouldn't) - reject the link |
|
No, Trocotronic's right. match() returns 0 if it matches (and nonzero for no match) - like strcmp(). |
|
so, leafmask actually works incorrect? |
|
Moreover, actually if there isn't hubmask, leafmask does not take effect, due to line if (!aconf->hubmask) If leafmask is the opposite of hubmask, then why cannot you use ONLY leafmask? For example, I want to only deny *.com links. Actually, I can't. I need to specify an hubmask (hub * indeed). |
|
[quote]If leafmask is the opposite of hubmask, then why cannot you use ONLY leafmask? For example, I want to only deny *.com links. Actually, I can't. I need to specify an hubmask (hub * indeed).[/quote] For the same reason you need an allow {} block before ban user {} is worth anything, probably. |
|
presume this is fixed with the new link block I added in 3.4-alphaX |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-11-27 12:04 | Trocotronic | New Issue | |
2006-11-27 12:41 | avb | Note Added: 0012746 | |
2006-11-27 12:41 | avb | Note Edited: 0012746 | |
2006-11-27 12:42 | avb | Note Edited: 0012746 | |
2006-11-27 12:43 | avb | Note Edited: 0012746 | |
2006-11-27 12:49 | aquanight | Note Added: 0012747 | |
2006-11-28 13:36 | Trocotronic | Note Added: 0012751 | |
2006-11-28 19:23 | avb | Note Added: 0012755 | |
2006-11-28 19:28 | aquanight | Note Added: 0012756 | |
2006-11-28 21:03 | avb | Note Added: 0012757 | |
2006-11-29 06:18 | Trocotronic | Note Added: 0012761 | |
2006-11-29 12:59 | aquanight | Note Added: 0012769 | |
2007-04-27 03:27 |
|
Status | new => acknowledged |
2015-07-19 20:02 | syzop | Note Added: 0018535 | |
2015-07-19 20:02 | syzop | Status | acknowledged => closed |
2015-07-19 20:02 | syzop | Assigned To | => syzop |
2015-07-19 20:02 | syzop | Resolution | open => fixed |
2015-07-19 20:02 | syzop | Fixed in Version | => 3.4-beta1 |