From: higepon <higepon@users.sourceforge.jp>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] enable network without dhcp
Date: Mon, 25 Jun 2007 00:04:43 +0900 [thread overview]
Message-ID: <f07386410706240804t5622386dr2a6d81c7e27faad6@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
Hi folks,
I added a default mac address for a Guest OS which can't send a DHCP request.
Without this patch, client_ethaddr at slirp.c variable is
00:00:00:00:00:00, so an ether header dest address is also zero.
Tested withc gcc 3.3.6 (Ubuntu 1:3.3.6-13ubuntu2).
2007-06-24 higepon <higepon@users.sourceforge.jp>
* slirp.c (slirp_init): Added a default mac address for a
Guest OS which can't send a DHCP request.
--- qemu-0.9.0/slirp/slirp.c.orig 2007-06-24 23:36:01.000000000 +0900
+++ qemu-0.9.0/slirp/slirp.c 2007-06-24 23:36:41.000000000 +0900
@@ -149,6 +149,12 @@
/* set default addresses */
inet_aton("127.0.0.1", &loopback_addr);
+ client_ethaddr[0] = 0x52;
+ client_ethaddr[1] = 0x54;
+ client_ethaddr[2] = 0x00;
+ client_ethaddr[3] = 0x12;
+ client_ethaddr[4] = 0x34;
+ client_ethaddr[5] = 0x56;
if (get_dns_addr(&dns_addr) < 0) {
dns_addr = loopback_addr;
--
higepon : http://www.monaos.org
[-- Attachment #2: qemu-0.9.0-slirp-macaddr-20070624.diff --]
[-- Type: text/x-patch, Size: 505 bytes --]
--- qemu-0.9.0/slirp/slirp.c.orig 2007-06-24 23:36:01.000000000 +0900
+++ qemu-0.9.0/slirp/slirp.c 2007-06-24 23:36:41.000000000 +0900
@@ -149,6 +149,12 @@
/* set default addresses */
inet_aton("127.0.0.1", &loopback_addr);
+ client_ethaddr[0] = 0x52;
+ client_ethaddr[1] = 0x54;
+ client_ethaddr[2] = 0x00;
+ client_ethaddr[3] = 0x12;
+ client_ethaddr[4] = 0x34;
+ client_ethaddr[5] = 0x56;
if (get_dns_addr(&dns_addr) < 0) {
dns_addr = loopback_addr;
reply other threads:[~2007-06-24 15:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f07386410706240804t5622386dr2a6d81c7e27faad6@mail.gmail.com \
--to=higepon@users.sourceforge.jp \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).