OpenVZ Forum


Home » Mailing lists » Users » Running DHCP on VPS, ( on a router.. )
Re: Running DHCP on VPS, ( on a router.. ) [message #21006 is a reply to message #20994] Sun, 30 September 2007 07:30 Go to previous messageGo to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

oh, sorry, wrong patch :/
I've attached new debug patch, please check it.
It should print some information in /var/log/messages about what packets
are dropped and due to which condition.

Thanks a lot for your help!
Kirill
P.S. you can use in production kernel with removed filtering in veth_xmit() until it is resolved.


Dariush Pietrzak wrote:
>>Can you please revert previous patch and apply the one I attached?
>>Does it help?
> 
>  it crashes on boot on machine with veth-using vps, (clean machine boots
> ok though).
>  Screenshot attached
> 
> 
> 
> ------------------------------------------------------------------------
> 


--- ./drivers/net/veth.c.ve2346	2007-09-30 11:26:01.000000000 +0400
+++ ./drivers/net/veth.c	2007-09-30 11:30:45.000000000 +0400
@@ -282,22 +282,26 @@ static int veth_xmit(struct sk_buff *skb
 	struct net_device *rcv = NULL;
 	struct veth_struct *entry;
 	int length;
+	int reason = 0;
 
 	stats = veth_stats(dev, smp_processor_id());
 	if (unlikely(get_exec_env()->disable_net))
 		goto outf;
 
+	reason = 1;
 	entry = veth_from_netdev(dev);
 	rcv = entry->pair;
 	if (!rcv)
 		/* VE going down */
 		goto outf;
 
+	reason = 2;
 	if (!(rcv->flags & IFF_UP)) {
 		/* Target VE does not want to receive packets */
 		goto outf;
 	}
 
+	reason = 3;
 	if (unlikely(rcv->owner_env->disable_net))
 		goto outf;
 	/* Filtering */
@@ -309,12 +313,14 @@ static int veth_xmit(struct sk_buff *skb
 		if (is_multicast_ether_addr(
 					((struct ethhdr *)skb->data)->h_dest))
 			goto out;
+		reason = 4;
 		if (compare_ether_addr(((struct ethhdr *)skb->data)->h_dest,
 					rcv->dev_addr))
 			goto outf;
 	} else if (!ve_is_super(dev->owner_env) &&
 			!entry->allow_mac_change) {
 		/* from VE to VE0 */
+		reason = 5;
 		if (compare_ether_addr(((struct ethhdr *)skb->data)->h_source,
 					dev->dev_addr))
 			goto outf;
@@ -361,6 +367,23 @@ out:
 	return 0;
 
 outf:
+	{
+		unsigned char *addr;
+		int i;
+
+		printk("veth_xmit() dropped pkt reason %d:\n", reason);
+
+		addr = ((struct ethhdr *)skb->data)->h_source;
+		printk("  src = ");
+		for (i = 0; i < ETH_ALEN; i++)
+			printk("%02x:", addr[i]);
+
+		addr = ((struct ethhdr *)skb->data)->h_dest;
+		printk(", dst = ");
+		for (i = 0; i < ETH_ALEN; i++)
+			printk("%02x:", addr[i]);
+		printk("\n");
+	}
 	kfree_skb(skb);
 	stats->tx_dropped++;
 	return 0;
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fwd: boot error - unable to mount root fs on unknown-block(0, 0)
Next Topic: Load Balacing of OpenVZ VEs with LVS and Heartbeat
Goto Forum:
  


Current Time: Sun Apr 28 11:52:37 GMT 2024

Total time taken to generate the page: 0.02302 seconds