diff options
author | Renato Botelho <renato@netgate.com> | 2015-12-10 17:01:14 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-12-10 17:01:14 -0200 |
commit | a7ed3b08bcfc9de3d1e75679fe9292e5b09aea82 (patch) | |
tree | 71acee51f11c433be4c4a51635ce1ea4302ca4b6 /sys/netinet/igmp.c | |
parent | 54cf5d1b6607c1e6f2cbf32784c33720517bce49 (diff) | |
parent | 3bc7f4d78d27696df85e118c07aa5a2630188922 (diff) | |
download | FreeBSD-src-a7ed3b08bcfc9de3d1e75679fe9292e5b09aea82.zip FreeBSD-src-a7ed3b08bcfc9de3d1e75679fe9292e5b09aea82.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/netinet/igmp.c')
-rw-r--r-- | sys/netinet/igmp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index c138f14..34a60a8 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -3327,6 +3327,15 @@ igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi) KASSERT(igi->igi_version == IGMP_VERSION_3, ("%s: called when version %d", __func__, igi->igi_version)); + /* + * Check that there are some packets queued. If so, send them first. + * For large number of groups the reply to general query can take + * many packets, we should finish sending them before starting of + * queuing the new reply. + */ + if (igi->igi_gq.ifq_head != NULL) + goto send; + ifp = igi->igi_ifp; IF_ADDR_RLOCK(ifp); @@ -3362,6 +3371,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifinfo *igi) } IF_ADDR_RUNLOCK(ifp); +send: loop = (igi->igi_flags & IGIF_LOOPBACK) ? 1 : 0; igmp_dispatch_queue(&igi->igi_gq, IGMP_MAX_RESPONSE_BURST, loop); |