"James" <[EMAIL PROTECTED]> writes:
> There was recently some talk on this list about about patching ipme.c
> to add 0.0.0.0 to qmail's list of known local addresses.. and the
> original poster supplied a patch. However, the patch was only _part_
> of a bigger patch.. leaving those of us that aren't familiar with
> qmail's code in the dark.
>
> So.. my question is, could someone please post a complete patch to
> work around this issue? Or at least a URL to their patch? Thanks.
Here's a patch that implements my recommendation. Note that for
reasons discussed in my earlier messages, this isn't the patch that we
actually use in production machines, so I can't guarantee it won't
break anything, but it looks like an obvious fix. Still, I would test
it on a development machine first.
You can verify that this patch has worked by running "ipmeprint" after
applying it. 0.0.0.0 should be printed out first, followed by all of
your IP addresses, each on their own line.
If anybody can report success or failure with this patch, I'd
appreciate it.
I'll put it up on my Web page and post the URL when I can.
------ScottG.
--- qmail-1.03/ipme.c Mon Jun 15 06:53:16 1998
+++ qmail-1.03-sg/ipme.c Mon Jan 29 02:27:38 2001
@@ -46,6 +46,11 @@
ipme.len = 0;
ix.pref = 0;
+ /* 0.0.0.0 is a special address which always refers to
+ * "this host, this network", according to RFC 1122, Sec. 3.2.1.3a.
+ */
+ byte_copy(&ix.ip,4,"\0\0\0\0");
+ if (!ipalloc_append(&ipme,&ix)) { return 0; }
if ((s = socket(AF_INET,SOCK_STREAM,0)) == -1) return -1;
len = 256;