mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Corrected byte order on read of IPV6_TCLASS value from ancillary message
This commit is contained in:
parent
a2086478e6
commit
9b2275bcdd
2 changed files with 8 additions and 2 deletions
3
CHANGES
3
CHANGES
|
@ -60,6 +60,9 @@ corrections:
|
||||||
Ignore exit code of child process when it was killed by master due to
|
Ignore exit code of child process when it was killed by master due to
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Corrected byte order on read of IPV6_TCLASS value from ancillary
|
||||||
|
message
|
||||||
|
|
||||||
porting:
|
porting:
|
||||||
Type conflict between int and sig_atomic_t between declaration and
|
Type conflict between int and sig_atomic_t between declaration and
|
||||||
definition of diag_immediate_type and diag_immediate_exit broke
|
definition of diag_immediate_type and diag_immediate_exit broke
|
||||||
|
|
|
@ -292,11 +292,14 @@ int xiolog_ancillary_ip6(struct cmsghdr *cmsg, int *num,
|
||||||
return STAT_OK;
|
return STAT_OK;
|
||||||
#endif
|
#endif
|
||||||
#ifdef IPV6_TCLASS
|
#ifdef IPV6_TCLASS
|
||||||
case IPV6_TCLASS:
|
case IPV6_TCLASS: {
|
||||||
|
unsigned int u;
|
||||||
typbuff[0] = '\0'; strncat(typbuff, "IPV6_TCLASS", typlen-1);
|
typbuff[0] = '\0'; strncat(typbuff, "IPV6_TCLASS", typlen-1);
|
||||||
nambuff[0] = '\0'; strncat(nambuff, "tclass", namlen-1);
|
nambuff[0] = '\0'; strncat(nambuff, "tclass", namlen-1);
|
||||||
xiodump(CMSG_DATA(cmsg), msglen, valbuff, vallen, 0);
|
u = ntohl(*(unsigned int *)CMSG_DATA(cmsg));
|
||||||
|
xiodump((const unsigned char *)&u, msglen, valbuff, vallen, 0);
|
||||||
return STAT_OK;
|
return STAT_OK;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
snprintf(typbuff, typlen, "IPV6.%u", cmsg->cmsg_type);
|
snprintf(typbuff, typlen, "IPV6.%u", cmsg->cmsg_type);
|
||||||
|
|
Loading…
Reference in a new issue