[PATCH] IPv6 support for ggate

From: Craig Boston (craig_at_tobuj.gank.org)
Date: 10/28/05

  • Next message: Matt Emmerton: "RFC: porting NetBSD fsdb enhancements to FreeBSD"
    Date: Thu, 27 Oct 2005 23:04:50 -0500
    To: freebsd-hackers@freebsd.org
    
    
    

    Hi hackers:

    Today I had a need to run ggate over an IPv6-only network. I was a
    little surprised that it didn't seem to like that, but not discouraged.
    So here's a patch that adds IPv6 support for ggated(8) and ggatec(8)
    ;)

    Overview:

    * Standardizes on sockaddr_storage for both sockets and addresses

    * A few semantic differences for certain functions due to the above
      change (ip2str, g_gate_str2ip)

    * ggated by default listens on both v4 and v6 sockets (uses select loop
      instead of accept loop). You can listen on v4 only with "-a 0.0.0.0"
      or v6 only with "-a ::", or of course bind to a specific address

    * Use getaddrinfo in place of gethostbyname, and parse addresses with
      inet_pton

    * All address are stored internally in network byte order now. Mask
      comparisons should be independent of byte order since it's purely a
      "vertical" comparison.

    Things I'm not entirely happy with:

    * More AF_INET/AF_INET6 conditional code than I'd have liked to add.
      Unfortunately there doesn't seem to be an easy way to be protocol
      neutral with a lot of the socket functions.

    * The v6 part of countmask is really ugly and complicated. I need to
      check the ifconfig source and see if there's any standard way for
      converting a /nnn mask to a binary mask.

    * When resolving DNS names, it will only use the first entry if there
      are multiple. It technically always had this problem, but it's more
      noticeable now. Networks are more likely to have names with both a v4
      and v6 record than to have multiple v4 addresses. Fixing this the
      'right way' would require significantly more invasive changes.

    Other than that, I was running with this patch for most of the afternoon
    with great success. Now I just need to write a kernel mode ggatec so I
    can mount root over ggate :P

    -- Craig

    
    
    

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



  • Next message: Matt Emmerton: "RFC: porting NetBSD fsdb enhancements to FreeBSD"

    Relevant Pages

    • Re: Slow Accessing a memo field on a network
      ... However, I'm not understanding why with multiple reads from the same field (reading the memofield about 150 times) it's very quick but the moment the length of the field is over 500, the speed declines drastically. ... Is this a network or maybe a VFP issue where in a shared file it internally buffers up to 500 characters and if more, then rereads the data and maybe that is why things slow down? ... I played around with my memo field and I noticed that regardless of the number of lines in the memofield the slowness is due to the length of the memo field. ...
      (microsoft.public.fox.programmer.exchange)
    • conscious aesthetic plain ahead of Saad al Shoulis bunch
      ... suddenly alert the exemption. ... multiple, whereas because of you it's conveying grim. ... tides at times a network. ... unfortunate, describes in support of it, sailing punctually. ...
      (sci.crypt)
    • Re: Replication as a Performance Enhancer?
      ... And, if there is a need to have them work with multiple reocrds, but that's ... Or, alternativesly, can put each subform on its own tab in a tabbed ... leading me to believe the network has a lot to do with it. ... was bring in the MDW file to his local machine, ...
      (comp.databases.ms-access)
    • Re: Determining what should be blocked in and out?
      ... mask, the .0, will always make the last byte of the IP address you're ... zero always for the purposes of checking if it's to be blocked. ... IP address you are trying to contact is on the same network as you. ... Since this equals the same network to be blocked, ...
      (comp.security.firewalls)
    • Re: TCP/IP connection problem
      ... that includes routers) but a mask problem. ... These changes depend upon what type network connectivity ... then the mask on the VMS system is not ... With those ranges you can use subnetting which is usually ...
      (comp.os.vms)