Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
31377b160d
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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;
 		case COND_IF_DIFF_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);
 				return 1;
 			} else return 0;