Commit fd06527b authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging



slirp updates

# gpg: Signature made Sun 14 Jan 2018 17:19:24 GMT
# gpg:                using RSA key 0x996849C1CF560478
# gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>"
# gpg:                 aka "Samuel Thibault <sthibault@debian.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: 3A3A 5D46 4660 E867 610C  A427 9968 49C1 CF56 0478

* remotes/thibault/tags/samuel-thibault:
  slirp: add in6_dhcp_multicast()
  slirp: removed unused code
  slirp: remove unnecessary struct declaration
  slirp: remove unused header
  slirp: avoid IN6_IS_ADDR_UNSPECIFIED(), rather use in6_zero()

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents c7947342 318116a6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
                            0x00, 0x00, 0x00, 0x00,\
                            0x00, 0x01, 0x00, 0x02 } }

#define in6_dhcp_multicast(a)\
    in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST)

void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m);

#endif
+0 −13
Original line number Diff line number Diff line
@@ -233,17 +233,4 @@ struct ipasfrag {
#define ipf_next     ipf_link.next
#define ipf_prev     ipf_link.prev

/*
 * Structure stored in mbuf in inpcb.ip_options
 * and passed to ip_output when ip options are in use.
 * The actual length of the options (including ipopt_dst)
 * is in m_len.
 */
#define MAX_IPOPTLEN	40

struct ipoption {
	struct	in_addr ipopt_dst;	/* first-hop dst if source routed */
	int8_t	ipopt_list[MAX_IPOPTLEN];	/* options proper */
} QEMU_PACKED;

#endif
+3 −3
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ void icmp6_send_error(struct mbuf *m, uint8_t type, uint8_t code)
    DEBUG_ARGS((dfd, " type = %d, code = %d\n", type, code));

    if (IN6_IS_ADDR_MULTICAST(&ip->ip_src) ||
            IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) {
            in6_zero(&ip->ip_src)) {
        /* TODO icmp error? */
        return;
    }
@@ -272,7 +272,7 @@ static void ndp_send_na(Slirp *slirp, struct ip6 *ip, struct icmp6 *icmp)
    struct mbuf *t = m_get(slirp);
    struct ip6 *rip = mtod(t, struct ip6 *);
    rip->ip_src = icmp->icmp6_nns.target;
    if (IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) {
    if (in6_zero(&ip->ip_src)) {
        rip->ip_dst = (struct in6_addr)ALLNODES_MULTICAST;
    } else {
        rip->ip_dst = ip->ip_src;
@@ -350,7 +350,7 @@ static void ndp_input(struct mbuf *m, Slirp *slirp, struct ip6 *ip,
                && icmp->icmp6_code == 0
                && !IN6_IS_ADDR_MULTICAST(&icmp->icmp6_nns.target)
                && ntohs(ip->ip_pl) >= ICMP6_NDP_NS_MINLEN
                && (!IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)
                && (!in6_zero(&ip->ip_src)
                    || in6_solicitednode_multicast(&ip->ip_dst))) {
            if (in6_equal_host(&icmp->icmp6_nns.target)) {
                /* Gratuitous NDP */
+0 −1
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@

#include "qemu-common.h"

struct Slirp;
typedef struct Slirp Slirp;

int get_dns_addr(struct in_addr *pdns_addr);
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ void ndp_table_add(Slirp *slirp, struct in6_addr ip_addr,
                ethaddr[0], ethaddr[1], ethaddr[2],
                ethaddr[3], ethaddr[4], ethaddr[5]));

    if (IN6_IS_ADDR_MULTICAST(&ip_addr) || IN6_IS_ADDR_UNSPECIFIED(&ip_addr)) {
    if (IN6_IS_ADDR_MULTICAST(&ip_addr) || in6_zero(&ip_addr)) {
        /* Do not register multicast or unspecified addresses */
        DEBUG_CALL(" abort: do not register multicast or unspecified address");
        return;
@@ -60,7 +60,7 @@ bool ndp_table_search(Slirp *slirp, struct in6_addr ip_addr,
    DEBUG_ARG("ip = %s", addrstr);
#endif

    assert(!IN6_IS_ADDR_UNSPECIFIED(&ip_addr));
    assert(!in6_zero(&ip_addr));

    /* Multicast address: fec0::abcd:efgh/8 -> 33:33:ab:cd:ef:gh */
    if (IN6_IS_ADDR_MULTICAST(&ip_addr)) {
Loading