From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32245 invoked by alias); 31 Aug 2009 16:58:30 -0000 Received: (qmail 32237 invoked by uid 22791); 31 Aug 2009 16:58:30 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f223.google.com (HELO mail-fx0-f223.google.com) (209.85.220.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Aug 2009 16:58:25 +0000 Received: by fxm23 with SMTP id 23so3294601fxm.30 for ; Mon, 31 Aug 2009 09:58:22 -0700 (PDT) Received: by 10.204.2.205 with SMTP id 13mr4420196bkk.205.1251737902664; Mon, 31 Aug 2009 09:58:22 -0700 (PDT) Received: from ?192.168.130.27? (dial-78-141-95-31-orange.orange.sk [78.141.95.31]) by mx.google.com with ESMTPS id z10sm7565629fka.5.2009.08.31.09.58.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Aug 2009 09:58:22 -0700 (PDT) Message-ID: <4A9C0111.70300@gmail.com> Date: Mon, 31 Aug 2009 16:58:00 -0000 From: Stanislav Meduna User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: eCos Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] How to deconfigure an interface? X-SW-Source: 2009-08/txt/msg00106.txt.bz2 Hi, I'd like to be able to change an IP address of an interface without reboot. The comment at init_net says // [Re]initialize the network interface with the info passed from BOOTP however, the new provided address is _added_ to the interface and the interface responds to both old and new IP address afterwards. The same happens if I try to set the address using SIOCSIFADDR. Is this the intended behaviour? Shouldn't the SIFADDR change the address and AIFADDR add a new one? Is there a way to bring the IP stack back to the clean state, or does one needs to deconfigure the interface step-by step by removing addresses already configured using SIOCDIFADDR (which works)? I tried to look at the bootp code, but my suspicion is that if the BOOTP server assigns a new address, the same thing will happen - I do not have the environment to confirm this. I am using the FreeBSD networking stack. Thanks -- Stano -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss