Subject: smtpserver PARAM BindAddress iface:...

From: Eugene Crosser <[email-masked]>
Date: 11 Jul 2002 12:10:55 +0400

--- smtpserver/cfgread.c        2001/10/09 19:22:43     1.39
+++ smtpserver/cfgread.c        2002/07/11 07:57:11
@@ -238,17 +238,15 @@
 #if defined(AF_INET6) && defined(INET6)
            bindaddr.v6.sin6_family = AF_INET6;
            if (zgetifaddress(AF_INET6, param1+6,
-                             (struct sockaddr *)&bindaddr.v6.sin6_addr))
+                             (struct sockaddr *)&bindaddr.v6))
              /* Didn't get IPv6 interface address of given name.. */
 #endif
              {
                if (zgetifaddress(AF_INET, param1+6,
-                                 (struct sockaddr *)&bindaddr.v4.sin_addr)) {
+                                 (struct sockaddr *)&bindaddr.v4)) {
                  /* No recognized interface! */
                  bindaddr_set = 0;
-               } else
-                 /* Got IPv4 type interface address */
-                 bindaddr.v4.sin_family = AF_INET;
+               }
              }
          } else {
            /* XXX: TODO: Try to see if this is an interface name, and pick

otherwise sockaddr is written at wrong offset.
And BTW in the boilerplate smtpserver.conf example is wrong, it reads

	PARAM BindAddress eth0:2

but it should be

	PARAM BindAddress iface:eth0:2

Matti, will you apply the fix please?

-- 
Eugene Crosser, head of Internet Applications section, +7 501 787 1000
ROL, Teleross, Golden Telecom, http://user.rol.ru/~crosser/

-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Matti Aarnio <[email-masked]>
Date: Thu, 11 Jul 2002 14:53:25 +0300

On Thu, Jul 11, 2002 at 12:10:55PM +0400, Eugene Crosser wrote:
.... 
> otherwise sockaddr is written at wrong offset.

  Eh, uh, right..
  I did rework how the system handles these address unions,
  thus your patch became a small part in the lattest commit.

> Matti, will you apply the fix please?

  Done both.

  now what else you wrote..

-- 
/Matti Aarnio	<[email-masked]>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: "Daryle A. Tilroe" <[email-masked]>
Date: Thu, 11 Jul 2002 09:11:58 -0600

So should a person apply the 'smtpserver/cfgread.c' fix if they are not using
'PARAM BindAddress' (running a CVS checkout of around April 12)?  I.E. is that
code used even if the 'PARAM BindAddress' is not specified and are there
security implications to the incorrect offset?

-- 
Daryle A. Tilroe, P.Eng, B.Sc.EE, B.Sc.Phys.
Facility/ICT Mgr. |----------------------------------|
Micralyne Inc.    |    Web: http://www.micralyne.com |
1911 - 94 St.     |   Work: (780) 431-4400           |
Edmonton, AB      | Direct: (780) 431-4424           |
Canada            |    Fax: (780) 431-4422           |
T6N 1E6           |----------------------------------|
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Eugene Crosser <[email-masked]>
Date: 11 Jul 2002 19:12:19 +0400

> security implications to the incorrect offset?

The patch is only needed if you use PARAM BindAddress in the third form
("iface:eth0:x").  If you don't, you can safely ignore it.

Eugene

-