Re: Strange "buggy protocol" message and tcpdump ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

check that you have set up all the skb fields (skb->nh.raw ?) before sending your packet, arp_send  is a good example, 
something similar to :

+              /*
+               *      Allocate a buffer
+               */
+
+       skb = alloc_skb(sizeof(struct adapt_pkt)+(dev->hard_header_len), GFP_ATO
MIC);
+       if (skb == NULL)
+               return;
+
+       
+       skb_reserve(skb, (dev->hard_header_len));
+       skb->nh.raw = skb->data;
+       apkt = (struct adapt_pkt *) skb_put(skb,sizeof(struct adapt_pkt));
+       skb->dev = dev;
+       skb->protocol = __constant_htons (ETH_P_ADAPT);
+       src_hw = dev->dev_addr;
+       dest_hw = dev_addr;
+       ptype = ETH_P_ADAPT;
+       if (dev->hard_header && dev->hard_header(skb,dev,ptype,dest_hw,src_hw,sk
b->len) < 0)
+               goto out;
 

On Tue, Jul 08, 2003 at 08:01:17PM +0800, blue wrote:
> Hi, all:
>   I wrote a Linux Networking module, and tried send my own sk_buff out. It 
> seemed success, but a little strange (maybe much strange?). If I insmod my 
> module, and use tcpdump to monitor network situation, I would see some 
> messages like"0008 buggy protocol" in my kernel. But if I don't use tcpdump, 
> then there's no such messages in my kernel.
> 
>   Strange, Hmmmm.....Could anyone tell me is this my module's bug???
> 
>   Best regards!
> 
>   Yi-Wen
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
				Vincent Guffens, UCL/CESAME
				010/ 47 80 30 -- Euler a017
				http://www.auto.ucl.ac.be/~guffens	

Value your freedom, or you will lose it, teaches history. 
"Don't bother us with politics," respond those who don't want to learn.
	      	-- Richard M. Stallman
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux