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: <1400092762-23287-1-git-send-email-xiyou.wangcong@gmail.com>
Date:	Wed, 14 May 2014 11:39:22 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	netdev@...r.kernel.org
Cc:	"David S. Miller" <davem@...emloft.net>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Cong Wang <xiyou.wangcong@...il.com>,
	Cong Wang <cwang@...pensource.com>
Subject: [Patch net] loopback: explicitly set pkt_type to PACKET_HOST

From: Cong Wang <cwang@...pensource.com>

In a corner case where I redirect the packets from veth to lo,
packets are dropped silently when entering IP stack. This is
due to we have a different MAC addr on veth, so the packets are
marked as PACKET_OTHERHOST. And after they are redirect to lo,
this value is kept since lo has the same MAC addr with the packets.
Loopback should explicitly set it to PACKET_HOST before calling
eth_type_trans() for this specific case.

Cc: David S. Miller <davem@...emloft.net>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Signed-off-by: Cong Wang <cwang@...pensource.com>

---
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index bb96409..52b6625 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -81,6 +81,7 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
 	 */
 	skb_dst_force(skb);
 
+	skb->pkt_type = PACKET_HOST;
 	skb->protocol = eth_type_trans(skb, dev);
 
 	/* it's OK to use per_cpu_ptr() because BHs are off */
--
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