diff options
author | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2017-05-19 10:43:06 +0000 |
---|---|---|
committer | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2017-05-19 10:43:06 +0000 |
commit | a2731d7a9bf1289db7fc5752cbafa55fa2fa4d8a (patch) | |
tree | 36d64336309564de4a9f5235de70ca9265f87e08 /sys/net/pf.c | |
parent | 6fa2d898e8c7266037f857b138b2052fd41d0f66 (diff) |
Change PF behavior to allow MLD Listener Report packets to be sent
without needing a previously created state by MLD Listener Query. It
wasn't working because: (1) you might not have a previous MLD Listener
Query and (2) the addresses of the Query and Report don't match.
ok mikeb@, sashan@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index f0bebed4ada..64d4417f4f0 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1024 2017/05/16 22:16:30 sashan Exp $ */ +/* $OpenBSD: pf.c,v 1.1025 2017/05/19 10:43:05 rzalamena Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2064,12 +2064,18 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, int *icmp_dir, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - /* FALLTHROUGH */ case MLD_LISTENER_REPORT: { struct mld_hdr *mld = &pd->hdr.mld; u_int32_t h; + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; /* generate fake id for these messages */ h = mld->mld_addr.s6_addr32[0] ^ |