Codebase list netcfg / 98abaa1
Merge branch 'debian' into kali/master Sophie Brun 7 years ago
3 changed file(s) with 19 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
0 netcfg (1.141) unstable; urgency=medium
1
2 [ Samuel Thibault ]
3 * Revert work around for bug #769189, it is now fixed.
4
5 -- Christian Perrier <[email protected]> Mon, 16 Jan 2017 05:56:00 +0100
6
7 netcfg (1.140) unstable; urgency=medium
8
9 [ Julien Cristau ]
10 * Stop writing netmask/network/broadcast lines in /etc/network/interfaces,
11 just set the prefix length as part of the address (closes: #646860).
12
13 -- Philipp Kern <[email protected]> Wed, 04 Jan 2017 15:30:08 +0100
14
015 netcfg (1.139+kali1) kali-dev; urgency=medium
116
217 * Sync with Debian. Remaining changes:
66
77 if [ "$(pidof dhclient || true)" ]; then
88 dhclient -r || true
9 dhclient -1 -6 -r || true
9 dhclient -6 -r || true
1010 fi
111111 */
112112 static int nc_wi_static_ipv4(const struct netcfg_interface *interface, FILE *fd)
113113 {
114 char network[INET_ADDRSTRLEN];
115 char broadcast[INET_ADDRSTRLEN];
116 char netmask[INET_ADDRSTRLEN];
117
118 netcfg_network_address(interface, network);
119 netcfg_broadcast_address(interface, broadcast);
120 inet_mtop(AF_INET, interface->masklen, netmask, INET_ADDRSTRLEN);
121
122114 fprintf(fd, "\n# The primary network interface\n");
123115 if (!iface_is_hotpluggable(interface->name) && !find_in_stab(interface->name))
124116 fprintf(fd, "auto %s\n", interface->name);
125117 else
126118 fprintf(fd, "allow-hotplug %s\n", interface->name);
127119 fprintf(fd, "iface %s inet static\n", interface->name);
128 fprintf(fd, "\taddress %s\n", interface->ipaddress);
129 fprintf(fd, "\tnetmask %s\n", empty_str(interface->pointopoint) ? netmask : "255.255.255.255");
130 fprintf(fd, "\tnetwork %s\n", network);
131 fprintf(fd, "\tbroadcast %s\n", broadcast);
120 fprintf(fd, "\taddress %s/%i\n", interface->ipaddress,
121 empty_str(interface->pointopoint) ? interface->masklen : 32);
132122 if (!empty_str(interface->gateway))
133123 fprintf(fd, "\tgateway %s\n",
134124 empty_str(interface->pointopoint) ? interface->gateway : interface->pointopoint);
148138 else
149139 fprintf(fd, "allow-hotplug %s\n", interface->name);
150140 fprintf(fd, "iface %s inet6 static\n", interface->name);
151 fprintf(fd, "\taddress %s\n", interface->ipaddress);
152 fprintf(fd, "\tnetmask %i\n", interface->masklen);
141 fprintf(fd, "\taddress %s/%i\n", interface->ipaddress, interface->masklen);
153142 if (!empty_str(interface->gateway))
154143 fprintf(fd, "\tgateway %s\n", interface->gateway);
155144