GNU bug report logs - #68787
[PATCH] services: block-facebook-hosts: Use proper unroutable addresses.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 68787 <at> debbugs.gnu.org and Ludovic Courtès <ludo@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jan 2024 22:07:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 28 17:07:38 2024
Received: from localhost ([127.0.0.1]:58509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUDJR-0002hn-QX
	for submit <at> debbugs.gnu.org; Sun, 28 Jan 2024 17:07:38 -0500
Received: from lists.gnu.org ([2001:470:142::17]:36476)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1rUDJP-0002ha-97
 for submit <at> debbugs.gnu.org; Sun, 28 Jan 2024 17:07:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1rUDJB-0004NW-7l
 for guix-patches@HIDDEN; Sun, 28 Jan 2024 17:07:21 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1rUDJ9-0004XU-UK; Sun, 28 Jan 2024 17:07:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=BJ014YZudsy1AoPYYWUTdjw6z8Hc6eabfvN9Ja9/P4o=; b=C4l/BZY0Yq6u2F
 TlghZqdg3mWAt1MbCwz81SRmVLL37kfIkFyr9BrF4EDSSJJ/QU5OWS7seSySSc4eqTxXZnRP7OljI
 bEwI5ue2GX/FaLvI/vp8xLlrm723PHan03MYzivIceSoLXsaWXXYVK/u1X4yd5EDZLvW4JxFxegVR
 X9Ku894rBYsUaRXLNLjwyEUIINM3zNgrqn/MeB2ZanaNSEFXUFOzwg+hYmEWryt5+iE40ixy2GR1o
 4GxQVvfoHIubb0OBb/83dB+wpL4UIG0DaUDZc0fTodesRt2xWOB31fHH9GvkTx8sRJNINBmDYy/vm
 mk4Axm0t2PGWowmMSvFQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] services: block-facebook-hosts: Use proper unroutable
 addresses.
Date: Sun, 28 Jan 2024 23:07:09 +0100
Message-ID: <3edc7a8a89dbc39d36c47e600a3384cf2d96adc4.1706479616.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is safer and more appropriate than redirecting to localhost.

* gnu/services/networking.scm (%unroutable-ipv4, %unroutable-ipv6): New
variables.
(facebook-host-aliases): Use them.

Change-Id: Idd4b1fec903c52d542d177a52fec1814eded4119
---
 gnu/services/networking.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 495d049728..8e64e529ab 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2023 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2013-2024 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2015 Mark H Weaver <mhw@HIDDEN>
 ;;; Copyright © 2016, 2018, 2020 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright © 2016 John Darrington <jmd@HIDDEN>
@@ -270,6 +270,14 @@ (define-module (gnu services networking)
 ;;;
 ;;; Code:
 
+(define %unroutable-ipv4
+  ;; Unroutable address, as per <https://www.rfc-editor.org/rfc/rfc5737>.
+  "203.0.113.1")
+
+(define %unroutable-ipv6
+  ;; Unroutable address, as per <https://www.rfc-editor.org/rfc/rfc6666>.
+  "0100::")
+
 (define facebook-host-aliases
   ;; This is the list of known Facebook hosts to be added to /etc/hosts if you
   ;; are to block it.
@@ -282,7 +290,8 @@ (define facebook-host-aliases
     (append-map (lambda (name)
                   (map (lambda (addr)
                          (host addr name))
-                       (list "127.0.0.1" "::1"))) domains)))
+                       (list %unroutable-ipv4 %unroutable-ipv6)))
+                domains)))
 
 (define-deprecated %facebook-host-aliases
   block-facebook-hosts-service-type

base-commit: 65dc2d40cb113382fb98796f1d04099f28cab355
-- 
2.41.0





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#68787; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 20 Feb 2024 09:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.