Bug 357381

Summary: apmscript takes down network (stopping packet forwarding) and doesn't bring it back up
Product: [Fedora] Fedora Reporter: Chris Wilson <chris+redhat>
Component: apmdAssignee: Zdenek Prikryl <zprikryl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 14:34:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fixed apmscript none

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