1. 15 Sep, 2015 1 commit
  2. 06 Mar, 2015 1 commit
  3. 28 Aug, 2014 1 commit
  4. 01 Apr, 2014 2 commits
  5. 09 Jan, 2013 1 commit
  6. 03 Dec, 2012 1 commit
  7. 19 Sep, 2012 2 commits
    • Philipp Kern's avatar
      021efaf2
    • Philipp Kern's avatar
      Remove DHCPv6 DUID-LL generation. · be33e473
      Philipp Kern authored
      DUID-LL is specified in RFC 3315 with the following note:
      
         DUID-LL is recommended for devices that have a permanently-connected
         network interface with a link-layer address, and do not have
         nonvolatile, writable stable storage.  DUID-LL MUST NOT be used by
         DHCP clients or servers that cannot tell whether or not a network
         interface is permanently attached to the device on which the DHCP
         client is running.
      
      As much as I have empathy with the author of that stanza to use DUID-LL
      for predictable IDs, it would be possible if the card is taken out of
      the box and used in another machine for installation to get the same
      DUID. As far as I can see it would only be used for installation and not
      be copied into the installed system, too. (Same for DUID-LLT.) DHCPv6
      does use DUID-LLT everywhere and diverging in netcfg does not make much
      sense, especially if we violate the RFC doing that.
      
      If you want to use a predictable MAC address-based scheme, please use
      IPv6 stateless autoconfiguration which does exactly this.
      Signed-off-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      be33e473
  8. 12 Sep, 2012 19 commits
    • Colin Watson's avatar
      Stateful DHCPv6 support · 43d0ce0f
      Colin Watson authored
      This rearranges a good deal of the prior stateless DHCPv6 support, since
      much the same code can be used to start and supervise the DHCPv6 client
      in either case.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      43d0ce0f
    • Matt Palmer's avatar
      Deal with stateless DHCPv6 · fac74c74
      Matt Palmer authored
      This is a huge patch; not so much because there's a lot to calling out to
      dhcp6c and asking for stateless options, but because I decided that it was
      no longer feasible to keep shoehorning inappropriate bits of code into the
      main dhcp state machine, and so I started moving a lot of generic
      "autoconfiguration" logic into autoconfig.c, and that necessitated a bit of
      other rearranging.  The upside is that things are much cleaner and
      comprehensible now, and is in a good place to support further refactoring
      down the line to support multiple interfaces, and the merging of the static
      and automatic configuration state machines (yay non-duplicated code!)
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      fac74c74
    • Matt Palmer's avatar
      IPv6 support for using rDNS to preseed hostnames · 8802ca52
      Matt Palmer authored
      A lot of refactoring to make the code cleaner and simpler, but the
      IPv6-specific changes were actually relatively small.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      8802ca52
    • Matt Palmer's avatar
      Refactor /etc/network/interfaces writing code · 8da67dea
      Matt Palmer authored
      Remove duplication, centralise all this common functionality rather than
      leave it scattered around everywhere, and robustify the code in the face of
      potential (though, let's face it, very unlikely) errors.
      
      The result of this is much improved clarity and extensibility (important, in
      light of planned changes), and -- for now -- the addition of SLAAC support
      code.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      8da67dea
    • Colin Watson's avatar
      Move wireless options into struct netcfg_interface · 81f23607
      Colin Watson authored
      This will make it easier to refactor /etc/network/interfaces writing
      code without breaking WPA or requiring heavyweight extra linkage.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      81f23607
    • Matt Palmer's avatar
      Detect and use autoconfigured IPv6 addresses (part 1) · 5b4f5f39
      Matt Palmer authored
      This is the primary infrastructure for supporting the detection of IPv6
      autoconfiguration.  A lot of changes in dhcp.c...
      
      Still to do:
      * FreeBSD support
      * Writing out /e/n/interfaces
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      5b4f5f39
    • Matt Palmer's avatar
      Support IPv6 netmasks, for people who like typing too much · f3f28cf8
      Matt Palmer authored
      I thought about throwing up an error if an IPv6 static address is entered,
      telling the user to go back and add a netmask, but this had a certain
      aesthetic symmetry to it that I prefer for some reason.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      f3f28cf8
    • Matt Palmer's avatar
      First working draft of IPv6 support · 6e8653e9
      Matt Palmer authored
      This commit has been tested as providing a fully-working installation on
      i386, using nothing but IPv6 (address, resolvers, the lot) -- no IPv4 to be
      seen anywhere.  It requires an IPv6-capable wget (patch pushed to busybox),
      but it's rocking along pretty hard apart from that.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      6e8653e9
    • Matt Palmer's avatar
      Make a few more functions IPv6 aware · 3369f3ff
      Matt Palmer authored
      The functions to calculate network and broadcast addresses, and sanity check
      gateway addresses, are now well-tested and IPv6 compatible.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      3369f3ff
    • Matt Palmer's avatar
      Add netcfg_parse_cidr_address to do protocol-independent address parsing · e61f02d0
      Matt Palmer authored
      A new method we'll use to detect whether we're using IPv4 or IPv6, and an
      optional CIDR-style (/NN) netmask.  With tests.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      e61f02d0
    • Matthew Palmer's avatar
      Add test framework, and make inet_mton support AF_INET6 · 5cf8edd8
      Matthew Palmer authored
      Most of this changeset is adding a README and build/runtime scaffolding for
      the test suite I'm now using to verify correct functionality.  The rest is
      tests for inet_mton, and modification to support mask length conversion for
      AF_INET6 addresses.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      5cf8edd8
    • Matthew Palmer's avatar
      Create and use a struct to store all network interface settings · 8da7622f
      Matthew Palmer authored
      Please welcome struct netcfg_interface.  It's a place to keep all of the
      fundamental configuration about an interface -- device name, IP address,
      gateway, netmask, etc.  This results in the removal of the 'interface'
      global, which just kept the interface name, as well as the renaming of a lot
      of places that used 'interface' to if_name, to make it obvious that we're
      talking about the name of an interface, not all of the details about it.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      8da7622f
    • Matthew Palmer's avatar
      Convert all remaining in_addr variables to strings · fedbf6ca
      Matthew Palmer authored
      This completes the first phase of my refactoring to support IPv6.  The
      remaining variables which stored addresses, netmasks, etc in struct in_addr
      form now store that data in strings.  The transforms are largely mechanical
      in nature; to test I've done it correctly I've run install tests on DHCP,
      static configs, and pointopoint links under Linux.  Other kernels will
      unfortunately have to handle things themselves.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      fedbf6ca
    • Matthew Palmer's avatar
      Make nameserver_array a local, and an array of strings · 3402f960
      Matthew Palmer authored
      One more global variable bites the dust, and one less blocker for IPv6.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      3402f960
    • Matthew Palmer's avatar
      Remove gateway from being a global var, and turn it into a string · 196154f2
      Matthew Palmer authored
      The 'gateway' global variable has been completely removed, and turned into a
      local variable to be passed around as needed.
      
      I also, as the major part of this patch, changed the type of the variable
      from a struct in_addr into a char *.  This has two advantages:
      
      * Less inet_{pton,ntop} calls: At the moment, there are still a lot of them
        because other network data variables are still in_addrs, but most of the
        time we need all of those variables as strings.
      * IPv6 compatibility: Storing IP addresses as strings makes IPv6
        compatibility a lot easier; rather than needing unions and flag variables,
        we can just store everything in strings.  Yippee!
      
      All other relevant variables will be converted into strings down the line,
      too.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      196154f2
    • Matthew Palmer's avatar
      Remove global variable netcfg_progress_displayed · bfe0d595
      Matthew Palmer authored
      It was only used to guard a call to debconf_progress_stop() in netcfg_die();
      I've checked a few debconf frontend implementations, and they all seem to
      handle a PROGRESS STOP message when they're not in a progress bar in a sane
      and safe manner.  I've also tested that there's no ill effects in practice
      using the default (newt) frontend.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      bfe0d595
    • Matthew Palmer's avatar
      Only flush address families we manage · 1322a1f8
      Matthew Palmer authored
      ip addr flush gets rid of addresses from all address families, not just
      IPv4.  This means that until now, IPv6 loopback, link-local, and
      automatically-assigned addresses were being removed.  This won't have been
      helping anyone.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      1322a1f8
    • Matthew Palmer's avatar
      Refactor out some program-global variables · 0222eeb3
      Matthew Palmer authored
      Removed most of the program-global in_addr variables; most have moved to
      become module-global in static.c, but ipaddress is fully local now, and is
      passed around where it needs to be (as a proof-of-concept for the other
      variables at a later time).
      
      The calculation of network and broadcast addresses was rearranged somewhat
      as a consequence; it has been placed closer to where it's actually used, and
      abstracted into a couple of helper functions.
      
      Tested with d-i runs through to mirror selection with DHCP on, DHCP off
      (static address config), and a PLIP (pointopoint) install (add plip-modules
      to the initrd and modprobe plip before doing anything -- works great).
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      0222eeb3
    • Matthew Palmer's avatar
      Pull NULL_IPADDRESS out into a global constant · 48035f3a
      Matthew Palmer authored
      It was used in so many different places, identically, that it seemed worth
      turning it into a global const.  Will be of more use when we go IPv6.
      Rebased-and-modified-by: Philipp Kern's avatarPhilipp Kern <pkern@debian.org>
      48035f3a
  9. 28 Aug, 2012 1 commit
  10. 11 Aug, 2012 2 commits
  11. 09 Aug, 2012 7 commits
  12. 07 Aug, 2012 1 commit
  13. 06 Aug, 2012 1 commit