소스 검색

core: check message snd and rcv proto for COND_IF_DIFF_PROTO lumps

- besides comparing the protos of rcv and snd sockets
Daniel-Constantin Mierla 4 년 전
부모
커밋
31377b160d
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/core/msg_translator.c

+ 2 - 1
src/core/msg_translator.c

@@ -513,7 +513,8 @@ static inline int lump_check_opt(	struct lump *l,
 			} else return 0;
 			} else return 0;
 		case COND_IF_DIFF_PROTO:
 		case COND_IF_DIFF_PROTO:
 			get_ip_port_proto;
 			get_ip_port_proto;
-			if (proto!=snd_i->send_sock->proto) {
+			if ((proto!=snd_i->send_sock->proto)
+					|| (msg->rcv.proto!=snd_i->proto)) {
 				LUMP_SET_COND_TRUE(l);
 				LUMP_SET_COND_TRUE(l);
 				return 1;
 				return 1;
 			} else return 0;
 			} else return 0;