The parser field lineno is initially zero and incremented upon each
call to config_read(). So lineno is effectively a "real" line number,
not an index. Fix the off-by-one bug here, which led to parsing for an
interface named "face".

Signed-off-by: Phil Sutter <[email protected]>
---
 networking/nameif.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/networking/nameif.c b/networking/nameif.c
index 6cf1c50..8e325e7 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -174,7 +174,7 @@ int nameif_main(int argc, char **argv)
 #if  ENABLE_FEATURE_NAMEIF_EXTENDED
                struct ethtool_drvinfo drvinfo;
 #endif
-               if (parser->lineno < 2)
+               if (parser->lineno < 3)
                        continue; /* Skip the first two lines */
 
                /* Find the current interface name and copy it to ifr.ifr_name 
*/
-- 
1.7.3.4


_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to