summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 10:33:36 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:45:12 +0000
commitbe59a35641616a4cf23c4a13fa0632624b021c1b (patch)
tree9da183258bdf9cc413f7562079d25ace6955467f /chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c
parentd702e4b6a64574e97fc7df8fe3238cde70242080 (diff)
BASELINE: Update Chromium to 62.0.3202.101
Change-Id: I2d5eca8117600df6d331f6166ab24d943d9814ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c')
-rw-r--r--chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c
index 908a769ea54..1c9bbd9daa1 100644
--- a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c
+++ b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 313330 2017-02-06 08:49:57Z ae $");
+__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 321204 2017-07-19 14:28:58Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -78,7 +78,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
#if defined(__Userspace_os_Windows)
uint32_t temp;
#endif
- bzero(sin, sizeof(*sin));
+ memset(sin, 0, sizeof(*sin));
#ifdef HAVE_SIN_LEN
sin->sin_len = sizeof(struct sockaddr_in);
#endif
@@ -109,7 +109,7 @@ in6_sin6_2_sin_in_sock(struct sockaddr *nam)
void
in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
{
- bzero(sin6, sizeof(struct sockaddr_in6));
+ memset(sin6, 0, sizeof(struct sockaddr_in6));
sin6->sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
@@ -350,7 +350,7 @@ sctp6_notify(struct sctp_inpcb *inp,
struct sctp_nets *net,
uint8_t icmp6_type,
uint8_t icmp6_code,
- uint16_t next_mtu)
+ uint32_t next_mtu)
{
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
@@ -404,11 +404,11 @@ sctp6_notify(struct sctp_inpcb *inp,
timer_stopped = 0;
}
/* Update the path MTU. */
+ if (net->port) {
+ next_mtu -= sizeof(struct udphdr);
+ }
if (net->mtu > next_mtu) {
net->mtu = next_mtu;
- if (net->port) {
- net->mtu -= sizeof(struct udphdr);
- }
}
/* Update the association MTU */
if (stcb->asoc.smallest_mtu > next_mtu) {
@@ -478,7 +478,7 @@ sctp6_ctlinput(int cmd, struct sockaddr *pktdst, void *d)
}
/* Copy out the port numbers and the verification tag. */
- bzero(&sh, sizeof(sh));
+ memset(&sh, 0, sizeof(sh));
m_copydata(ip6cp->ip6c_m,
ip6cp->ip6c_off,
sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint32_t),
@@ -568,7 +568,7 @@ sctp6_ctlinput(int cmd, struct sockaddr *pktdst, void *d)
sctp6_notify(inp, stcb, net,
ip6cp->ip6c_icmp6->icmp6_type,
ip6cp->ip6c_icmp6->icmp6_code,
- (uint16_t)ntohl(ip6cp->ip6c_icmp6->icmp6_mtu));
+ ntohl(ip6cp->ip6c_icmp6->icmp6_mtu));
} else {
#if defined(__FreeBSD__) && __FreeBSD_version < 500000
if (PRC_IS_REDIRECT(cmd) && (inp != NULL)) {
@@ -1325,10 +1325,10 @@ sctp6_getaddr(struct socket *so, struct mbuf *nam)
if (sin6 == NULL)
return (ENOMEM);
#elif defined(__Panda__)
- bzero(sin6, sizeof(*sin6));
+ memset(sin6, 0, sizeof(*sin6));
#else
SCTP_BUF_LEN(nam) = sizeof(*sin6);
- bzero(sin6, sizeof(*sin6));
+ memset(sin6, 0, sizeof(*sin6));
#endif
sin6->sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN