The branch, v3-2-test has been updated
       via  12c0b1d82802ccd1b272a8b47ddb7d258e10477c (commit)
      from  baf1f52e34ae2465a7a34be1065da29ed97e7bea (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 12c0b1d82802ccd1b272a8b47ddb7d258e10477c
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Thu Oct 11 18:03:12 2007 -0700

    Try and fix segfault found by Guenther on Fedora. Fedora
    seems to return bogus values for the interface entries on
    vmnet and tun interfaces.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/interfaces.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c
index c56155c..e98ea46 100644
--- a/source/lib/interfaces.c
+++ b/source/lib/interfaces.c
@@ -135,11 +135,14 @@ static int _get_interfaces(struct iface_struct *ifaces, 
int max_interfaces)
 
                memcpy(&ifaces[total].ip, ifptr->ifa_addr, copy_size);
                memcpy(&ifaces[total].netmask, ifptr->ifa_netmask, copy_size);
-               if (ifaces[total].flags & IFF_BROADCAST) {
+
+               if ((ifaces[total].flags & IFF_BROADCAST) &&
+                               ifptr->ifa_broadaddr) {
                        memcpy(&ifaces[total].bcast,
                                ifptr->ifa_broadaddr,
                                copy_size);
-               } else if (ifaces[total].flags & IFF_POINTOPOINT) {
+               } else if ((ifaces[total].flags & IFF_POINTOPOINT) &&
+                              ifptr->ifa_dstaddr ) {
                        memcpy(&ifaces[total].bcast,
                                ifptr->ifa_dstaddr,
                                copy_size);


-- 
Samba Shared Repository

Reply via email to