pf: fix missing SCTP multihomed states
authorKristof Provost <kp@FreeBSD.org>
Tue, 17 Oct 2023 16:10:39 +0000 (18:10 +0200)
committerKristof Provost <kp@FreeBSD.org>
Tue, 31 Oct 2023 15:03:22 +0000 (16:03 +0100)
commitd6d38b02ee57920cc02a306a6d8d2aec9c4b759c
treedb90ebfcf67a164a8b6e9ae6528a444147d4a00a
parenta8bd34bfc0db38c1c11e9c36b7dd849d607c17a8
pf: fix missing SCTP multihomed states

The existing code to create extra states when SCTP endpoints supplied
extra addresses missed a case. As a result we failed to generate all of
the required states.

Briefly, if host A has address 1 and 2 and host B has addres 3 and 4 we
generated 1 - 3 and 2 - 3, as well as 1 - 4, but not 2 - 4.

Store the list of endpoints supplied by each host and use those to
generate all of the connection permutations.

MFC after: 1 week
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D42361
sys/netpfil/pf/pf.c
sys/netpfil/pf/pf_norm.c