Page MenuHomeFreeBSD

D58361.diff
No OneTemporary

D58361.diff

diff --git a/sys/net/if_geneve.c b/sys/net/if_geneve.c
--- a/sys/net/if_geneve.c
+++ b/sys/net/if_geneve.c
@@ -3125,16 +3125,12 @@
return (EINVAL);
if (m->m_len < offset &&
- (m = m_pullup(m, offset)) == NULL) {
- *m0 = NULL;
+ (*m0 = m = m_pullup(m, offset)) == NULL)
return (ENOBUFS);
- }
iphdr = mtodo(m, offset - sizeof(struct ip));
- if (ip_ecn_egress(ECN_COMPLETE, &info->ecn, &iphdr->ip_tos) == 0) {
- *m0 = NULL;
+ if (ip_ecn_egress(ECN_COMPLETE, &info->ecn, &iphdr->ip_tos) == 0)
return (ENOBUFS);
- }
if ((sc->gnv_flags & GENEVE_FLAG_TTL_INHERIT) != 0 && info->ttl > 0)
iphdr->ip_ttl = info->ttl;
@@ -3148,17 +3144,13 @@
return (EINVAL);
if (m->m_len < offset &&
- (m = m_pullup(m, offset)) == NULL) {
- *m0 = NULL;
+ (*m0 = m = m_pullup(m, offset)) == NULL)
return (ENOBUFS);
- }
ip6hdr = mtodo(m, offset - sizeof(struct ip6_hdr));
itos = (ntohl(ip6hdr->ip6_flow) >> IPV6_FLOWLABEL_LEN) & 0xff;
- if (ip_ecn_egress(ECN_COMPLETE, &info->ecn, &itos) == 0) {
- *m0 = NULL;
+ if (ip_ecn_egress(ECN_COMPLETE, &info->ecn, &itos) == 0)
return (ENOBUFS);
- }
ip6hdr->ip6_flow |= htonl((uint32_t)itos << IPV6_FLOWLABEL_LEN);
if ((sc->gnv_flags & GENEVE_FLAG_TTL_INHERIT) && (info->ttl > 0))
@@ -3176,10 +3168,8 @@
return (EINVAL);
if (m->m_len < offset &&
- (m = m_pullup(m, offset)) == NULL) {
- *m0 = NULL;
+ (*m0 = m = m_pullup(m, offset)) == NULL)
return (ENOBUFS);
- }
info->isr = NETISR_ARP;
break;
@@ -3188,7 +3178,6 @@
return (EINVAL);
}
- *m0 = m;
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 24, 9:11 PM (13 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35333902
Default Alt Text
D58361.diff (1 KB)

Event Timeline