/*
- * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2010 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
struct ip_moptions *mopts;
struct route ro;
struct ip_out_args ipoa;
+#if PKT_PRIORITY
+ mbuf_traffic_class_t mtc = MBUF_TC_NONE;
+#endif /* PKT_PRIORITY */
KERNEL_DEBUG(DBG_FNC_UDP_OUTPUT | DBG_FUNC_START, 0,0,0,0,0);
- if (control)
- m_freem(control); /* XXX */
-
+ if (control != NULL) {
+#if PKT_PRIORITY
+ mtc = mbuf_traffic_class_from_control(control);
+#endif /* PKT_PRIORITY */
+ m_freem(control);
+ }
KERNEL_DEBUG(DBG_LAYER_OUT_BEG, inp->inp_fport, inp->inp_lport,
inp->inp_laddr.s_addr, inp->inp_faddr.s_addr,
(htons((u_short)len + sizeof (struct udphdr))));
inp_route_copyout(inp, &ro);
#if PKT_PRIORITY
- if (soisbackground(so))
- m_prio_background(m);
+ set_traffic_class(m, so, mtc);
#endif /* PKT_PRIORITY */
socket_unlock(so, 0);