Skip to content

Commit dfd1582

Browse files
jpirkodavem330
authored andcommitted
ipv4: loopback device: ignore value changes after device is upped
When lo is brought up, new ifa is created. Then, devconf and neigh values bitfield should be set so later changes of default values would not affect lo values. Note that the same behaviour is in ipv6. Also note that this is likely not an issue in many distros (for example Fedora 19) because userspace sets address to lo manually before bringing it up. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 509aba3 commit dfd1582

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv4/devinet.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,8 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
13851385
memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
13861386
set_ifa_lifetime(ifa, INFINITY_LIFE_TIME,
13871387
INFINITY_LIFE_TIME);
1388+
ipv4_devconf_setall(in_dev);
1389+
neigh_parms_data_state_setall(in_dev->arp_parms);
13881390
inet_insert_ifa(ifa);
13891391
}
13901392
}

0 commit comments

Comments
 (0)