All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: "Alon Bar-Lev" <alon.barlev@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: iproute2 (addr flush) infinite loop when unprivileged users
Date: Fri, 25 Jan 2008 15:02:57 -0800	[thread overview]
Message-ID: <20080125150257.578a108f@deepthought> (raw)
In-Reply-To: <9e0cf0bf0801251500u388b9a5dxda92d6d1e3d86233@mail.gmail.com>

On Sat, 26 Jan 2008 01:00:34 +0200
"Alon Bar-Lev" <alon.barlev@gmail.com> wrote:

> Hello,
> 
> When executing the following command using unprivileged users there is
> an infinite loop...
> /sbin/ip route flush dev eth1
> 
> Execution with -s produces:
> *** Round 28153, deleting 2 entries ***
> 
> *** Round 28154, deleting 2 entries ***
> 
> *** Round 28155, deleting 2 entries ***
> 
> *** Round 28156, deleting 2 entries ***
> 
> *** Round 28157, deleting 2 entries ***
> 
> *** Round 28158, deleting 2 entries ***
> 
> *** Round 28159, deleting 2 entries ***
> 
> I do not fully understand the sequence, but it may be kernel fault, as
> it should have returned EPERM for this request stopping the netlink
> request.
> 
> Anyway... A simple solution is to store the filter.flushed and fail if
> it keeps its value during loop iteration at
> ip/ipaddress.c::ipaddr_list_or_flush(), but this is only a
> workaround...
> 
> Please CC as I am not in netdev list.
> Thanks!
> Alon.

Non privileged users can't delete routes, but command keeps trying.
The correct way to handle it is to teach flush loop to look at error code.

-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

  reply	other threads:[~2008-01-25 23:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 23:00 iproute2 (addr flush) infinite loop when unprivileged users Alon Bar-Lev
2008-01-25 23:02 ` Stephen Hemminger [this message]
2008-01-25 23:06   ` Alon Bar-Lev
2008-01-26  0:12 ` Stephen Hemminger
2008-01-26  0:22   ` Alon Bar-Lev
2008-01-26  8:58     ` Alon Bar-Lev
2008-01-26 19:11       ` Stephen Hemminger
2008-01-26 19:14       ` Stephen Hemminger
2008-01-26 19:19       ` Stephen Hemminger
2008-01-26 21:48         ` Alon Bar-Lev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080125150257.578a108f@deepthought \
    --to=shemminger@linux-foundation.org \
    --cc=alon.barlev@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.