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)

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