Bug 7507

Summary: defining eth0 resets IP address in /etc/hosts to localhost
Product: Mageia Reporter: Markus Mertens <Mertens.MPT>
Component: RPM PackagesAssignee: Olivier Blin <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: stormi-mageia, thierry.vignaud
Version: CauldronKeywords: NEEDINFO, Triaged
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: drakx-net CVE:
Status comment:

Description Markus Mertens 2012-09-17 21:22:54 CEST
Description of problem:

If /etc/hosts contains a line with a static IP number and a name for localhost the static IP number for the computer name will be set to 127.0.0.1. The original IP number will be lost. This is extremely bad in situations where a static IP / computer name relation is required (software licenses, etc.)


Version-Release number of selected component (if applicable):


How reproducible:

always


Steps to Reproduce:

1. edit /etc/hosts with mcc:

$ cat /etc/hosts
# generated by drakhosts
127.0.0.1 localhost
10.1.192.3 pnet3


2. create a network connection with mcc:

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.1.192.3
NETMASK=255.255.255.0
GATEWAY=10.1.192.254
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no
DNS1=10.1.0.200
RESOLV_MODS=no
LINK_DETECTION_DELAY=6
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
NM_CONTROLLED=no


3. look at /etc/hosts:

$ cat /etc/hosts
# generated by drakconnect
127.0.0.1 pnet3
127.0.0.1 localhost
Comment 1 Samuel Verschelde 2013-09-06 18:39:16 CEST
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

Keywords: (none) => Triaged
CC: (none) => stormi
Assignee: bugsquad => mageia
Source RPM: (none) => drakx-net

Manuel Hiebel 2013-10-11 23:36:00 CEST

Version: 2 => Cauldron

Comment 2 Thierry Vignaud 2014-01-19 17:20:53 CET
Actually this may have been fixed for mga4 by http://gitweb.mageia.org/software/drakx-net/commit/?id=619387ddae0b76970fc78b7928d3b97fbfc04193

Can you try Mga4 RC?

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 3 Markus Mertens 2014-01-20 09:12:43 CET
(In reply to Thierry Vignaud from comment #2)
> Actually this may have been fixed for mga4 by
> http://gitweb.mageia.org/software/drakx-net/commit/
> ?id=619387ddae0b76970fc78b7928d3b97fbfc04193
> 
> Can you try Mga4 RC?

The problem does not appear in Mga4 RC anymore.
Comment 4 Manuel Hiebel 2014-01-20 18:24:31 CET
closing then

Status: NEW => RESOLVED
Resolution: (none) => FIXED