16 Aug, 2017

1 commit


19 Apr, 2015

5 commits


17 Sep, 2014

1 commit

  • When a DNS query is sent out, the ethernet packet can get directed to
    the MAC address of a server that was communicated to before. This is
    wrong when the previously stored MAC address corresponds to a different
    server's IP address, i.e. when the IP address of the previous and the
    current communication are different.

    The error can get reproduced by running a sequence of e.g. a TFTP
    download and a DNS query, where the TFTP and DNS servers reside on
    individual machines.

    The fix is to clear the server's MAC address that might be left from a
    previous operation, and to fetch the peer's MAC address in a new ARP
    lookup, before the DNS query is sent. This is the approach taken in
    other network services, like 8e52533d1095 ("net: tftpsrv: Get correct
    client MAC address").

    Reported-by: Dirk Zimoch
    Signed-off-by: Gerhard Sittig

    Gerhard Sittig
     

24 May, 2012

3 commits


24 Oct, 2011

1 commit

  • net/dns.c used endian conversion macros wrongly (shorts in reply
    were put swapped into CPU, and then ntohs() was used to swap it
    back, which broke on big-endian).

    Fix this by using the correct linux conversion macro for reading
    a unaligned short in network byte order: get_unaligned_be16()
    Thanks to Mike Frysinger pointing at the best macro to use.

    Tested on big and little endian qemu boards (mips and versatile)

    Signed-off-by: Bernhard Kaindl
    Cc: Pieter Voorthuijsen
    Cc: Robin Getz
    Acked-by: Mike Frysinger

    Bernhard Kaindl
     

13 May, 2011

1 commit


24 Jul, 2009

1 commit


23 Jul, 2009

1 commit

  • On 04 Oct 2008 Pieter posted a dns implementation for U-Boot.

    http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10216.html
    >
    > DNS can be enabled by setting CFG_CMD_DNS. After performing a query,
    > the serverip environment var is updated.
    >
    > Probably there are some cosmetic issues with the patch. Unfortunatly I
    > do not have the time to correct these. So if anybody else likes DNS
    > support in U-Boot and has the time, feel free to patch it in the main tree.

    Here it is again - slightly modified & smaller:
    - update to 2009-06 (Pieter's patch was for U-Boot 1.2.0)
    - README.dns is added
    - syntax is changed (now takes a third option, the env var to store
    the result in)
    - add a random port() function in net.c
    - sort Makefile in ./net/Makefile
    - dns just returns unless a env var is given
    - run through checkpatch, and clean up style issues
    - remove packet from stack
    - cleaned up some comments
    - failure returns much faster (if server responds, don't wait for
    timeout)
    - use built in functions (memcpy) rather than byte copy.

    Signed-off-by: Robin Getz
    Signed-off-by: Pieter Voorthuijsen
    Signed-off-by: Ben Warren

    Robin Getz