netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Oravec <jan.oravec@6com.sk>
To: netdev@oss.sgi.com
Subject: problem setting net.ipvX.conf.all.forwarding via sysctl() system call
Date: Sun, 3 Aug 2003 17:44:27 +0200	[thread overview]
Message-ID: <20030803154427.GA12926@wsx.ksp.sk> (raw)

Hello,


When net.ipvX.conf.all.forwarding is enabled via sysctl() system call,
forwarding is not enabled on all interfaces as it is when it is changed
using /proc filesystem.

For IPv6, it is obviously because sysctl 'strategy' handler is not defined.
For IPv4, it is because ipv4_sysctl_forward_strategy only copy new value to
check whether it has changed and does not update ipv4_devconf.forwarding
before calling inet_forward_change(). (it is copied internally by sysctl
after ipv4_sysctl_forward_strategy because we return positive number)

I am not good in kernel parallel computing strategy, whether it requires
some locking or it is safe to do:

--- sysctl_net_ipv4.c.old       2003-08-03 17:37:44.000000000 +0200
+++ sysctl_net_ipv4.c   2003-08-03 17:38:18.000000000 +0200
@@ -109,8 +109,9 @@ static int ipv4_sysctl_forward_strategy(
                 }
         }
  
+        ipv4_devconf.forwarding=new;
         inet_forward_change();
-        return 1;
+        return 0;
 }
  
 ctl_table ipv4_table[] = {



Best Regards,

-- 
Jan Oravec                           XS26 coordinator
6COM s.r.o.                          'Access to IPv6'
http://www.6com.sk                   http://www.xs26.net

             reply	other threads:[~2003-08-03 15:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-03 15:44 Jan Oravec [this message]
2003-08-08  8:45 ` problem setting net.ipvX.conf.all.forwarding via sysctl() system call YOSHIFUJI Hideaki / 吉藤英明
2003-08-08  9:11   ` Jan Oravec
2003-08-09  8:06     ` David S. Miller
2003-08-08  8:50 ` [PATCH] IPV6: strategy hander for net.ipv6.conf.*.forwarding (is Re: problem setting net.ipvX.conf.all.forwarding via sysctl() system call) YOSHIFUJI Hideaki / 吉藤英明
2003-08-08  9:37   ` Jan Oravec
2003-08-08  9:51     ` YOSHIFUJI Hideaki / 吉藤英明
2003-08-08 11:39       ` Jan Oravec
2003-08-09  8:08       ` David S. Miller
2003-08-09 10:21         ` YOSHIFUJI Hideaki / 吉藤英明
2003-08-09 21:44           ` David S. Miller

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=20030803154427.GA12926@wsx.ksp.sk \
    --to=jan.oravec@6com.sk \
    --cc=netdev@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).