Print this page
9832 Original bug discovered as 9560 has friends IPv4 packets coming in as IPv6 creating chaos
Reviewed by: Robert Mustacchi <rm@joyent.com>
@@ -19,11 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2019, Joyent, Inc. All rights reserved.
*/
/*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
@@ -810,13 +810,15 @@
boolean_t first_frag = B_FALSE;
ip6_frag_t *frag = NULL;
uint8_t proto;
struct udphdr *udph;
uchar_t *dh;
+ int errno;
- if (!mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag))
- return (ENOSPC);
+ errno = mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag);
+ if (errno != 0)
+ return (errno);
if (proto != IPPROTO_UDP)
return (EINVAL);
if (frag != NULL) {
@@ -859,13 +861,15 @@
uint16_t hdrlen;
ip6_frag_t *frag = NULL;
uint8_t proto;
uchar_t *hdrp;
struct icmp6_hdr *icmp;
+ int errno;
- if (!mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag))
- return (ENOSPC);
+ errno = mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag);
+ if (errno != 0)
+ return (errno);
if (proto != IPPROTO_ICMPV6)
return (EINVAL);
if (frag != NULL) {