home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 16937 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.4 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!usc!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!ub4b!news.cs.kuleuven.ac.be!blekul11!alijku11!k111114
  2. Organization: Johannes Kepler University Linz - Computing Center
  3. Date: Tuesday, 17 Nov 1992 04:58:32 CET
  4. From: <K111114@ALIJKU11.BITNET>
  5. Message-ID: <92322.045832K111114@ALIJKU11.BITNET>
  6. Newsgroups: comp.os.linux
  7. Subject: ICMP (raw sockets)
  8. Lines: 24
  9.  
  10. hi.
  11. Maybe I've found what disables sending an ICMP message, but I'm still not done
  12. with all of it. In raw.c, line 225, the folling instruction:
  13.  
  14.   memcpy_fromfs(skb+1,from,len);
  15.  
  16. I think that this memcpy overwrites the previous built ethernet-header (line
  17. 215, sk->prot->build_header(...). Possibly the problem could be solved by
  18. doing something like:
  19.  
  20.    unsigned char *to;
  21.    ...
  22.    to=(unsigned char *)(skb+1);
  23.    to+=tmp;                            /* tmp = size of ethernet header */
  24.    memcpy_fromfs(to,from,len);
  25.  
  26. Well, do be honest: I had a little sucess, but still ICMP isn't working.
  27. But at least, the packet sent to the loopback was finally recognized as IP
  28. packet. That means, searching for the packet-type did give a X'800', which
  29. is the ethernet code for ip-packet. What does NOT work right now is the call
  30. to ptype->func, which sould be "ip_rcv", and this one should call something
  31. like icmp_rcv. Maybe just "to+=tmp" is wrong? I gonna check this out ... :-)
  32.  
  33. Bye, Herp.
  34.