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. 16 Jan, 2016 1 commit
  3. 10 Jan, 2016 1 commit
    • Andrei Borzenkov's avatar
      net: remove dead and redundant code · 52825693
      Andrei Borzenkov authored
      server cannot be NULL at this point (we return error earlier if it is).
      Also structure is zalloc'ed, so no need to explicitly initialize
      members to 0.
      
      Found by: Coverity scan.
      CID: 73837
      52825693
  4. 13 Aug, 2015 1 commit
  5. 28 Nov, 2014 1 commit
    • Michael Chang's avatar
      send router solicitation for ipv6 address autoconf v2 · 7c4b6b7b
      Michael Chang authored
      Many routers have long router advertisment interval configured by
      default. The Neighbor Discovery protocol (RFC4861) has defined default
      MaxRtrAdvInterval value as 600 seconds and
      MinRtrAdvInterval as 0.33*MaxRtrAdvInterval. This makes
      net_ipv6_autoconf fails more often than not as currently it passively
      listens the RA message to perfom address autoconfiguration.
      
      This patch tries to send router solicitation to overcome the problem of
      long RA interval.
      
      v2:
      use cpu_to_be macro for network byte order conversion
      add missing error handling
      7c4b6b7b
  6. 22 Sep, 2014 1 commit
  7. 05 Feb, 2014 1 commit
  8. 21 Jan, 2014 2 commits
    • 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
    • Paulo Flabiano Smorigo's avatar
      change stop condition to avoid infinite loops · d99d2f84
      Paulo Flabiano Smorigo authored
      In net/net.c there is a while (1) that only exits if there is a stop
      condition and more then 10 packages or if there is no package received.
      
      If GRUB is idle and enter in this loop, the only condition to leave is
      if it doesn't have incoming packages. In a network with heavy traffic
      this never happens.
      d99d2f84
  9. 08 Nov, 2013 1 commit
  10. 01 Nov, 2013 1 commit
  11. 23 Oct, 2013 1 commit
    • Paulo Flabiano Smorigo's avatar
      Add progress module to display load progress of files. · 84a0e969
      Paulo Flabiano Smorigo authored
      	* grub-core/lib/progress.c: New file.
      	* grub-core/Makefile.core.def (progress): New module.
      	* grub-core/kern/file.c (grub_file_open): File name added.
      	* (grub_file_read): Progress hook added.
      	* grub-core/fs/cbfs.c (grub_cbfs_read): Likewise.
      	* grub-core/fs/cpio_common.c (grub_cpio_read): Likewise.
      	* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
      	* include/grub/file.h (struct grub_file): Add progress module
      	* members.
      	* include/grub/term.h (struct grub_term_output): Likewise.
      	* grub-core/osdep/unix/emuconsole.c (grub_console_term_output):
      	Terminal velocity added.
      	* grub-core/osdep/windows/emuconsole.c (grub_console_term_output):
      	* Likewise.
      	* grub-core/term/arc/console.c (grub_console_term_output): Likewise.
      	* grub-core/term/efi/console.c (grub_console_term_output): Likewise.
      	* grub-core/term/gfxterm.c (grub_video_term): Likewise.
      	* grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output):
      	* Likewise.
      	* grub-core/term/i386/pc/console.c (grub_console_term_output):
      	* Likewise.
      	* grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise.
      	* grub-core/term/ieee1275/console.c (grub_console_term_output):
      	* Likewise.
      	* grub-core/term/morse.c (grub_audio_term_output): Likewise.
      	* grub-core/term/serial.c (grub_serial_term_output): Likewise.
      	* grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise.
      	* grub-core/term/uboot/console.c (uboot_console_term_output):
      	* Likewise.
      84a0e969
  12. 20 Oct, 2013 1 commit
  13. 15 Jul, 2013 1 commit
  14. 10 May, 2013 1 commit
  15. 07 May, 2013 1 commit
  16. 21 Jan, 2013 1 commit
  17. 23 Jun, 2012 1 commit
  18. 22 Jun, 2012 3 commits
  19. 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
  20. 09 Jun, 2012 1 commit
    • 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
  21. 08 May, 2012 1 commit
  22. 04 May, 2012 1 commit
  23. 08 Mar, 2012 1 commit
  24. 06 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/acpi.c: Add TRANSLATORS comments. · bb51c6c6
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/gptsync.c: Likewise.
      	* grub-core/commands/hashsum.c: Likewise.
      	* grub-core/commands/i386/pc/sendkey.c: Likewise.
      	* grub-core/commands/legacycfg.c: Likewise.
      	* grub-core/io/gzio.c: Likewise.
      	* grub-core/net/net.c: Likewise.
      	* grub-core/term/gfxterm.c: Likewise.
      	* grub-core/term/terminfo.c: Likewise.
      	* grub-core/tests/test_blockarg.c: Likewise.
      	* grub-core/video/video.c: Likewise.
      	* util/grub-install.in: Likewise.
      	* util/grub-mkfont.c: Likewise.
      bb51c6c6
  25. 03 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/gptsync.c: Fix typographic quoting. · 805a8dcc
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/ieee1275/suspend.c: Likewise.
      	* grub-core/commands/parttool.c: Likewise.
      	* grub-core/commands/search_wrap.c: Likewise.
      	* grub-core/commands/videoinfo.c: Likewise.
      	* grub-core/gfxmenu/gui_label.c: Likewise.
      	* grub-core/hello/hello.c: Likewise.
      	* grub-core/kern/emu/main.c: Likewise.
      	* grub-core/net/net.c: Likewise.
      	* grub-core/normal/menu.c: Likewise.
      	* grub-core/normal/menu_text.c: Likewise.
      	* grub-core/normal/misc.c: Likewise.
      	* util/grub-editenv.c: Likewise.
      	* util/grub-install.in: Likewise.
      	* util/grub-kbdcomp.in: Likewise.
      	* util/grub-mkconfig.in: Likewise.
      	* util/grub-mknetdir.in: Likewise.
      	* util/grub-mkrescue.in: Likewise.
      	* util/grub-mkstandalone.in: Likewise.
      	* util/grub-reboot.in: Likewise.
      	* util/grub-set-default.in: Likewise.
      	* util/grub-setup.c: Likewise.
      	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
      805a8dcc
  26. 02 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS · 8822a8a0
      Vladimir 'phcoder' Serbinenko authored
      	comments.
      	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
      	VGA mode.
      	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
      	comments.
      	* util/grub-install.in (usage): Likewise.
      	Spell ID in whole letters.
      	Add missing ending dot.
      	Quote variables.
      	* util/grub-reboot.in: Fix capitalisation.
      	* util/grub-set-default.in: Likewise.
      8822a8a0
  27. 24 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * conf/Makefile.common (CFLAGS_GNULIB): Add · 4e27343f
      Vladimir 'phcoder' Serbinenko authored
      	-Wno-unsafe-loop-optimizations.
      	* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
      	on tools.
      	* grub-core/commands/legacycfg.c: Add pragma to skip
      	-Wunsafe-loop-optimizations.
      	(check_password_md5_real): Fix loop counter type.
      	* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
      	reading.
      	* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
      	* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
      	loop condition.
      	* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
      	* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
      	* grub-core/net/net.c (grub_net_route_address): Add safety loop
      	condition.
      	* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
      	* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
      	avoid possible infinite loops.
      	* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
      	and -Wunsafe-loop-optimizations.
      	* grub-core/script/yylex.l: Likewise.
      	* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
      	(print_glyphs): Avoid infinite loops.
      	* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
      4e27343f
  28. 21 Feb, 2012 1 commit
  29. 12 Feb, 2012 1 commit
  30. 09 Feb, 2012 1 commit
  31. 08 Feb, 2012 1 commit
  32. 03 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/ls.c: Gettextize. · 4a9f8346
      Vladimir 'phcoder' Serbinenko authored
              * grub-core/commands/setpci.c: Likewise.
              * grub-core/commands/videotest.c: Likewise.
              * grub-core/disk/geli.c: Likewise.
              * grub-core/kern/mm.c: Likewise.
              * grub-core/lib/relocator.c: Likewise.
              * grub-core/loader/efi/appleloader.c: Likewise.
              * grub-core/loader/i386/xnu.c: Likewise.
              * grub-core/loader/ia64/efi/linux.c: Likewise.
              * grub-core/loader/xnu.c: Likewise.
              * grub-core/net/dns.c: Likewise.
              * grub-core/net/net.c: Likewise.
              * grub-core/script/lexer.c: Likewise.
              * grub-core/script/parser.y: Likewise.
              * grub-core/script/yylex.l: Likewise.
              * util/getroot.c: Likewise.
              * util/grub-setup.c: Likewise.
      4a9f8346
  33. 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
  34. 23 Dec, 2011 1 commit
  35. 16 Dec, 2011 1 commit
  36. 13 Dec, 2011 1 commit
  37. 12 Nov, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/acpihalt.c: Gettextized. · 6e0632e2
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/cacheinfo.c: Likewise.
      	* grub-core/commands/cmp.c: Likewise.
      	* grub-core/commands/efi/loadbios.c: Likewise.
      	* grub-core/commands/gptsync.c: Likewise.
      	* grub-core/commands/ieee1275/suspend.c: Likewise.
      	* grub-core/commands/legacycfg.c: Likewise.
      	* grub-core/commands/memrw.c: Likewise.
      	* grub-core/commands/minicmd.c: Likewise.
      	* grub-core/commands/parttool.c: Likewise.
      	* grub-core/commands/time.c: Likewise.
      	* grub-core/commands/videoinfo.c: Likewise.
      	* grub-core/disk/geli.c: Likewise.
      	* grub-core/disk/i386/pc/biosdisk.c: Likewise.
      	* grub-core/disk/luks.c: Likewise.
      	* grub-core/disk/lvm.c: Likewise.
      	* grub-core/font/font_cmd.c: Likewise.
      	* grub-core/fs/zfs/zfscrypt.c: Likewise.
      	* grub-core/fs/zfs/zfsinfo.c: Likewise.
      	* grub-core/gfxmenu/view.c: Likewise.
      	* grub-core/kern/emu/hostdisk.c: Likewise.
      	* grub-core/kern/emu/main.c: Likewise.
      	* grub-core/kern/emu/misc.c: Likewise.
      	* grub-core/kern/emu/mm.c: Likewise.
      	* grub-core/kern/mips/arc/init.c: Likewise.
      	* grub-core/kern/mips/loongson/init.c: Likewise.
      	* grub-core/kern/partition.c: Likewise.
      	* grub-core/lib/i386/halt.c: Likewise.
      	* grub-core/lib/mips/arc/reboot.c: Likewise.
      	* grub-core/lib/mips/loongson/reboot.c: Likewise.
      	* grub-core/loader/i386/pc/chainloader.c: Likewise.
      	* grub-core/loader/i386/xnu.c: Likewise.
      	* grub-core/loader/multiboot.c: Likewise.
      	* grub-core/net/bootp.c: Likewise.
      	* grub-core/net/net.c: Likewise.
      	* grub-core/normal/term.c: Likewise.
      	* grub-core/partmap/bsdlabel.c: Likewise.
      	* grub-core/parttool/msdospart.c: Likewise.
      	* grub-core/term/gfxterm.c: Likewise.
      	* grub-core/term/terminfo.c: Likewise.
      	* grub-core/video/i386/pc/vbe.c: Likewise.
      	* util/grub-menulst2cfg.c: Likewise.
      	* util/grub-mkdevicemap.c: Likewise.
      	* util/grub-mklayout.c: Likewise.
      	* util/grub-mkrelpath.c: Likewise.
      	* util/grub-script-check.c: Likewise.
      	* util/ieee1275/grub-ofpathname.c: Likewise.
      	* util/resolve.c: Likewise.
      6e0632e2