The Samba-Bugzilla – Attachment 12652 Details for
Bug 12422
loopback addresses get registered in DNS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-util-recognize-all-of-127.0.0.0-8-as-loopback-addres.patch (text/plain), 1.01 KB, created by
Björn Jacke
on 2016-11-11 11:00:56 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2016-11-11 11:00:56 UTC
Size:
1.01 KB
patch
obsolete
>From af111512de036fd4601205247159f57557a0746f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Fri, 11 Nov 2016 11:47:25 +0100 >Subject: [PATCH] util: recognize all of 127.0.0.0/8 as loopback addresses > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12422 >--- > lib/util/util_net.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/lib/util/util_net.c b/lib/util/util_net.c >index cb238ad..2170adf 100644 >--- a/lib/util/util_net.c >+++ b/lib/util/util_net.c >@@ -595,13 +595,16 @@ bool is_broadcast_addr(const struct sockaddr *pss) > } > > /** >- * Check if an IPv7 is 127.0.0.1 >+ * Check if an IPv4 address is loopback (127.0.0.1/8, see RFC 1122) > */ > 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); >+ struct in_addr lo_addr; >+ struct in_addr mask_addr; >+ >+ lo_addr.s_addr = 0x01000000; >+ mask_addr.s_addr = 0xff000000; >+ return same_net_v4(*pin, lo_addr, mask_addr); > } > > /** >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12422
:
12652
|
12653