Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163502094
D58361.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58361.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D58361: if_geneve: Fix mbuf leak on ip_ecn_egress
Attached
Detach File
Event Timeline
Log In to Comment