netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] ipv4: loopback device: ignore value changes after device is upped
@ 2014-01-07 14:55 Jiri Pirko
  2014-01-07 20:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2014-01-07 14:55 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuznet, jmorris, yoshfuji, kaber, hannes

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>
---
 net/ipv4/devinet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 0feebd5..9809f7b 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1385,6 +1385,8 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
 				memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
 				set_ifa_lifetime(ifa, INFINITY_LIFE_TIME,
 						 INFINITY_LIFE_TIME);
+				ipv4_devconf_setall(in_dev);
+				neigh_parms_data_state_setall(in_dev->arp_parms);
 				inet_insert_ifa(ifa);
 			}
 		}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch net-next] ipv4: loopback device: ignore value changes after device is upped
  2014-01-07 14:55 [patch net-next] ipv4: loopback device: ignore value changes after device is upped Jiri Pirko
@ 2014-01-07 20:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-01-07 20:55 UTC (permalink / raw)
  To: jiri; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber, hannes

From: Jiri Pirko <jiri@resnulli.us>
Date: Tue,  7 Jan 2014 15:55:45 +0100

> 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>

Looks good, applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-07 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 14:55 [patch net-next] ipv4: loopback device: ignore value changes after device is upped Jiri Pirko
2014-01-07 20:55 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).