All of lore.kernel.org
 help / color / mirror / Atom feed
* strange kernel message when hacking the NIC driver
@ 2002-01-11  4:19 Pei Zheng
  2002-01-11  5:20 ` Timothy Covell
  0 siblings, 1 reply; 17+ messages in thread
From: Pei Zheng @ 2002-01-11  4:19 UTC (permalink / raw)
  To: linux-kernel

Hi, 

I've done some simple hackings to the network device driver. Basically
i want to connect two NICs as a point-to-point link,ie, packets sending
out from one NIC will be redirected to another NIC, sort of direct-link
cable between these two NICs.
So in the drivers of these two NICs, before hart_start_xmit(), the skb's 
header will be forcibly set to its peer's MAC address, thus each packey
sending out from one NIC will be directly diverted to its peer NIC. This 
works fine most of the case since tcpdump shows that packets traverse in
this way. However, i found errors in system log:

Jan 10 18:02:40 em2 kernel: 1130: 09 => cb
Jan 10 18:02:40 em2 kernel: 388: f4 => 45
Jan 10 18:02:40 em2 kernel: 26: c0 => 7d
Jan 10 18:02:40 em2 kernel: 149: 1f => 98
Jan 10 18:02:40 em2 kernel: After error applied:
Jan 10 18:02:40 em2 kernel: 00 80 c8 b9 6b b6 00 80 c8 b9 6b b6 08 00
45 00
Jan 10 18:02:40 em2 kernel: 05 dc 73 cd 20 b9 3f 11 44 26 7d a8 0c 0a
c0 a8
Jan 10 18:02:40 em2 kernel: 10 0a e3 c1 4c 1f 6f 83 61 dc fc 5e 5c f4
66 17
Jan 10 18:02:40 em2 kernel: 2c 73 19 ce cc 2d 69 69 bd 43 33 6d 82 de
4a 87
Jan 10 18:02:40 em2 kernel: 8d 9d 81 f6 2e b2 8c 6a d5 e4 f2 e6 bc ab
5a 01
Jan 10 18:02:40 em2 kernel: 34 d5 39 f8 d9 5b 16 bc dc 95 bd b4 08 a9
5e 11
Jan 10 18:02:40 em2 kernel: df 38 80 8a ca d8 1c 53 65 97 91 4c 84 5a
a1 0e
Jan 10 18:02:40 em2 kernel: c2 5f d4 02 a1 9e 1c 35 d4 95 08 44 81 16
a3 e0

there are many this kind of messages. Don't understand what it is. the
beginning part of the data seems to be an icmp packet(00 80 c8 b9 6b
b6 is the MAC of one NIC). For some reason kernel thinks that this
packet is not correct. Any idea about this? If i want to modify a
packet's header before it goes to hard_strat_xmit(), what else should
i do except setting the skb header to the MAC of the NIC's peer only? 
checksum stuff?

Any helps will be highly appreciated.

-Pei

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: strange kernel message when hacking the NIC driver
@ 2002-01-14  6:32 Zwane Mwaikambo
  2002-01-14  7:41 ` Bernd Eckenfels
  0 siblings, 1 reply; 17+ messages in thread
From: Zwane Mwaikambo @ 2002-01-14  6:32 UTC (permalink / raw)
  To: timothy.covell; +Cc: Linux Kernel

Timothy Covell <timothy.covell@ashavan.org> said:
>If you try to reach a host but fail due to routing issues, then ICMP sends out
>DESTINATION HOST UNKNOWN/HOST UNREACHABLE messages.
>So, ICMP and very much to do with ARP.

Using your argument... Everytime my feline decides to chew my ethernet
cable i lose my network connection, hence i get ICMP HOST UNREACHABLE ergo
my cat has very much to do with ARP.

Those are errors just filtering up the layers, same way an app doesn't
know anything about what device you're writing to, but will complain about
incomplete data writes if you run out of space.

Regards,
	Zwane Mwaikambo



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-01-14  7:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-11  4:19 strange kernel message when hacking the NIC driver Pei Zheng
2002-01-11  5:20 ` Timothy Covell
2002-01-11 11:55   ` Timothy Covell
2002-01-11 12:07     ` David S. Miller
2002-01-11 12:20       ` Timothy Covell
2002-01-11 12:28         ` David S. Miller
2002-01-12 21:37         ` Prof. Brand 
2002-01-12 21:44           ` Timothy Covell
2002-01-11 13:11     ` Alan Cox
2002-01-11 19:02       ` Timothy Covell
2002-01-11 19:24         ` Paul Walmsley
2002-01-11 22:51         ` Timothy Covell
2002-01-12 21:37     ` Prof. Brand 
2002-01-12 21:58       ` Timothy Covell
2002-01-11 19:33   ` Pei Zheng
  -- strict thread matches above, loose matches on Subject: below --
2002-01-14  6:32 Zwane Mwaikambo
2002-01-14  7:41 ` Bernd Eckenfels

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.