Page MenuHomeFreeBSD

D14621.1783703263.diff
No OneTemporary

Size
858 B
Referenced Files
None
Subscribers
None

D14621.1783703263.diff

Index: head/sys/netinet/ip_output.c
===================================================================
--- head/sys/netinet/ip_output.c
+++ head/sys/netinet/ip_output.c
@@ -1256,13 +1256,23 @@
switch (sopt->sopt_name) {
case IP_OPTIONS:
case IP_RETOPTS:
- if (inp->inp_options)
- error = sooptcopyout(sopt,
- mtod(inp->inp_options,
- char *),
- inp->inp_options->m_len);
- else
+ INP_RLOCK(inp);
+ if (inp->inp_options) {
+ struct mbuf *options;
+
+ options = m_dup(inp->inp_options, M_NOWAIT);
+ INP_RUNLOCK(inp);
+ if (options != NULL) {
+ error = sooptcopyout(sopt,
+ mtod(options, char *),
+ options->m_len);
+ m_freem(options);
+ } else
+ error = ENOMEM;
+ } else {
+ INP_RUNLOCK(inp);
sopt->sopt_valsize = 0;
+ }
break;
case IP_TOS:

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 10, 5:07 PM (18 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29062314
Default Alt Text
D14621.1783703263.diff (858 B)

Event Timeline