瀏覽代碼

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
Daniel-Constantin Mierla 4 年之前
父節點
當前提交
871f811361
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/core/msg_translator.c

+ 2 - 1
src/core/msg_translator.c

@@ -493,8 +493,9 @@ static inline int lump_check_opt(	struct lump *l,
 		case COND_IF_DIFF_REALMS:
 			get_ip_port_proto;
 			/* faster tests first */
-			if ((port==snd_i->send_sock->port_no) && 
+			if ((port==snd_i->send_sock->port_no) &&
 					(proto==snd_i->send_sock->proto) &&
+					(msg->rcv.proto==snd_i->proto) &&
 #ifdef USE_COMP
 					(msg->rcv.comp==snd_i->comp) &&
 #endif