Diff for /qemu/slirp/bootp.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2018/04/24 16:49:22 version 1.1.1.4, 2018/04/24 16:54:46
Line 36  typedef struct { Line 36  typedef struct {
     uint8_t macaddr[6];      uint8_t macaddr[6];
 } BOOTPClient;  } BOOTPClient;
   
 BOOTPClient bootp_clients[NB_ADDR];  static BOOTPClient bootp_clients[NB_ADDR];
   
 const char *bootp_filename;  const char *bootp_filename;
   
Line 172  static void bootp_reply(struct bootp_t * Line 172  static void bootp_reply(struct bootp_t *
     }      }
   
     if (bootp_filename)      if (bootp_filename)
         snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename);          snprintf((char *)rbp->bp_file, sizeof(rbp->bp_file), "%s",
                    bootp_filename);
   
     dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr));      dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr));
   
Line 190  static void bootp_reply(struct bootp_t * Line 191  static void bootp_reply(struct bootp_t *
     rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */      rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */
     rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */      rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */
   
       daddr.sin_addr.s_addr = 0xffffffffu;
   
     q = rbp->bp_vend;      q = rbp->bp_vend;
     memcpy(q, rfc1533_cookie, 4);      memcpy(q, rfc1533_cookie, 4);
     q += 4;      q += 4;
Line 218  static void bootp_reply(struct bootp_t * Line 221  static void bootp_reply(struct bootp_t *
         *q++ = 0xff;          *q++ = 0xff;
         *q++ = 0x00;          *q++ = 0x00;
   
         *q++ = RFC1533_GATEWAY;          if (!slirp_restrict) {
         *q++ = 4;              *q++ = RFC1533_GATEWAY;
         memcpy(q, &saddr.sin_addr, 4);              *q++ = 4;
         q += 4;              memcpy(q, &saddr.sin_addr, 4);
               q += 4;
         *q++ = RFC1533_DNS;  
         *q++ = 4;              *q++ = RFC1533_DNS;
         dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS);              *q++ = 4;
         memcpy(q, &dns_addr, 4);              dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS);
         q += 4;              memcpy(q, &dns_addr, 4);
               q += 4;
           }
   
         *q++ = RFC2132_LEASE_TIME;          *q++ = RFC2132_LEASE_TIME;
         *q++ = 4;          *q++ = 4;

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


unix.superglobalmegacorp.com