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)
(cherry picked from commit 565b43d1d0572a8b68188cacf5b8248f37d352be)

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