Re: New header in packet !! Bingo

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

 




Bingo ! You were right. I figured that out last night after hours and
hours of kernel recompiles and reboots !! :)

It now works.

Thanks to all
ciao,
Amit

On Tue, 26 Jun 2001, yal wrote:

> Hi,
> You should add new Ethernet type in your packet and define handle that
> process it. And this will be enough.
>
> Yordan.
>
>
> On Monday 25 June 2001 21:42, Amit Kucheria wrote:
> > Hi Akshay,
> >
> > Thanks for your reply.
> >
> > I am looking at the ip_build_xmit() code, but i have a feeling that this
> > is not my problem. The 16 bytes is the length of 'myheader' and is not
> > something related to a multiple of 16 bytes.
> >
> > My packets travel from one machine to another but they dont go up the
> > protocol stack on the destination machine.
> > Following is the output of tcpdump at the destination machine for ping
> > traffic that i am sending (ping data set to 0xff).
> >
> > --------------------------------------------------------------------
> > 14:29:05.003856 eth0 < truncated-ip - 157 bytes missing!10.5.1.2 >
> > 69.0.0.84: (frag 2573:217@2056) [tos 0x5]  (ttl 3, bad cksum 0!,
> > optlen=20[|ip])
> >
> > 1.			 0a05 0101 0a0d 0101 0300 0000 0a05 0102
> > 2.			 4500 0054 0378 0000 4001 611e 0a0d 0101
> > 3.			 0a05 0101 0800 4b8a 5a02 3600 0191 373b
> > 4.			 e3a6 0000 ffff ffff ffff ffff ffff ffff
> > 5.			 ffff ffff ffff ffff ffff ffff ffff ffff
> > 6.			 ffff ffff ffff ffff ffff ffff ffff ffff
> > 7.			 ffff ffff
> > -------------------------------------------------------------------
> >
> > As can be seen from tcpdump's interpretation, the src is 10.5.1.2 and
> > destination is 69.0.0.84. That means the IP src and destination are being
> > taken from the last 4 bytes of line 1 (0a05 0102) and first 4 bytes of
> > line 2 (4500 0054). This in turn means that the first line is taken to be
> > the IP header when in fact it is "myheader".
> >
> > The real IP header begins from line 2 (4500 0054).
> >
> > I tried setting skb->nh.iph to that point (line 2) but it doesnt seem to
> > work ! That is when i noticed that skb->nh.raw and skb->h.raw are set to
> > skb->data in net_bh(). So essentially mac.raw, nh.raw and h.raw are all
> > pointing to the ethernet header when the packet reaches net_bh() on the
> > destination machine.
> >
> > I dont exactly know where my reasoning is going wrong.
> >
> > Regards,
> > Amit


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[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