Browse code

core: check message snd and rcv proto for COND_IF_DIFF_PROTO lumps

- besides comparing the protos of rcv and snd sockets

(cherry picked from commit 31377b160df563a222bec5a1bf92590635429240)
(cherry picked from commit de84b32eb42e19f8626947da1c567eea2d0869fb)

Daniel-Constantin Mierla authored on 20/08/2021 05:03:45
Showing 1 changed files
... ...
@@ -512,7 +512,8 @@ static inline int lump_check_opt(	struct lump *l,
512 512
 			} else return 0;
513 513
 		case COND_IF_DIFF_PROTO:
514 514
 			get_ip_port_proto;
515
-			if (proto!=snd_i->send_sock->proto) {
515
+			if ((proto!=snd_i->send_sock->proto)
516
+					|| (msg->rcv.proto!=snd_i->proto)) {
516 517
 				LUMP_SET_COND_TRUE(l);
517 518
 				return 1;
518 519
 			} else return 0;