1. 26 Feb, 2016 1 commit
    • Josef Bacik's avatar
      net: fix ipv6 routing · eb9f401f
      Josef Bacik authored
      ipv6 routing in grub2 is broken, we cannot talk to anything outside our local
      network or anything that doesn't route in our global namespace.  This patch
      fixes this by doing a couple of things
      
      1) Read the router information off of the router advertisement.  If we have a
      router lifetime we need to take the source address and create a route from it.
      
      2) Changes the routing stuff slightly to allow you to specify a gateway _and_ an
      interface.  Since the router advertisements come in on the link local address we
      need to associate it with the global address on the card.  So when we are
      processing the router advertisement, either use the SLAAC interface we create
      and add the route to that interface, or loop through the global addresses we
      currently have on our interface and associate it with one of those addresses.
      We need to have a special case here for the default route so that it gets used,
      we do this by setting the masksize to 0 to mean it encompasses all networks.
      The routing code will automatically select the best route so if there is a
      closer match we will use that.
      
      With this patch I can now talk to ipv6 addresses outside of my local network.
      Thanks,
      Signed-off-by: 's avatarJosef Bacik <jbacik@fb.com>
      eb9f401f
  2. 07 Oct, 2015 1 commit
    • Stanislav Kholmanskikh's avatar
      ofnet: Do not set SUFFIX for sun4v network devices · ee67bcf3
      Stanislav Kholmanskikh authored
      sun4v vnet devices do not implement the support of duplex and speed
      instance attributes. An attempt to open such a device with
      the attributes will fail:
      
      ok select net:speed=auto,duplex=auto
      Unknown key 'speed'
      Unknown key 'duplex'
      Manual Configuration: Host IP, boot server and filename must be specified
      WARNING: /virtual-devices@100/channel-devices@200/network@0: Can't open OBP standard TFTP package
      
      Can't open device
      ok
      
      Therefore, let's not set SUFFIX for such devices.
      Signed-off-by: 's avatarStanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
      ee67bcf3
  3. 09 Aug, 2015 1 commit
    • Josef Bacik's avatar
      efinet: handle get_status() on buggy firmware properly · 4fe8e6d4
      Josef Bacik authored
      The EFI spec indicates that get_status() should return the address of the buffer
      we passed into transmit to indicate the the buffer was transmitted.  However we
      have boxes where the firmware returns some arbitrary address instead, which
      makes grub think that we've not sent anything.  So since we have the SNP stuff
      opened in exclusive mode just assume any non-NULL txbuf means that our transmit
      occurred properly.  This makes grub able to do its networking stuff properly on
      our broken firmware.  Thanks,
      
      cc: Peter Jones <pjones@redhat.com>
      Signed-off-by: 's avatarJosef Bacik <jbacik@fb.com>
      4fe8e6d4
  4. 16 Jun, 2015 1 commit
    • Andrei Borzenkov's avatar
      efinet: enable hardware filters when opening interface · f348aee7
      Andrei Borzenkov authored
      Exclusive open on SNP will close all existing protocol instances which
      may disable all receive filters on interface. Reinstall them after we
      opened protocol exclusively.
      
      Also follow UEFI specification recommendation and stop interfaces when
      closing them:
      
      Unexpected system errors, reboots and hangs can occur if an OS is loaded
      and the network devices are not Shutdown() and Stopped().
      
      Also by: Mark Salter <msalter@redhat.com>
      Closes: 45204
      f348aee7
  5. 07 May, 2015 2 commits
    • Andrei Borzenkov's avatar
      efinet: open Simple Network Protocol exclusively · 49426e9f
      Andrei Borzenkov authored
      EDK2 network stack is based on Managed Network Protocol which is layered
      on top of Simple Management Protocol and does background polling. This
      polling races with grub for received (and probably trasmitted) packets
      which causes either serious slowdown or complete failure to load files.
      
      Open SNP device exclusively.  This destroys all child MNP instances and
      stops background polling.
      
      Exclusive open cannot be done when enumerating cards, as it would destroy
      PXE information we need to autoconfigure interface; and it cannot be done
      during autoconfiguration as we need to do it for non-PXE boot as well. So
      move SNP open to card ->open method and add matching ->close to clean up.
      
      Based on patch from Mark Salter <msalter@redhat.com>
      Also-By: 's avatarMark Salter <msalter@redhat.com>
      Closes: 41731
      49426e9f
    • Andrei Borzenkov's avatar
      efinet: skip virtual IPv4 and IPv6 devices when enumerating cards · c52ae405
      Andrei Borzenkov authored
      EDK2 PXE driver creates two child devices - IPv4 and IPv6 - with
      bound SNP instance. This means we get three cards for every physical
      adapter when enumerating. Not only is this confusing, this may result
      in grub ignoring packets that come in via the "wrong" card.
      
      Example of device hierarchy is
      
       Ctrl[91] PciRoot(0x0)/Pci(0x3,0x0)
         Ctrl[95] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)
           Ctrl[B4] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)
           Ctrl[BC] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)
      
      Skip PXE created virtual devices when enumerating cards. Make sure to
      find real card when applying initial autoconfiguration during PXE boot,
      this information is associated with one of child devices.
      c52ae405
  6. 04 May, 2015 3 commits
  7. 27 Mar, 2015 1 commit
  8. 20 Mar, 2015 1 commit
  9. 31 Jan, 2015 1 commit
  10. 05 Feb, 2014 1 commit
    • Paulo Flabiano Smorigo's avatar
      add bootpath parser for open firmware · 9585647a
      Paulo Flabiano Smorigo authored
      It enables net boot even when there is no bootp/dhcp server.
      
      * grub-core/net/drivers/ieee1275/ofnet.c: Add grub_ieee1275_parse_bootpath and
      call it at grub_ieee1275_net_config_real.
      * grub-core/kern/ieee1275/init.c: Add bootpath to grub_ieee1275_net_config.
      * include/grub/ieee1275/ieee1275.h: Likewise.
      9585647a
  11. 15 Dec, 2013 1 commit
  12. 04 Dec, 2013 1 commit
  13. 15 Oct, 2013 1 commit
  14. 08 Oct, 2013 1 commit
  15. 15 Aug, 2013 1 commit
  16. 03 May, 2013 1 commit
  17. 13 Apr, 2013 2 commits
  18. 12 Apr, 2013 2 commits
  19. 17 Mar, 2013 1 commit
  20. 03 Mar, 2013 1 commit
  21. 23 Sep, 2012 1 commit
    • Colin Watson's avatar
      Fix grub-emu build on FreeBSD. · 794c8c33
      Colin Watson authored
      * Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
      * grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
      headers on Linux.
      (GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
      implementation is currently Linux-specific.
      * util/getroot.c (exec_pipe): Define only on Linux or when either
      libzfs or libnvpair is unavailable.
      (find_root_devices_from_poolname): Remove unused path variable.
      794c8c33
  22. 22 Jun, 2012 2 commits
  23. 19 Jun, 2012 3 commits
  24. 09 Jun, 2012 1 commit
  25. 29 Apr, 2012 1 commit
  26. 12 Apr, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Terminate UNDI and PXE before launching the payload to avoid problems · 3c491b47
      Vladimir 'phcoder' Serbinenko authored
      	with DMA.
      
      	* grub-core/commands/boot.c (grub_loader_noreturn): Rename to ...
      	(grub_loader_flags): ... this. All users updated.
      	(grub_loader_boot): Check for GRUB_LOADER_FLAG_NORETURN.
      	* grub-core/loader/i386/pc/pxechainloader.c (grub_cmd_pxechain): Mark
      	loader as GRUB_LOADER_FLAG_PXE_NOT_UNLOAD.
      	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_shutdown): New
      	function.
      	(grub_pxe_restore): Likewise.
      	(fini_hnd): New var.
      	(GRUB_MOD_INIT): Register shutdown hook.
      	(GRUB_MOD_FINI): Shutdown and unregister shutdown hook.
      	* include/grub/loader.h (GRUB_LOADER_FLAG_NORETURN): New const.
      	(GRUB_LOADER_FLAG_PXE_NOT_UNLOAD): Likewise.
      	(grub_loader_set): Rename second argument to flags.
      3c491b47
  27. 11 Mar, 2012 1 commit
  28. 08 Feb, 2012 1 commit
  29. 05 Feb, 2012 1 commit
  30. 24 Jan, 2012 1 commit
  31. 13 Dec, 2011 1 commit
  32. 06 Oct, 2011 1 commit