Browse code

core: check message rcv and snd proto for diff realms lump conditions

- in addition to receive socket and send socket protos, which may be the
same in cases of tcp/tls+ws/wss using same ports

(cherry picked from commit 871f8113612148a49e69218e70ed7f475fb665db)
(cherry picked from commit 52978a0873eb068be31ca0688e64c88e4872efac)
(cherry picked from commit b0a7811ef60d8fee47db4535cdc84c8483e4fede)

Daniel-Constantin Mierla authored on 19/08/2021 16:11:04 • Henning Westerholt committed on 22/10/2021 12:09:54
Showing 1 changed files
... ...
@@ -493,8 +493,9 @@ static inline int lump_check_opt(	struct lump *l,
493 493
 		case COND_IF_DIFF_REALMS:
494 494
 			get_ip_port_proto;
495 495
 			/* faster tests first */
496
-			if ((port==snd_i->send_sock->port_no) && 
496
+			if ((port==snd_i->send_sock->port_no) &&
497 497
 					(proto==snd_i->send_sock->proto) &&
498
+					(msg->rcv.proto==snd_i->proto) &&
498 499
 #ifdef USE_COMP
499 500
 					(msg->rcv.comp==snd_i->comp) &&
500 501
 #endif