netdev
[Top] [All Lists]

Re: IFF_PROMISC bug?

To: jgarzik@xxxxxxxxxxxxxxxx
Subject: Re: IFF_PROMISC bug?
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Tue, 12 Feb 2002 23:43:25 -0800 (PST)
Cc: ak@xxxxxxx, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, kuznet@xxxxxxxxxxxxx
In-reply-to: <3C6A0F32.DE282B67@mandrakesoft.com>
References: <3C6A0817.B50EFC74@mandrakesoft.com> <20020212.223929.66060180.davem@redhat.com> <3C6A0F32.DE282B67@mandrakesoft.com>
Sender: owner-netdev@xxxxxxxxxxx
   From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
   Date: Wed, 13 Feb 2002 02:01:06 -0500

   Why must that affect SIOCGIFFLAGS reporting?

Because it is asking for a boolean and we don't have
a boolean to give to it.

Like I said, apps should ask for the count because that
is what it is, a count.
   
   it broke a security program that called that ioctl to check for unwanted
   promisc users

A program which should also be fixed to ask for the count.

I know what you want, you want IFF_PROMISC to be
(dev->promisc_count != 0), but I'm not going to publish
that from SIOCGIFFLAGS for several reasons:

1) It has lousy semantics, in short it's stupid.
2) If I fix change this behavior today, people will
   still need to ask explicitly for the count to handle
   any kernel before 2.4.19preX/2.2.2X-preX/2.5.5-preX

So be realistic, there is nothing to gain by the change
you propose.

<Prev in Thread] Current Thread [Next in Thread>