/*
- * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2017 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
if (af == AF_INET)
hlen = sizeof (struct ip);
+ if (fport == htons(53) && !(so->so_flags1 & SOF1_DNS_COUNTED)) {
+ so->so_flags1 |= SOF1_DNS_COUNTED;
+ INC_ATOMIC_INT64_LIM(net_api_stats.nas_socket_inet_dgram_dns);
+ }
+
/*
* Calculate data length and get a mbuf
* for UDP and IP6 headers.
udp6->uh_sum = in6_pseudo(laddr, faddr,
htonl(plen + IPPROTO_UDP));
- m->m_pkthdr.csum_flags = CSUM_UDPIPV6;
+ m->m_pkthdr.csum_flags = (CSUM_UDPIPV6|CSUM_ZERO_INVERT);
m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
if (!IN6_IS_ADDR_UNSPECIFIED(laddr))
}
INP_ADD_STAT(in6p, cell, wifi, wired, txpackets, 1);
INP_ADD_STAT(in6p, cell, wifi, wired, txbytes, ulen);
+ inp_set_activity_bitmap(in6p);
}
if (flowadv && (adv->code == FADV_FLOW_CONTROLLED ||
sizeof(struct udphdr) +
hlen +
ifnet_hdrlen(outif) +
- ifnet_packetpreamblelen(outif),
+ ifnet_mbuf_packetpreamblelen(outif),
sizeof(u_int32_t));
}
sizeof(struct udphdr) +
hlen +
ifnet_hdrlen(outif) +
- ifnet_packetpreamblelen(outif),
+ ifnet_mbuf_packetpreamblelen(outif),
sizeof(u_int32_t));
}
} else {