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. 05 Feb, 2014 1 commit
  3. 21 Jan, 2014 1 commit
    • Paulo Flabiano Smorigo's avatar
      increase network try interval gradually · 6f65e36c
      Paulo Flabiano Smorigo authored
      * grub-core/net/arp.c (grub_net_arp_send_request): Increase network try
      interval gradually.
      * grub-core/net/icmp6.c (grub_net_icmp6_send_request): Likewise.
      * grub-core/net/net.c (grub_net_fs_read_real): Likewise.
      * grub-core/net/tftp.c (tftp_open): Likewise.
      * include/grub/net.h (GRUB_NET_INTERVAL_ADDITION): New define.
      6f65e36c
  4. 15 Dec, 2013 1 commit
  5. 06 Nov, 2013 1 commit
  6. 17 Mar, 2013 1 commit
  7. 22 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Implement flow control for tftp. · b27069e0
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/net/net.c (receive_packets): Decrease the stop to 10
      	packets but stop only if stop condition is satisfied.
      	(grub_net_fs_read_real): Call packets_pulled after real read. Use
      	`stall' instead of `eof' as stop condition.
      	* grub-core/net/http.c (parse_line): Set `stall' on EOF.
      	(http_err): Likewise.
      	* grub-core/net/tftp.c (ack): Replace the first argument with data
      	instead of socket.
      	(tftp_receive): Stall if too many packets are in wait queue.
      	(tftp_packets_pulled): New function.
      	(grub_tftp_protocol): Set packets_pulled.
      	* include/grub/net.h (grub_net_packets): New field count.
      	(grub_net_put_packet): Increment count.
      	(grub_net_remove_packet): Likewise.
      	(grub_net_app_protocol): New field `packets_pulled'.
      	(grub_net): New field `stall'.
      b27069e0
  8. 21 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Respect netmask from bootp/dhcp. · d6b7c7c9
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/net/bootp.c (parse_dhcp_vendor): Parse mask.
      	(grub_net_configure_by_dhcp_ack): Use mask and grub_net_add_ipv4_local.
      	* grub-core/net/net.c (grub_net_add_addr): Split creating local route
      	into ...
      	(grub_net_add_ipv4_local): ... this.
      	(grub_cmd_addaddr): Use grub_net_add_ipv4_local.
      	* include/grub/net.h (GRUB_NET_BOOTP_NETMASK): New enum value.
      	(grub_net_add_ipv4_local): New proto.
      d6b7c7c9
  9. 19 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * include/grub/net.h (grub_net_card): New member txbufsize. · 0494408e
      Vladimir 'phcoder' Serbinenko authored
      	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum values
      	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
      	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN.
      	* grub-core/net/drivers/efi/efinet.c (grub_efinet_findcards): Use
      	txbufsize.
      	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Use
      	compatible property to check for macs. Set
      	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
      	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN on macs.
      	* grub-core/net/drivers/ieee1275/ofnet.c (card_open): Don't add suffix
      	if GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX is set.
      	(send_card_buffer): Use txbuf.
      	(grub_ofnet_findcards): Allocate txbuf. Simplify code flow and move
      	nested function out of the parent while on it.
      0494408e
  10. 09 Jun, 2012 2 commits
    • Vladimir 'phcoder' Serbinenko's avatar
      Stop polling as soon as we have the packet we were waiting for. · 96f7e60e
      Vladimir 'phcoder' Serbinenko authored
      	* include/grub/net.h (grub_net_poll_cards): New argument stop_condition.
      	All users updated.
      	* grub-core/net/arp.c (have_pending): New var.
      	(pending_req): Likewise.
      	(grub_net_arp_send_request): Fill pending_req and use have_pending as
      	stop indicator.
      	(grub_net_arp_receive): Set have_pending.
      	* grub-core/net/dns.c (recv_data): New field stop.
      	(recv_hook): Set stop.
      	(grub_net_dns_lookup): Init stop and use as stop condition.
      	* grub-core/net/http.c (http_establish): Use headers_recv as stop
      	condition.
      	* grub-core/net/net.c (grub_net_poll_cards): New argument
      	stop_condition. Stop when it goes true.
      	* grub-core/net/tcp.c (grub_net_tcp_open): Use `established' as stop
      	indicator.
      	* grub-core/net/tftp.c (tftp_open): Use `have_oack' as stop indicator.
      96f7e60e
    • Vladimir 'phcoder' Serbinenko's avatar
      Keep TX and RX buffers on EFI rather than always allocate new ones. · 3e747239
      Vladimir 'phcoder' Serbinenko authored
      	* include/grub/net.h (grub_net_card_driver): Allow driver to modify
      	card. All users updated.
      	(grub_net_card): New members txbuf, rcvbuf, rcvbufsize and txbusy.
      	* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Reuse buffer.
      	(get_card_packet): Likewise.
      	(grub_efinet_findcards): Init new fields.
      3e747239
  11. 10 Feb, 2012 1 commit
  12. 24 Jan, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Replace single-linked with double-linked lists. It results in more · 87edb894
      Vladimir 'phcoder' Serbinenko authored
      	compact and more efficient code.
      
      	* grub-core/kern/list.c (grub_list_push): Moved from here ...
      	* include/grub/list.h (grub_list_push): ... to here. Set prev.
      	(grub_list_remove): Moved from here ...
      	* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
      	(grub_prio_list_insert): Set prev.
      	* include/grub/list.h (grub_list): Add prev. All users updated.
      87edb894
  13. 16 Dec, 2011 2 commits
  14. 13 Dec, 2011 1 commit
  15. 30 Nov, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Add missing const qualifiers. · bf3a3857
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/i386/pc/sendkey.c (keysym): Add missing const.
      	* grub-core/commands/lspci.c (grub_pci_classname): Likewise.
      	* grub-core/commands/menuentry.c (hotkey_aliases): Likewise.
      	* grub-core/disk/lvm.c (grub_lvm_getvalue): Likewise.
      	(grub_lvm_check_flag): Likewise.
      	* grub-core/efiemu/i386/coredetect.c
      	(grub_efiemu_get_default_core_name): Likewise
      	* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
      	* grub-core/fs/hfsplus.c (grub_hfsplus_catkey_internal): Likewise.
      	* grub-core/fs/ntfs.c (fixup): Likewise.
      	* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Likewise.
      	* grub-core/fs/zfs/zfs.c (decomp_entry): Likewise.
      	(fzap_lookup): Likewise.
      	(zap_lookup): Likewise.
      	* grub-core/gnulib/regcomp.c (init_dfa): Likewise.
      	* grub-core/lib/legacy_parse.c (check_option): Likewise.
      	* grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Likewise.
      	* grub-core/loader/i386/bsd.c (grub_bsd_add_meta): Likewise.
      	(grub_freebsd_add_meta_module): Likewise.
      	(grub_cmd_freebsd_module): Likewise.
      	* grub-core/loader/i386/xnu.c (tbl_alias): Likewise.
      	* grub-core/loader/xnu.c (grub_xnu_register_memory): Likewise.
      	(grub_xnu_writetree_get_size): Likewise.
      	(grub_xnu_writetree_toheap_real): Likewise.
      	(grub_xnu_find_key): Likewise.
      	(grub_xnu_create_key): Likewise.
      	(grub_xnu_create_value): Likewise.
      	(grub_xnu_register_memory): Likewise.
      	(grub_xnu_check_os_bundle_required): Likewise.
      	(grub_xnu_scan_dir_for_kexts): Likewise.
      	(grub_xnu_load_kext_from_dir): Likewise.
      	* grub-core/normal/color.c (color_list): Likewise.
      	* grub-core/normal/completion.c (current_word): Likewise.
      	* grub-core/normal/menu_entry.c (insert_string): Likewise.
      	* grub-core/term/serial.c (grub_serial_find): Likewise.
      	* grub-core/term/tparm.c (grub_terminfo_tparm): Likewise.
      	* include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
      	Likewise.
      	* include/grub/i386/bsd.h (grub_bsd_add_meta): Likewise.
      	(grub_freebsd_add_meta_module): Likewise.
      	* include/grub/lib/arg.h (grub_arg_option): Likewise.
      	* include/grub/net.h (grub_net_card_driver): Likewise.
      	(grub_net_card): Likewise.
      	(grub_net_app_protocol): Likewise.
      	* include/grub/parttool.h (grub_parttool_argdesc): Likewise.
      	* include/grub/serial.h (grub_serial_find): Likewise.
      	* include/grub/tparm.h (grub_terminfo_tparm): Likewise.
      	* include/grub/xnu.h (grub_xnu_create_key): Likewise.
      	(grub_xnu_create_value): Likewise.
      	(grub_xnu_find_key): Likewise.
      	(grub_xnu_scan_dir_for_kexts): Likewise.
      	(grub_xnu_load_kext_from_dir): Likewise.
      
      	* include/grub/zfs/zio_checksum.h (zio_checksum_t): Moved from here ...
      	* grub-core/fs/zfs/zfs.c (zio_checksum_t): ...here.
      	* include/grub/zfs/zio_checksum.h (zio_checksum_info):
      	Moved from here ...
      	* grub-core/fs/zfs/zfs.c (zio_checksum_info): ... here. Added missing const.
      bf3a3857
  16. 14 Oct, 2011 1 commit
  17. 13 Oct, 2011 2 commits
  18. 12 Oct, 2011 1 commit
  19. 06 Oct, 2011 1 commit
  20. 05 Oct, 2011 1 commit
  21. 23 Jul, 2011 1 commit
  22. 10 Jul, 2011 1 commit
  23. 09 Jul, 2011 2 commits
  24. 08 Jul, 2011 2 commits
  25. 06 Jul, 2011 3 commits
  26. 05 Jul, 2011 2 commits
  27. 03 Jul, 2011 1 commit
  28. 02 Jul, 2011 3 commits
  29. 27 Jun, 2011 1 commit
  30. 26 Jun, 2011 1 commit