diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-13 11:44:37 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-05-13 11:44:37 +0000 |
commit | b3cf6808ce32e66e8ec32183dc01c5aa84e84297 (patch) | |
tree | 76265ac0cffc6819728a043ed0dc1328014084d9 /sys/netinet/ip_divert.c | |
parent | 0f4a3524dd4c265831b8f73dbf0a77bf29dd8523 (diff) | |
download | src-b3cf6808ce32e66e8ec32183dc01c5aa84e84297.tar.gz src-b3cf6808ce32e66e8ec32183dc01c5aa84e84297.zip |
In div_output() explicitly set m->m_nextpkt to NULL. If divert socket
is not userland, but ng_ksocket, then m->m_nextpkt may be non-NULL. In
this case we would panic in sbappend.
Notes
Notes:
svn path=/head/; revision=146182
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 434bb5924139..65e7376537d4 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -277,7 +277,12 @@ div_output(struct socket *so, struct mbuf *m, struct divert_tag *dt; int error = 0; + /* + * An mbuf may hasn't come from userland, but we pretend + * that it has. + */ m->m_pkthdr.rcvif = NULL; + m->m_nextpkt = NULL; if (control) m_freem(control); /* XXX */ |