Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2012 12:19:30 +0200 (CEST)
From:      Joerg Pulz <Joerg.Pulz@frm2.tum.de>
To:        Daniel Hartmeier <daniel@benzedrine.cx>
Cc:        FreeBSD-gnats-submit@freebsd.org, freebsd-pf@freebsd.org
Subject:   Re: panic when using pf and route-to (maybe: bad fragment handling?)
Message-ID:  <alpine.BSF.2.00.1205221216260.89783@unqrf.nqzva.sez2>
In-Reply-To: <20120522090227.GD29536@insomnia.benzedrine.cx>
References:  <201205210726.q4L7Q6m9064258@hades.admin.frm2> <20120522090227.GD29536@insomnia.benzedrine.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--3469798045-1358106948-1337681906=:89783
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; FORMAT=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <alpine.BSF.2.00.1205221218541.89783@unqrf.nqzva.sez2>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-ID: <alpine.BSF.2.00.1205221218540.89783@unqrf.nqzva.sez2>

On Tue, 22 May 2012, Daniel Hartmeier wrote:

> On Mon, May 21, 2012 at 09:26:06AM +0200, Joerg Pulz wrote:
>
>> #12 0xffffffff8032842a in pf_route (m=0xffffff8000241658,
>>     r=0xfffffe0005dc8af8, dir=) at /usr/src/sys/contrib/pf/net/pf.c:6138
>> 6138		error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist, sw_csum);
>> (kgdb) list
>> 6133		/*
>> 6134		 * XXX: is cheaper + less error prone than own function
>> 6135		 */
>> 6136		NTOHS(ip->ip_len);
>> 6137		NTOHS(ip->ip_off);
>> 6138		error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist, sw_csum);
>> 6139	#else
>> 6140		error = ip_fragment(m0, ifp, ifp->if_mtu);
>> 6141	#endif
>> 6142		if (error) {
>
> Can you print *ifp in this context, please?
>
> Just to make sure if_mtu is sane.

Daniel,

thanks for all your effort.
Here comes *ifp

Joerg

#### kgdb.out
#12 0xffffffff8032842a in pf_route (m=0xffffff80002418e8,
     r=0xfffffe0005e05750, dir=Variable "dir" is not available.
) at /usr/src/sys/contrib/pf/net/pf.c:6138
6138            error = ip_fragment(ip, &m0, ifp->if_mtu, 
ifp->if_hwassist, sw_csum);
(kgdb) p *ifp
$1 = {if_softc = 0xffffff80007b1000, if_l2com = 0xfffffe000300ba40,
   if_vnet = 0x0, if_link = {tqe_next = 0xfffffe0003001000,
     tqe_prev = 0xfffffe0003001818},
   if_xname = "bge1", '\0' <repeats 11 times>,
   if_dname = 0xfffffe00028f07d8 "bge", if_dunit = 1, if_refcount = 1,
   if_addrhead = {tqh_first = 0xfffffe0003009800,
     tqh_last = 0xfffffe0005abdcb8}, if_pcount = 0, if_carp = 0x0,
   if_bpf = 0xfffffe00050e7900, if_index = 6, if_index_reserved = 0,
   if_vlantrunk = 0x0, if_flags = 34819, if_capabilities = 524443,
   if_capenable = 524443, if_linkmib = 0x0, if_linkmiblen = 0, if_data = {
     ifi_type = 6 '\006', ifi_physical = 0 '\0', ifi_addrlen = 6 '\006',
     ifi_hdrlen = 18 '\022', ifi_link_state = 2 '\002',
     ifi_spare_char1 = 0 '\0', ifi_spare_char2 = 0 '\0',
     ifi_datalen = 152 '\230', ifi_mtu = 1500, ifi_metric = 0,
     ifi_baudrate = 1000000000, ifi_ipackets = 54812, ifi_ierrors = 0,
     ifi_opackets = 34745, ifi_oerrors = 0, ifi_collisions = 0,
     ifi_ibytes = 41868704, ifi_obytes = 5296902, ifi_imcasts = 10095,
     ifi_omcasts = 0, ifi_iqdrops = 0, ifi_noproto = 0, ifi_hwassist = 3,
     ifi_epoch = 1, ifi_lastchange = {tv_sec = 1337441486, tv_usec = 788343}},
   if_multiaddrs = {tqh_first = 0xfffffe00059137c0,
     tqh_last = 0xfffffe0005914300}, if_amcount = 0,
   if_output = 0xffffffff8073d4b5 <ether_output>,
   if_input = 0xffffffff8073ca8b <ether_input>,
   if_start = 0xffffffff803c2da7 <bge_start>,
   if_ioctl = 0xffffffff803c8fda <bge_ioctl>,
   if_init = 0xffffffff803c8f94 <bge_init>,
   if_resolvemulti = 0xffffffff8073c44d <ether_resolvemulti>,
   if_qflush = 0xffffffff807352f2 <if_qflush>,
   if_transmit = 0xffffffff807351be <if_transmit>, if_reassign = 0,
   if_home_vnet = 0x0, if_addr = 0xfffffe0003009800, if_llsoftc = 0x0,
   if_drv_flags = 64, if_snd = {ifq_head = 0x0, ifq_tail = 0x0, ifq_len = 0,
     ifq_maxlen = 511, ifq_drops = 0, ifq_mtx = {lock_object = {
         lo_name = 0xfffffe0003002028 "bge1", lo_flags = 16973824, lo_data = 0,
         lo_witness = 0xffffff80006cf480}, mtx_lock = 4}, ifq_drv_head = 0x0,
     ifq_drv_tail = 0x0, ifq_drv_len = 0, ifq_drv_maxlen = 511, altq_type = 0,
     altq_flags = 1, altq_disc = 0x0, altq_ifp = 0xfffffe0003002000,
     altq_enqueue = 0, altq_dequeue = 0, altq_request = 0, altq_clfier = 0x0,
     altq_classify = 0, altq_tbr = 0x0, altq_cdnr = 0x0},
   if_broadcastaddr = 0xffffffff80ada7c0 "ÿÿÿÿÿÿ", if_bridge = 0x0,
   if_label = 0x0, if_prefixhead = {tqh_first = 0x0,
     tqh_last = 0xfffffe0003002278}, if_afdata = {0x0, 0x0, 0xfffffe000581fa00,
     0x0 <repeats 25 times>, 0xfffffe0005814800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
     0x0, 0x0, 0x0}, if_afdata_initialized = 2, if_afdata_lock = {
     lock_object = {lo_name = 0xffffffff80ad9a5a "if_afdata",
       lo_flags = 69402624, lo_data = 0, lo_witness = 0xffffff80006cf400},
     rw_lock = 1}, if_linktask = {ta_link = {stqe_next = 0x0}, ta_pending = 0,
     ta_priority = 0, ta_func = 0xffffffff80737799 <do_link_state_change>,
     ta_context = 0xfffffe0003002000}, if_addr_mtx = {lock_object = {
       lo_name = 0xffffffff80acbb20 "if_addr_mtx", lo_flags = 16973824,
       lo_data = 0, lo_witness = 0xffffff80006c8b80}, mtx_lock = 4},
   if_clones = {le_next = 0x0, le_prev = 0x0}, if_groups = {
     tqh_first = 0xfffffe0005093ae0, tqh_last = 0xfffffe0005093ae8},
   if_pf_kif = 0xfffffe0005889300, if_lagg = 0x0, if_description = 0x0,
   if_fib = 0, if_alloctype = 6 '\006', if_cspare = "\000\000", if_ispare = {0,
     0, 0, 0}, if_pspare = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
#### kgdb.out

- -- 
The beginning is the most important part of the work.
 				-Plato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iD8DBQFPu2g1SPOsGF+KA+MRAoTIAJ9zBBTdm9naccUy+S2u89hqcXl2kACfRApP
bJ+OVmJETP0NtLujBxb7Kqg=
=MqcS
-----END PGP SIGNATURE-----
--3469798045-1358106948-1337681906=:89783--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1205221216260.89783>