mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 14:02:05 -04:00
handle both cmsg types IP_TOS and IP_RECVTOS being used to return IP_TOS
This commit is contained in:
parent
22d32791e5
commit
8ce8052bb8
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue