ip diverting causes panic with 1.3-*
YONETANI Tomokazu
qhwt+dfly at les.ath.cx
Wed May 4 08:01:29 PDT 2005
On Wed, May 04, 2005 at 01:09:26AM +0000, Csaba Henk wrote:
> Hi!
>
> I got panics when I tried to set up a nat gateway with DragonFly (more
> concretely, with DragonFlyPreview and DragonFlyStable, within a few
> days).
>
> Here goes the debug output obtained with DragonFlyPreview (what I see
> with DragonFlyStable upon panic seems to be the same).
>
> # gdb -k /kernel /usr/local/crash/vmcore.0
> GNU gdb 6.2.1
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-dragonfly"...
> panic: from debugger
> panic messages:
> ---
> panic: ip_output: no HDR
[snip]
> #24 0xc02696af in panic (fmt=0xc048dfa7 "ip_output: no HDR") at /usr/src/sys/kern/kern_shutdown.c:617
> #25 0xc02df78e in ip_output (m0=0xcdc6fd28, opt=0x0, ro=0xce399efc, flags=34, imo=0x0, inp=0x0)
> at /usr/src/sys/netinet/ip_output.c:183
> #26 0xc02d99f0 in div_output (so=0xcdcc16c0, m=0xc125c400, sin=0xc1023d40, control=0x0) at /usr/src/sys/netinet/ip_divert.c:309
Does this (untested) patch fix it?
Index: ip_divert.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/netinet/ip_divert.c,v
retrieving revision 1.22
diff -u -r1.22 ip_divert.c
--- ip_divert.c 18 Apr 2005 14:26:57 -0000 1.22
+++ ip_divert.c 4 May 2005 14:55:36 -0000
@@ -249,7 +249,6 @@
struct sockaddr_in *sin, struct mbuf *control)
{
int error = 0;
- struct m_hdr divert_tag;
struct m_tag *mtag;
/*
@@ -306,8 +305,7 @@
/* Send packet to output processing */
ipstat.ips_rawout++; /* XXX */
- error = ip_output((struct mbuf *)&divert_tag,
- inp->inp_options, &inp->inp_route,
+ error = ip_output(m, inp->inp_options, &inp->inp_route,
(so->so_options & SO_DONTROUTE) |
IP_ALLOWBROADCAST | IP_RAWOUTPUT,
inp->inp_moptions, NULL);
More information about the Bugs
mailing list