Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ircddbEnabled2 is enabled by default #154

Open
dl9sau opened this issue Dec 24, 2017 · 2 comments
Open

ircddbEnabled2 is enabled by default #154

dl9sau opened this issue Dec 24, 2017 · 2 comments

Comments

@dl9sau
Copy link

dl9sau commented Dec 24, 2017

While experimenting with my new dvmega, mmdvmhost and ircddbgatewayd, I saw opening and closing sessions to ircddb hosts (tcp port 9007). ircddbgatewayd from git head is self-compiled.
With tcpdump -ni eth0 -X -s 2048 tcp port 9007, I observed the following:

===
11:13:44.779039 IP 192.168.1.103.36273 > 216.155.157.11.9007: Flags [P.], seq 19:83, ack 216, win 473, options [nop,nop,TS val 26308155 ecr 60428599]
, length 64
0x0000: 4500 0074 5457 4000 4006 ae76 c0a8 0167 E..tTW@[email protected]
0x0010: d89b 9d0b 8db1 232f b640 3f41 3701 7f0d ......#/.@?A7...
0x0020: 8018 01d9 381d 0000 0101 080a 0191 6e3b ....8.........n;
0x0030: 039a 1137 5553 4552 2020 3020 2a20 3a43 ...7USER..0..:C
0x0040: 4952 4344 4442 3a31 2e32 2e34 206c 696e IRCDDB:1.2.4.lin
0x0050: 7578 5f69 7263 6464 6267 6174 6577 6179 ux_ircddbgateway
0x0060: 642d 3230 3136 3031 3331 202d 2044 4542 d-20160131.-.DEB
0x0070: 5547 0d0a UG..
11:13:45.284900 IP 216.155.157.11.9007 > 192.168.1.103.36273: Flags [P.], seq 216:276, ack 83, win 29, options [nop,nop,TS val 60433106 ecr 26308155], length 60
0x0000: 4528 0070 77c5 4000 3106 99e4 d89b 9d0b E([email protected].......
0x0010: c0a8 0167 232f 8db1 3701 7f0d b640 3f81 ...g#/..7....@?.
0x0020: 8018 001d 3e92 0000 0101 080a 039a 22d2 ....>.........".
0x0030: 0191 6e3b 3a32 3136 2e31 3535 2e31 3537 ..n;:216.155.157
0x0040: 2e31 3120 3436 3120 3232 3241 4141 344b .11.461.222AAA4K
0x0050: 5420 5553 4552 203a 4e6f 7420 656e 6f75 T.USER.:Not.enou
0x0060: 6768 2070 6172 616d 6574 6572 732e 0d0a gh.parameters...
..
11:14:18.764611 IP 216.155.157.11.9007 > 192.168.1.103.50828: Flags [P.], seq 1:162, ack 1, win 29, options [nop,nop,TS val 60466721 ecr 26311516], l
ength 161
0x0000: 4528 00d5 b849 4000 3106 58fb d89b 9d0b E([email protected].....
0x0010: c0a8 0167 232f c68c 1e66 1e68 5ad3 e14b ...g#/...f.hZ..K
0x0020: 8018 001d 94b4 0000 0101 080a 039a a621 ...............!
0x0030: 0191 7b5c 3a32 3136 2e31 3535 2e31 3537 ..{:216.155.157
0x0040: 2e31 3120 4e4f 5449 4345 2041 7574 6820 .11.NOTICE.Auth.
0x0050: 3a2a 2a2a 204c 6f6f 6b69 6e67 2075 7020 :
.Looking.up.
0x0060: 796f 7572 2068 6f73 746e 616d 652e 2e2e your.hostname...
0x0070: 0d0a 3a32 3136 2e31 3535 2e31 3537 2e31 ..:216.155.157.1
0x0080: 3120 4e4f 5449 4345 2032 3232 4141 4134 1.NOTICE.222AAA4
0x0090: 4c4c 203a 2a2a 2a20 536b 6970 7069 6e67 LL.:
*.Skipping
0x00a0: 2068 6f73 7420 7265 736f 6c75 7469 6f6e .host.resolution
0x00b0: 2028 6469 7361 626c 6564 2062 7920 7365 .(disabled.by.se
0x00c0: 7276 6572 2061 646d 696e 6973 7472 6174 rver.administrat
0x00d0: 6f72 290d 0a or)..
..
11:14:19.501800 IP 192.168.1.103.50828 > 216.155.157.11.9007: Flags [P.], seq 1:9, ack 162, win 473, options [nop,nop,TS val 26311628 ecr 60466721], length 8
0x0000: 4500 003c 9a7f 4000 4006 6886 c0a8 0167 E..<..@[email protected]....g
0x0010: d89b 9d0b c68c 232f 5ad3 e14b 1e66 1f09 ......#/Z..K.f..
0x0020: 8018 01d9 37e5 0000 0101 080a 0191 7bcc ....7.........{.
0x0030: 039a a621 5041 5353 203a 0d0a ...!PASS.:..
..
11:14:19.936753 IP 192.168.1.103.50828 > 216.155.157.11.9007: Flags [P.], seq 9:19, ack 162, win 473, options [nop,nop,TS val 26311671 ecr 60467836], length 10
0x0000: 4500 003e 9a80 4000 4006 6883 c0a8 0167 E..>..@[email protected]....g
0x0010: d89b 9d0b c68c 232f 5ad3 e153 1e66 1f09 ......#/Z..S.f..
0x0020: 8018 01d9 37e7 0000 0101 080a 0191 7bf7 ....7.........{.
0x0030: 039a aa7c 4e49 434b 203a 2d33 0d0a ...|NICK.:-3..
..
11:14:20.416423 IP 216.155.157.11.9007 > 192.168.1.103.50828: Flags [P.], seq 162:216, ack 19, win 29, options [nop,nop,TS val 60468284 ecr 26311671], length 54
0x0000: 4528 006a b84c 4000 3106 5963 d89b 9d0b E([email protected]....
0x0010: c0a8 0167 232f c68c 1e66 1f09 5ad3 e15d ...g#/...f..Z..]
0x0020: 8018 001d 9f03 0000 0101 080a 039a ac3c ...............<
0x0030: 0191 7bf7 3a32 3136 2e31 3535 2e31 3537 ..{.:216.155.157
0x0040: 2e31 3120 3433 3220 3232 3241 4141 344c .11.432.222AAA4L
0x0050: 4c20 2d33 203a 4572 726f 6e65 6f75 7320 L.-3.:Erroneous.
0x0060: 4e69 636b 6e61 6d65 0d0a Nickname..
..

Enabling and disabling ircddbEnabled=1 or 0 had no effect. And even when ircddbHostname left blank, I saw after restart new connections with the same effect.
Even if configured ircddbEnabled=1 with ircddbHostname=rr.openquad.net , and functional login (tcpdump showed irc channel messages), I saw new connection retries with invalid username.

My fault:
I striped down my configuration file, without unneeded settins like
repeaterBand2= , repeaterBand3=, repeaterBand4 , without starNetBand..., and without ircddbEnabled2= , ircddbEnabled3= , ircddbEnabled4 settings.

I assumed, there must be something been hardcoded.

Here, I see

find . -type f -exec grep -H DEFAULT_IRCDDB_HOSTNAME '{}' ';'

./ircDDBGateway/Common/IRCDDBGatewayConfig.cpp:const wxString DEFAULT_IRCDDB_HOSTNAME = wxT("group1-irc.ircddb.net");
./ircDDBGateway/Common/IRCDDBGatewayConfig.cpp:const wxString DEFAULT_IRCDDB_HOSTNAME2 = wxT("rr.openquad.net");
./ircDDBGateway/Common/IRCDDBGatewayConfig.cpp:const wxString DEFAULT_IRCDDB_HOSTNAME3 = wxEmptyString;
./ircDDBGateway/Common/IRCDDBGatewayConfig.cpp:const wxString DEFAULT_IRCDDB_HOSTNAME4 = wxEmptyString;

Ok, IRCDDBGatewayConfig.cpp is part of the configuration program.
Anyway, after setting
ircddbEnabled2=0
ircddbHostname2=
ircddbUsername2=
ircddbPassword2=
the buggy connection attempts stoped.

It seems, there was a default for ircddbHostname2, and ircddbEnabled2 was by default enabled.

In addidtion, I also added
ircddbEnabled3=0
ircddbHostname3=
ircddbUsername3=
ircddbPassword3=
ircddbEnabled4=0
ircddbHostname4=
ircddbUsername4=
ircddbPassword4=
..just 4 case ;)

@jeanger
Copy link

jeanger commented Dec 24, 2017 via email

@dl9sau
Copy link
Author

dl9sau commented Dec 25, 2017

update:
file ircDDBGateway/Common/IRCDDBGatewayConfig.cpp defines defauls.

here we have
const bool DEFAULT_IRCDDB_ENABLED = true;
const bool DEFAULT_IRCDDB_ENABLED2 = true;
const bool DEFAULT_IRCDDB_ENABLED3 = false;
const bool DEFAULT_IRCDDB_ENABLED4 = false;
-> is responsible for the observed behaviour.

const wxString DEFAULT_IRCDDB_HOSTNAME2 = wxT("rr.openquad.net");
const wxString DEFAULT_IRCDDB_USERNAME2 = wxEmptyString;
const wxString DEFAULT_IRCDDB_PASSWORD2 = wxEmptyString;

-> even ircdbenabled2 if not configured in the config file, we have the defaults enabled and hostname2 = "rr.openquad.net". We have empty strings for username and password, which leads to a protocol violation in the irc client protocol and the server does not let us in.
If, like in my case, I used rr.openquad.ne in the first section ( ircddbHostname= ), then we have two connections: the first one which works. And still this second one with bad username and password, trying again and again..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants