solanum-vs-hackint-and-char.../ircd
Aaron Jones a6b99c07d1
serv_connect(): ensure both sa_bind[]/sa_connect[] are always populated (#352)
Due to [1], linking with SCTP sometimes does not multi-home correctly.
This is triggered by the rand() on the lines immediately above these.

The connect{} blocks already support an `aftype` parameter to instruct
IRCd to prefer IPv4 or IPv6. This commit additionally ensures that the
other structure is always populated with the other address (if any) if
this parameter is specified.

This will allow SCTP server-linking users to work around the bug and
ensure that it always multi-homes by setting `connect::aftype` to IPv4.
Without this commit, that would cause Solanum to not include the IPv6
addresses (if any) in the connect block in its SCTP setup.

If there isn't a valid IP address in the other sockaddr, this should be
of no consequence, because it will not be used by rb_connect_tcp(), and
both rb_connect_sctp() and rb_sctp_bindx_only() already verify that
there is a valid IP address in the sockaddr before making use of it.

[1] https://marc.info/?l=linux-sctp&m=165684809726472&w=2
2022-07-05 06:01:26 +00:00
..
authproc.c Remove Windows support 2021-07-30 14:17:47 -04:00
bandbi.c Remove Windows support 2021-07-30 14:17:47 -04:00
cache.c Remove Windows support 2021-07-30 14:17:47 -04:00
capability.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
channel.c channel: always send chm_hidden modes to servers 2021-12-04 20:27:59 +00:00
chmode.c chmode: Use original string when removing a mask 2022-06-30 21:00:46 +01:00
class.c class: remove unused macros 2016-06-01 20:54:12 +00:00
client.c Cast time_t to long long when printing 2022-07-01 03:43:36 -04:00
dns.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
extban.c Innovation by sed 2020-10-15 15:52:41 +01:00
getopt.c YESNO options are of type bool, not int 2018-03-23 16:46:38 +00:00
hash.c make more snotes L_NETWIDE 2020-11-08 14:30:41 -05:00
hook.c Track and inform modules of privset changes 2021-03-01 15:45:03 +00:00
hostmask.c Add description parameter to auth blocks (#327) 2022-04-14 14:39:45 -07:00
ircd.c Illumos fixes 2022-06-29 20:28:11 -04:00
ircd_lexer.l Remove Windows support 2021-07-30 14:17:47 -04:00
ircd_parser.y Resolve shfit/reduce conflict in timespec production (#54) 2020-11-07 19:54:25 -08:00
ircd_signal.c Remove Windows support 2021-07-30 14:17:47 -04:00
listener.c ircd/listener: return a TLS record layer alert to D-Lined TLS clients 2022-06-30 18:55:41 -04:00
logger.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
main.c Innovation by sed 2020-10-15 15:52:41 +01:00
Makefile.am Remove Windows support 2021-07-30 14:17:47 -04:00
match.c matchset_for_client: fix off-by-one error 2021-06-08 22:16:41 +01:00
modules.c Remove Windows support 2021-07-30 14:17:47 -04:00
monitor.c ircd: send tags on every message 2017-08-06 16:21:29 +01:00
msgbuf.c msgbuf: use only relevant caps for the cache key 2021-06-13 00:47:01 +01:00
newconf.c Normalize snprintf size to use sizeof where possible 2022-06-24 01:42:08 -04:00
operhash.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
packet.c ircd/packet.c: make function definition consistent with declaration (#301) 2021-11-30 11:50:30 -08:00
parse.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
privilege.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
ratelimit.c Innovation by sed 2020-10-15 15:52:41 +01:00
reject.c Normalize snprintf size to use sizeof where possible 2022-06-24 01:42:08 -04:00
restart.c Remove Windows support 2021-07-30 14:17:47 -04:00
s_conf.c Add description parameter to auth blocks (#327) 2022-04-14 14:39:45 -07:00
s_newconf.c valid_temp_time: more simplification and test fixes 2022-06-20 16:35:03 +01:00
s_serv.c serv_connect(): ensure both sa_bind[]/sa_connect[] are always populated (#352) 2022-07-05 06:01:26 +00:00
s_user.c Normalize snprintf size to use sizeof where possible 2022-06-24 01:42:08 -04:00
scache.c A missing colon to RPL_MAP recently split (#131) 2021-03-16 17:51:42 -07:00
send.c send: fix infinite recursion in _send_linebuf 2020-11-28 20:08:46 -05:00
snomask.c add SNO_BANNED, snote for it on client k/x-line rejection (#242) 2021-08-11 17:08:31 +01:00
sslproc.c Remove Windows support 2021-07-30 14:17:47 -04:00
substitution.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
supported.c Remove the CLIENTVER 005 token. (#161) 2021-05-25 11:08:59 +01:00
tgchange.c Refactor common channel iteration 2020-10-19 20:15:26 +01:00
version.c.SH Normalize generation for reproducible builds 2022-05-29 10:16:00 +01:00
whowas.c whowas.c: store account name in whowas (#323) 2022-04-01 14:58:43 -07:00
wsproc.c Remove Windows support 2021-07-30 14:17:47 -04:00