Bug 119725 - promiscuous mode flip-flop after network restart
promiscuous mode flip-flop after network restart
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: David Miller
Brian Brock
http://www.ussg.iu.edu/hypermail/linu...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-01 15:16 EST by Brian
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-02 00:31:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch file from Jim Nisbet (5.72 KB, patch)
2004-04-01 15:19 EST, Brian
no flags Details | Diff
Fix for promisc bug (1.27 KB, patch)
2004-04-03 17:14 EST, David Miller
no flags Details | Diff

  None (edit)
Description Brian 2004-04-01 15:16:38 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Description of problem:
When the network is restartd while a process in a promiscuous network
read, the mode of the interface gets messed up.  The device will leave
promiscuous mode when a promiscuous read is opened, and enter
promiscuous mode when the read is closed.

See post by Jim Nisbet:
http://www.ussg.iu.edu/hypermail/linux/net/0306.3/0240.html

I have verified that the patch works with kernel 2.4.21-4.EL, and
kernel 2.4.20-30.9 (RH9)

Version-Release number of selected component (if applicable):
kernel-2.4.21-4.EL

How reproducible:
Always

Steps to Reproduce:
1.Run tcpdump
2./etc/init.d/network restart
3. wait for interface to come back up
4. run tcpdump again
5. stop tcpdump
    

Actual Results:  1. See packets on ethX. log: ethX entered promiscuous
mode -- good
2. tcpdump quits when interface is down -- good
3. interfacea comes back up -- good
4. don't see any packets. log: ethX left promiscuous mode -- BAD
5. log: ethX entered promiscuous mode -- BAD

Expected Results:  1. See packets on ethX. log: ethX entered
promiscuous mode
2. tcpdump quits when interface is down
3. interfacea comes back up
4. See packets again. log: ethX entered promiscuous mode
5. log: ethX left promiscuous mode

Additional info:

Once this happens, the only way to get back to normal is to reboot. It
is possible to put the device into promiscuous mode by starting 1+n
tcpdump processes at the same time, where n is the number of times the
network has been restarted with the device in promiscuous mode.
Obviously, this is not a good solution.
Comment 1 Brian 2004-04-01 15:19:02 EST
Created attachment 99051 [details]
Patch file from Jim Nisbet

I have verified that the patch works with RH Enterprise kernel 2.4.21-4.EL, and
RH 9 kernel 2.4.20-30.9
Comment 2 David Miller 2004-04-03 17:05:39 EST
This is tricky to fix.  There are two things at work here:

1) There is a IFF_PROMISC device state, and a user program can
   set/clear this bit using SIOCSIFFLAGS ioctl.  The proposed patch
   breaks this part of the interface.

2) There is a promiscuous count, which keeps track of how many promiscuos
   enables have ocurred.

I'll look into this more deeply.
Comment 3 David Miller 2004-04-03 17:14:10 EST
Created attachment 99093 [details]
Fix for promisc bug

This fix by lunz@falooley.org is the correct one.
Comment 4 Ernie Petrides 2004-05-04 19:05:53 EDT
David's patch in comment #3 has just been committed to the RHEL3 U3
patch pool (in kernel version 2.4.21-15.2.EL).
Comment 5 John Flanagan 2004-09-02 00:31:14 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-433.html

Note You need to log in before you can comment on or make changes to this bug.