Check that address family of state matches address family of packet.

If it is not matched avoid comparing other state fields.

Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2017-11-23 07:05:25 +00:00
parent 30df59d581
commit 9d15540022

View File

@ -609,6 +609,9 @@ lookup_dyn_rule_locked(struct ipfw_flow_id *pkt, int i, int *match_direction,
if (q->dyn_type == O_LIMIT_PARENT)
continue;
if (pkt->addr_type != q->id.addr_type)
continue;
if (pkt->proto != q->id.proto)
continue;