Bug 315 - Error parsing 'interfaces' file with multi-whitespace after netmask parm
Summary: Error parsing 'interfaces' file with multi-whitespace after netmask parm
Status: RESOLVED WORKSFORME
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.12.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 10:53 UTC by Roni
Modified: 2009-07-11 22:21 UTC (History)
1 user (show)

See Also:
Host:
Target: Intel/x86; tested & used on LEAF firewall platform
Build: BusyBox v1.12.4 (2009-01-31 16:56:47 UTC) multi-call binary


Attachments
Fix (807 bytes, patch)
2009-05-26 10:48 UTC, Denys Vlasenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roni 2009-05-04 10:53:19 UTC
First, for a baseline, I have checked and the problem does not manifest in
  BusyBox v1.2.1 (2006.09.04-14:45+0000) multi-call binary

In the interfaces file, for the 'netmask' parameter (but not address or gateway parms!) if there are two or more whitespace chars (tab & space tested) between the netmask token and the parameter then I get the following error:
=-=-=-=-=-=-=-=-
  Reconfiguring network interfaces: Error: an inet prefix is expected rather than "172.16.1.254/4294967295".
=-=-=-=-=-=-=-=-

Sample problem config (all whitespace below are simple SPACE chars; single spaces except for preceding the netmask parm):
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.16.1.254
netmask  255.255.255.0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Workaround is obviously to reduce whitespace after the netmask parm, to be only a single character of whitespace.

Thx for BB!
Comment 1 Denys Vlasenko 2009-05-26 09:18:33 UTC
What applet are you talking about? My telepathic powers says you use ifup, but you usually expected to say so yourself.

1.12.x is old. Can you test 1.14.0? It doesn't happen for me on 1.14.0
Comment 2 Denys Vlasenko 2009-05-26 10:48:01 UTC
Created attachment 351 [details]
Fix

Please try attached patch.
Comment 3 Denys Vlasenko 2009-05-26 12:37:08 UTC
Disregard, this is a patch for different bug :(