Bug 357381 - apmscript takes down network (stopping packet forwarding) and doesn't bring it back up
Summary: apmscript takes down network (stopping packet forwarding) and doesn't bring i...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: apmd
Version: 6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Zdenek Prikryl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-29 22:04 UTC by Chris Wilson
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 14:34:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fixed apmscript (99.44 KB, application/x-rpm)
2007-10-30 09:17 UTC, Zdenek Prikryl
no flags Details

Description Chris Wilson 2007-10-29 22:04:11 UTC
Description of problem:

case "$PROG" in
    suspend|standby)
        ...
        if [ "$NET_RESTART" = "yes" ] ; then
                /sbin/service network stop
        fi

There is no counter-case in resume. suspend ensures that the originally active
devices are brought up via /var/run/apm-resume-post, but /etc/init.d/network
stop also stops packet forwarding:

          if [ -f /proc/sys/net/ipv4/ip_forward ]; then
                if [ `cat /proc/sys/net/ipv4/ip_forward` != 0 ]; then
                        action $"Disabling IPv4 packet forwarding: " sysctl -w
net.ipv4.ip_forward=0
                fi
          fi

and since network is never started again, packet forwarding remains off after
resume.

If someone presses the power/suspend button on a router/firewall running apmd,
it will suspend and shut down packet forwarding, but on resume, packet
forwarding remains off and routing functions disabled.

Version-Release number of selected component (if applicable):

apmd-3.0.2-22
initscripts-7.55.2-1

How reproducible:

Steps to Reproduce:
1. check that router/firewall is forwarding packets and running apm
2. press power/suspend button
3. wake up the box
4. check that it no longer forwards packets and /proc/sys/net/ipv4/ip_forward is 0
  
Actual results:

/proc/sys/net/ipv4/ip_forward is 0 after resume.

Expected results:

/proc/sys/net/ipv4/ip_forward should be reset to default value from
/etc/sysctl.conf by /etc/init.d/network start, which is never run.

Additional info:

Comment 1 Zdenek Prikryl 2007-10-30 09:16:13 UTC
Unfortunately, I do not have a hardware to test this now, co I create srpm with
a fix. Please, could you test it?. I'll create an attachment with srpm.

Zdenek

Comment 2 Zdenek Prikryl 2007-10-30 09:17:18 UTC
Created attachment 243091 [details]
fixed apmscript


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