blob: 435b78109ced8efaa8e79933a0ab52dcf6b04770 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
0001-s3-vfs_prealloc-fix-build-on-SLES8.patch
samba3-3.4-honor-all-loopback-ips.patch
From a1cd413de5493b06d7505a441bc5965f27ae38d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de>
Date: Tue, 9 Aug 2011 17:02:29 +0200
Subject: [PATCH] s3:vfs_prealloc: fix build on SLES8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
---
source3/modules/vfs_prealloc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 4d1b2e1..fb2e46e 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#include "smbd/smbd.h"
/* Extent preallocation module.
--
1.7.6
commit b6afe7ef236a454d8a6abf104b8846f817378f73
Author: Björn Jacke <bj@sernet.de>
Date: Thu Oct 15 02:02:30 2009 +0200
util: cope the all loopback addresses IPv4 knows
The fact that we just recogniced 127.0.0.1 as loopback IP address and not the
rest of the 127.0.0.0/8 IP address range we used the lo interface for sending
packages even though we should send them to some more physical interface. This
way we ended up with failing WINS registration and so on like in #6348.
On the lo interface sendto() returned "Invalid Argument" (EINVAL).
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 0ce495e..0511a28 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -351,13 +351,11 @@ bool is_broadcast_addr(const struct sockaddr *pss)
}
/**
- * Check if an IPv7 is 127.0.0.1
+ * Check if an IPv4 is in IN_LOOPBACKNET (127.0.0.0/8)
*/
bool is_loopback_ip_v4(struct in_addr ip)
{
- struct in_addr a;
- a.s_addr = htonl(INADDR_LOOPBACK);
- return(ip.s_addr == a.s_addr);
+ return ((ntohl(ip.s_addr) & IN_CLASSA_NET) == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT));
}
/**
|