lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc862f80607221611x52efac88u620516e17edfa03b@mail.gmail.com>
Date:	Sat, 22 Jul 2006 19:11:21 -0400
From:	"Tien ChenLi" <cltien@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH]pktgen oops when used with balance-tlb bonding

I fixed a bug in pktgen so it won't cause oops when used with
balance-tlb or balance-alb bonding driver:

--- linux-2.6.17.4/net/core/pktgen.c.orig       2006-07-06 16:02:28.000000000 -0
400
+++ linux-2.6.17.4/net/core/pktgen.c    2006-07-10 16:40:47.000000000 -0400
@@ -2149,6 +2149,9 @@
        skb->mac.raw = ((u8 *) iph) - 14 - pkt_dev->nr_labels*sizeof(u32);
        skb->dev = odev;
        skb->pkt_type = PACKET_HOST;
+       skb->mac.raw = eth;
+       skb->nh.iph = iph;
+       skb->h.uh = udph;

        if (pkt_dev->nfrags <= 0)
                pgh = (struct pktgen_hdr *)skb_put(skb, datalen);

The root cause is that the bond_alb_xmit in bonding will peek the
destination address in packet via the skb->nh.iph pointer, generally
this will be filled by upper layer network driver, but the packet
generated by pktgen will be sent to device driver so it will need to
set this pointer correctly. The other two pointers are not necessary
for now, they are set to avoid similar problem.

Chen-Li Tien
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ