fence_virtd: Fix memcpy size params in the TCP plugin
Fix the size param of the memcpy calls in the TCP plugin. Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
parent
5e7e247f00
commit
7231adafcb
@ -89,8 +89,7 @@ ipv6_listen(const char *addr_str, uint16_t port, int backlog)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&_sin6.sin6_addr,
|
memcpy(&_sin6.sin6_addr,
|
||||||
&((struct sockaddr_in6 *)&ss)->sin6_addr, sizeof(struct sockaddr_in6));
|
&((struct sockaddr_in6 *)&ss)->sin6_addr, sizeof(_sin6.sin6_addr));
|
||||||
memcpy(&_sin6.sin6_addr, &ss, sizeof(struct sockaddr_in6));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = socket(PF_INET6, SOCK_STREAM, 0);
|
fd = socket(PF_INET6, SOCK_STREAM, 0);
|
||||||
@ -154,7 +153,7 @@ ipv4_listen(const char *addr_str, uint16_t port, int backlog)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&_sin.sin_addr,
|
memcpy(&_sin.sin_addr,
|
||||||
&((struct sockaddr_in *)&ss)->sin_addr, sizeof(struct sockaddr_in));
|
&((struct sockaddr_in *)&ss)->sin_addr, sizeof(_sin.sin_addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = socket(PF_INET, SOCK_STREAM, 0);
|
fd = socket(PF_INET, SOCK_STREAM, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user