2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

handle both cmsg types IP_TOS and IP_RECVTOS being used to return IP_TOS

This commit is contained in:
Mark Andrews
2013-04-12 09:32:41 +10:00
parent 22d32791e5
commit 8ce8052bb8

View File

@@ -1339,7 +1339,11 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
#ifdef IP_TOS
if (cmsgp->cmsg_level == IPPROTO_IP
&& cmsgp->cmsg_type == IP_TOS) {
&& (cmsgp->cmsg_type == IP_TOS
#ifdef IP_RECVTOS
|| cmsgp->cmsg_type == IP_RECVTOS
#endif
)) {
dev->dscp = (int) *(uint8_t *)CMSG_DATA(cmsgp);
dev->dscp >>= 2;
dev->attributes |= ISC_SOCKEVENTATTR_DSCP;