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]
Date:	Thu, 16 Jul 2009 14:26:53 -0700
From:	Ben Greear <greearb@...delatech.com>
To:	NetDev <netdev@...r.kernel.org>, xemul@...nvz.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: RFC:  VETH patch to zero timestamp.

The patch below helps when using VETH and bridge(s)
This makes sure that the pkt timestamp is properly (re)calculated on
receiving the packet on the peer veth device.

I'm sure this patch is white-space damaged.  If this looks
useful, I'll generate a clean patch and send as attachment.

Signed-off-by:  Ben Greear<greearb@...delatech.com>


diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 1097c72..e9136af 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -170,7 +173,12 @@ static int veth_xmit(struct sk_buff *skb, struct net_device *dev)

         if (skb->len > (rcv->mtu + MTU_PAD))
                 goto rx_drop;
-
+
+       /* Zero out the time-stamp so that receiving code is forced
+        * to recalculate it.
+        */
+       skb->tstamp.tv64 = 0;
+
         skb->pkt_type = PACKET_HOST;
         skb->protocol = eth_type_trans(skb, rcv);
         if (dev->features & NETIF_F_NO_CSUM)


Thanks,
Ben

-- 
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc  http://www.candelatech.com

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ