Commit 13146a83 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Samuel Thibault
Browse files

slirp: Add a special case for the NULL socket



NULL sockets are used for NDP, BOOTP, and other critical operations.
If the topmost mbuf in a NULL session is blocked pending resolution,
it may cause problems if it blocks other packets with a NULL socket.
So do not add mbufs with a NULL socket field to the same session.

Signed-off-by: default avatarKevin Cernekee <cernekee@chromium.org>
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
parent e2aad34d
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ if_output(struct socket *so, struct mbuf *ifm)
	 * We mustn't put this packet back on the fastq (or we'll send it out of order)
	 * XXX add cache here?
	 */
	if (so) {
		for (ifq = (struct mbuf *) slirp->if_batchq.qh_rlink;
		     (struct quehead *) ifq != &slirp->if_batchq;
		     ifq = ifq->ifq_prev) {
@@ -83,6 +84,7 @@ if_output(struct socket *so, struct mbuf *ifm)
				goto diddit;
			}
		}
	}

	/* No match, check which queue to put it on */
	if (so && (so->so_iptos & IPTOS_LOWDELAY)) {