[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646860: marked as done (netcfg: do not place network and broadcast lines in /etc/network/interfaces)



Your message dated Wed, 04 Jan 2017 15:04:03 +0000
with message-id <E1cOn6h-000Ecm-9l@fasolo.debian.org>
and subject line Bug#646860: fixed in netcfg 1.140
has caused the Debian Bug report #646860,
regarding netcfg: do not place network and broadcast lines in /etc/network/interfaces
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
646860: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646860
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: netcfg
Severity: wishlist

Hello, it's 2011 and not 1984. Broadcast and network addresses are standardized today.
'network' and 'broadcast' lines do not need to be written to /etc/network/interfaces
any more. They are at best redundant, and at worst confusing users. ifconfig
calculates broadcast and network addresses correctly so they can be removed
safely from the config. Attached is a patch against netcfg-1.59.

Regards,

Oskar Liljeblad

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39.4 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -u -p static.c.v0 static.c
--- static.c.v0	2011-10-27 21:55:11.000000000 +0200
+++ static.c	2011-10-27 21:59:00.000000000 +0200
@@ -12,7 +12,6 @@
 
 struct in_addr old_ipaddress = { 0 };
 struct in_addr network = { 0 };
-struct in_addr broadcast = { 0 };
 struct in_addr netmask = { 0 };
 struct in_addr pointopoint = { 0 };
 
@@ -107,7 +106,6 @@ int netcfg_get_netmask(struct debconfcli
         netmask.s_addr != old_netmask.s_addr
         ) {
         network.s_addr = ipaddress.s_addr & netmask.s_addr;
-        broadcast.s_addr = (network.s_addr | ~netmask.s_addr);
 
         /* Preseed gateway */
         gateway.s_addr = ipaddress.s_addr & netmask.s_addr;
@@ -189,8 +187,6 @@ static int netcfg_write_static(char *dom
         fprintf(fp, "iface %s inet static\n", interface);
         fprintf(fp, "\taddress %s\n", inet_ntop (AF_INET, &ipaddress, ptr1, sizeof (ptr1)));
         fprintf(fp, "\tnetmask %s\n", inet_ntop (AF_INET, &netmask, ptr1, sizeof (ptr1)));
-        fprintf(fp, "\tnetwork %s\n", inet_ntop (AF_INET, &network, ptr1, sizeof (ptr1)));
-        fprintf(fp, "\tbroadcast %s\n", inet_ntop (AF_INET, &broadcast, ptr1, sizeof (ptr1)));
         if (gateway.s_addr)
             fprintf(fp, "\tgateway %s\n", inet_ntop (AF_INET, &gateway, ptr1, sizeof (ptr1)));
         if (pointopoint.s_addr)
@@ -311,10 +307,6 @@ int netcfg_activate_static(struct debcon
     di_snprintfcat(buf, sizeof(buf), " netmask %s",
                    inet_ntop (AF_INET, &netmask, ptr1, sizeof (ptr1)));
 
-    /* avoid using a third buffer */
-    di_snprintfcat(buf, sizeof(buf), " broadcast %s",
-                   inet_ntop (AF_INET, &broadcast, ptr1, sizeof (ptr1)));
-    
     di_info("executing: %s", buf);
     rv |= di_exec_shell_log(buf);
     
@@ -350,11 +342,6 @@ int netcfg_activate_static(struct debcon
              inet_ntop (AF_INET, &ipaddress, ptr1, sizeof (ptr1)),
              masksize);
 
-    /* avoid using a second buffer */
-    di_snprintfcat(buf, sizeof(buf), "broadcast %s dev %s",
-                   inet_ntop (AF_INET, &broadcast, ptr1, sizeof (ptr1)),
-                   interface);
-
     if (pointopoint.s_addr)
         di_snprintfcat(buf, sizeof(buf), " peer %s",
                        inet_ntop (AF_INET, &pointopoint, ptr1, sizeof (ptr1)));
@@ -396,7 +383,7 @@ int netcfg_get_static(struct debconfclie
            GET_DOMAIN, QUIT }
     state = GET_IPADDRESS;
 
-    ipaddress.s_addr = network.s_addr = broadcast.s_addr = netmask.s_addr = gateway.s_addr = pointopoint.s_addr =
+    ipaddress.s_addr = network.s_addr = netmask.s_addr = gateway.s_addr = pointopoint.s_addr =
         0;
 
     debconf_metaget(client,  "netcfg/internal-none", "description");

--- End Message ---
--- Begin Message ---
Source: netcfg
Source-Version: 1.140

We believe that the bug you reported is fixed in the latest version of
netcfg, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 646860@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Kern <pkern@debian.org> (supplier of updated netcfg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 04 Jan 2017 15:30:08 +0100
Source: netcfg
Binary: netcfg netcfg-static
Architecture: source amd64
Version: 1.140
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Philipp Kern <pkern@debian.org>
Description:
 netcfg     - Configure the network (udeb)
 netcfg-static - Configure a static network (udeb)
Closes: 646860
Changes:
 netcfg (1.140) unstable; urgency=medium
 .
   [ Julien Cristau ]
   * Stop writing netmask/network/broadcast lines in /etc/network/interfaces,
     just set the prefix length as part of the address (closes: #646860).
Checksums-Sha1:
 639483f210bc2a8091c26da5f1b4a6facb89f8e5 1586 netcfg_1.140.dsc
 add8d03295074c7c489bc3bb60a586304dc4876a 391696 netcfg_1.140.tar.xz
 a9b353c4989fb832a8d31245765cf9fff390a03e 340440 netcfg-static_1.140_amd64.udeb
 1f65924fc1b0c1a154eb4bcde18ff2ccff8e32e7 4880 netcfg_1.140_amd64.buildinfo
 f5b8af14c5048359c1aa096f08cfa6f9d0707784 434958 netcfg_1.140_amd64.udeb
Checksums-Sha256:
 7b828ee5c60972150ba0617cbb1c525dc15adccaf77d77d3343aad3161426338 1586 netcfg_1.140.dsc
 c5cfa89b83b53eb8e612bc30c3df3907aaba7fea3ec434ddd75016b05ff828f3 391696 netcfg_1.140.tar.xz
 573154621081e6b8269ce4e853efcabfbf483d85d7484e73d4fb01077eadb543 340440 netcfg-static_1.140_amd64.udeb
 6d7dc0f9192ab8f7cec5123ea4b12361650b9af3d54e2d6949c331cab425bf01 4880 netcfg_1.140_amd64.buildinfo
 8b55ff852d0c27eaa55412f5bb52d16304e82df6b35254ebcbac1499f88adef3 434958 netcfg_1.140_amd64.udeb
Files:
 bc1b553c200168ea35ccfb2a8bbc0411 1586 debian-installer optional netcfg_1.140.dsc
 8e8b96b7c139c6aab54a24b736e346a4 391696 debian-installer optional netcfg_1.140.tar.xz
 20de1086ad711169affd65f119cf2a01 340440 debian-installer optional netcfg-static_1.140_amd64.udeb
 33d193be5514635673f188b177631846 4880 debian-installer optional netcfg_1.140_amd64.buildinfo
 7440744f1d31ce26f4a041dd14f37762 434958 debian-installer optional netcfg_1.140_amd64.udeb

-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEPzuChCNsw7gPxr3/RG4lRTXQVuwFAlhtCBgRHHBrZXJuQGRl
Ymlhbi5vcmcACgkQRG4lRTXQVuytHwf/X59gM4mpNO6CMJQpSmYfOK4ebfdBchfs
1Dl2kPdh9yCyy4kHSsaeVEn1TbYz9/m54GsP2R1uq6q1KSVnE/AoqeW2p/HGtK50
fmBEVRaGFrwZB3nGm8H21zEgX6Y7e1OaA0y25tlzIeFaCpHn0sSCETnXBeuVF4I0
bscXaSCCxaw1sdO+g/C5O+TbC7Ex7BzRTmEaPpcUV29KX4EkmGPqZdJ7NO8K5wXD
4LdcAg+s5Y6Ihz38Rx9ADwqUkzxKHJDYIrbb+ytQF7j2NlHt1endtto1B/52CUh5
IdVC6xOFtsjSlF9T31ZcHMppg6Tv+O5YsexStpkJ6Fp/+k0ms6TzXg==
=v5Kd
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: