Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Libnet install probs

From: Bruno Morisson <morisson(at)genhex.org>
Date: Thu May 01 2003 - 20:22:52 EDT

Hi,

Libnet's IPv6 support AFAIK isn't working at all, at least on both Linux and OpenBSD (the versions I tried). Try using the attached patch. I don't know if Mike agrees with the changes, but it works for me in Linux (not on other OSes...see below why).

Patch changelog:
- The libnet_init() function wasn't working, since it tries to set IP_HDRINCL option on the raw socket, which RFC 2292 states it's not needed, and in fact doesn't work at all on Linux 2.4 kernels and (at least) openbsd 3.2 (I suspect 3.3 also doesn't accept that option, as well as all OSes using the KAME stack).

  • The other problems were in the IPv6 resolver functions, libnet_name2addr6() and libnet_name2addr6_r() (at least on x86) didn't work correctly when LIBNET_DONT_RESOLV was set. I replaced the sscanf() and sprintf() with inet_pton() and inet_ntop(), since these are standard IPv6 address manipulation functions.

I created this patch for the development of an IPv6 halfopen portscanner (available probably next weekend at http://www.genhex.org/projects.html) , and I've been using Libnet with this patch for quite some time now on Linux with success. OpenBSD (and probably all KAME stack based OSes) make it pretty harder to create IPv6 packets with raw sockets, you either set the socket protocol on creation, or you can't change it afterwards (at least I still haven't figured out how...). For instance, if the socket is created for "IPPROTO_RAW" (like it is done by libnet_init), which in IPv4 means you can set any protocol, in IPv6 this has no special meaning, and you really create packets with protocol 255. If anyone has some ideas on how to overcome this (except link layer packet creation, obviously ;)), I'd love to hear them. On linux it works perfectly, since the IPv6 stack thankfully breaks the RFCs at least regarding to raw socket creation :)

Hope this helps.

Regards,
Bruno Morisson <morisson@genhex.org>

Do you need help?X

On Wed, 2003-04-30 at 00:36, Jatin Sachdeva wrote:
> Hi,
> i just installed the latest libnet 1.1.0 on my new redhat linux 9



To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com For additional commands, e-mail: libnet-help@securityfocus.com Received on Thu May 1 20:34:04 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:23 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library