From patchwork Tue Jan 7 14:55:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 307671 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C446D2C00C6 for ; Wed, 8 Jan 2014 01:55:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493AbaAGOzw (ORCPT ); Tue, 7 Jan 2014 09:55:52 -0500 Received: from mail-ee0-f54.google.com ([74.125.83.54]:53599 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751793AbaAGOzu (ORCPT ); Tue, 7 Jan 2014 09:55:50 -0500 Received: by mail-ee0-f54.google.com with SMTP id e51so100595eek.41 for ; Tue, 07 Jan 2014 06:55:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X3rsr09I4unkFheWqjiJHvr9txAcq7sUSrGnsSBkikE=; b=Hck5UhvMqwwiGUCIT0JrFreeC4oIgbQWNctBw+gUh9i4LpWr3qxa7CowvhBENsA9cl oGyNjUTLA9Pmoj1N07SY/oWGfn9EyIZ7EJTP1Z5BHxY3lWsc99mPx64GGpmoj6ax6/fo EWHC0miv27gt0vBrrehft02B3PhrhFePEN0qHQHDCWkdSgpW/sltVEPEagUwoydPZjml nXLbOuFUse8Jgaq5n6qrPPJeXi2Npa8cMsPXJn5lvBysNbv4UULRaRB/VF2at+GgVcAV lqj3MzDdPsB+TqYui+W9yb9qkukH2dLCBgl+aTSx0deOIIJsQKmzCVoVPb/b3U7zHHNX /5fg== X-Gm-Message-State: ALoCoQlqcnsZ8F0idAvTPZgSUPY/rrJN2tujKW/gVgpqp3/Q1FBFpVc7d2t30JHtxr79FW6eP4SX X-Received: by 10.14.172.130 with SMTP id t2mr21470985eel.68.1389106548671; Tue, 07 Jan 2014 06:55:48 -0800 (PST) Received: from localhost (ip-94-113-120-6.net.upcbroadband.cz. [94.113.120.6]) by mx.google.com with ESMTPSA id g47sm180796284eeo.19.2014.01.07.06.55.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 06:55:47 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, hannes@stressinduktion.org Subject: [patch net-next] ipv4: loopback device: ignore value changes after device is upped Date: Tue, 7 Jan 2014 15:55:45 +0100 Message-Id: <1389106545-7940-1-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.3.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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); } }