File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -236,14 +236,16 @@ function down(interface, callback) {
236236 * };
237237 *
238238 * ifconfig.up(options, function(err) {
239- * // the interface is up
239+ * // the interface is up
240240 * });
241241 *
242+ * ipv4_address, ipv4_broadcast and ipv4_subnet_mask are optional
242243 */
243244function up ( options , callback ) {
244245 return this . exec ( 'ifconfig ' + options . interface +
245- ' ' + options . ipv4_address +
246- ' netmask ' + options . ipv4_subnet_mask +
247- ' broadcast ' + options . ipv4_broadcast +
246+ ' ' +
247+ ( options . ipv4_address ? options . ipv4_address : '0.0.0.0' ) +
248+ ( options . ipv4_subnet_mask ? ' netmask ' + options . ipv4_subnet_mask : '' ) +
249+ ( options . ipv4_broadcast ? ' broadcast ' + options . ipv4_broadcast : '' ) +
248250 ' up' , callback ) ;
249251}
You can’t perform that action at this time.
0 commit comments