Skip to contentSkip to conversation

kernel -2.6.35.13 longterm

PATCH Stephen Clark 3 participants 5 messages Jul 5, 2011 – Jul 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

Is it possible to get the following patches included in the longterm kernel 2.6.35.13?

They let linux behave according to:

"Basic Requirements for IPv6 Customer Edge Routers
draft-ietf-v6ops-ipv6-cpe-router-09"

From: Thomas Graf
Subject: [PATCH] ipv6: add special mode accept_ra=2 to accept RA while configured as router
Date: Friday, September 3, 2010 - 5:59 am

The current IPv6 behavior is to not accept router advertisements while forwarding, i.e. configured as router.

This does make sense, a router is typically not supposed to be auto configured. However there are exceptions and we should allow the current behavior to be overwritten.

Therefore this patch enables the user to overrule the "if forwarding enabled then don't listen to RAs" rule by setting accept_ra to the special value of 2.

An alternative would be to ignore the forwarding switch alltogether and solely accept RAs based on the value of accept_ra. However, I found that if not intended, accepting RAs as a router can lead to strange unwanted behavior therefore we it seems wise to only do so if the user explicitely asks for this behavior.

Signed-off-by Thomas Graf <tgraf at infradead.org>
net/ipv6/ndisc.c +14 -4
Index: net-2.6/net/ipv6/ndisc.c
===================================================================
@@ -1105,6 +1105,18 @@ errout:
      rtnl_set_sk_err(net, RTNLGRP_ND_USEROPT, err);
  }
 
+static inline int accept_ra(struct inet6_dev *in6_dev)
+{
+    /*
+     * If forwarding is enabled, RA are not accepted unless the special
+     * hybrid mode (accept_ra=2) is enabled.
+     */
+    if (in6_dev->cnf.forwarding && in6_dev->cnf.accept_ra < 2)
+        return 0;
+
+    return in6_dev->cnf.accept_ra;
+}
+
  static void ndisc_router_discovery(struct sk_buff *skb)
  {
      struct ra_msg *ra_msg = (struct ra_msg *)skb_transport_header(skb);
@@ -1158,8 +1170,7 @@ static void ndisc_router_discovery(struc
          return;
      }
 
-    /* skip route and link configuration on routers */
-    if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra)
+    if (!accept_ra(in6_dev))
          goto skip_linkparms;
 
  #ifdef CONFIG_IPV6_NDISC_NODETYPE
@@ -1309,8 +1320,7 @@ skip_linkparms:
                   NEIGH_UPDATE_F_ISROUTER);
      }
 
-    /* skip route and link configuration on routers */
-    if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_ra)
+    if (!accept_ra(in6_dev))
          goto out;
 
  #ifdef CONFIG_IPV6_ROUTE_INFO

Similar to accepting router advertisement, the IPv6 stack does not send router solicitations if forwarding is enabled.

This patch enables this behavior to be overruled by setting forwarding to the special value 2.

Signed-off-by Thomas Graf <tgraf at xxxxxxxxxxxxx>
net/ipv6/addrconf.c +2 -1
Index: net-2.6/net/ipv6/addrconf.c
===================================================================
@@ -2964,7 +2964,8 @@ static void addrconf_dad_completed(struc
         start sending router solicitations.
       */
 
-    if (ifp->idev->cnf.forwarding == 0 &&
+    if ((ifp->idev->cnf.forwarding == 0 ||
+         ifp->idev->cnf.forwarding == 2) &&
          ifp->idev->cnf.rtr_solicits > 0 &&
          (dev->flags&IFF_LOOPBACK) == 0 &&
          (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {

Thanks for your consideration,
Steve Clark

#1 lore raw
Quoted 4 lines · Stephen Clark

Hello,

Is it possible to get the following patches included in the longterm kernel 2.6.35.13?

Possibly, but you need to email the correct person and email address, none of which you did :)

Try [email protected], and the .35-longterm maintainer (hint, it's not me.)

Quoted 4 lines

They let linux behave according to:

"Basic Requirements for IPv6 Customer Edge Routers
draft-ietf-v6ops-ipv6-cpe-router-09"

That looks like a new feature, not a regression or bugfix, right?

Did you read Documentation/stable_kernel_rules.txt?

Quoted 5 lines

From: Thomas Graf
Subject: [PATCH] ipv6: add special mode accept_ra=2 to accept RA while configured as router
Date: Friday, September 3, 2010 - 5:59 am

You forgot to mention what the git commit id this is upstream in Linus's branch, and to copy the people involved in the original patch (author, subsystem maintainer, etc.) to see if they agree it should go in.

greg k-h

#2 lore raw
Quoted 4 lines · Greg KH
Quoted 2 lines · Stephen Clark

Hello,

Quoted 10 lines
Quoted 3 lines

Is it possible to get the following patches included in the longterm kernel 2.6.35.13?

Possibly, but you need to email the correct person and email address, none of which you did :)

Try [email protected], and the .35-longterm maintainer (hint, it's not me.)

Ok - hmmm maintainers in 2.6.35.13 still lists you - but I'll look at a later kernel maintainers file.

Quoted 10 lines
Quoted 5 lines

They let linux behave according to:

"Basic Requirements for IPv6 Customer Edge Routers

    draft-ietf-v6ops-ipv6-cpe-router-09"

That looks like a new feature, not a regression or bugfix, right?

Did you read Documentation/stable_kernel_rules.txt?

Not til just now. Yes it is a new feature, but with IPV6 it is seems that it would be of use. I know that my company needs it as we are moving off of FreeBSD to Linux for our fw/vpn/router appliance. The alternative is to just keep applying the patch myself.

Quoted 11 lines
Quoted 6 lines

From: Thomas Graf
Subject: [PATCH] ipv6: add special mode accept_ra=2 to accept RA while configured as router
Date: Friday, September 3, 2010 - 5:59 am

You forgot to mention what the git commit id this is upstream in Linus's branch, and to copy the people involved in the original patch (author, subsystem maintainer, etc.) to see if they agree it should go in.

How in the world do you get the commit info?

Quoted 3 lines

greg k-h

Thanks for the response - I'll see if I can get all the info and do a proper submission.

Regards,
Steve

Signature · 5 lines
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases."  (Thomas Jefferson)
#3 lore raw
Quoted 11 lines · Stephen Clark
Quoted 10 lines · Greg KH
Quoted 5 lines · Stephen Clark

Hello,

Is it possible to get the following patches included in the longterm kernel 2.6.35.13?

Possibly, but you need to email the correct person and email address, none of which you did :)

Quoted 6 lines
Quoted 4 lines

Try [email protected], and the .35-longterm maintainer (hint, it's not me.)

Ok - hmmm maintainers in 2.6.35.13 still lists you - but I'll look at a later kernel maintainers file.

It's not really obvious who is in charge, the -longterm maintainer really should put their name there. I think for .35 it's Andi Kleen.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

They let linux behave according to:

"Basic Requirements for IPv6 Customer Edge Routers
draft-ietf-v6ops-ipv6-cpe-router-09"

That looks like a new feature, not a regression or bugfix, right?

Quoted 7 lines
Quoted 3 lines

Did you read Documentation/stable_kernel_rules.txt?

Not til just now. Yes it is a new feature, but with IPV6 it is seems that it would be of use.
I know that my company needs it as we are moving off of FreeBSD to Linux for our fw/vpn/router appliance. The alternative is to just keep applying the patch myself.

As described above, new features are not for stable or longterm kernels, sorry. I recommend just applying it yourself if you really are stuck with the .35 kernel.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

From: Thomas Graf
Subject: [PATCH] ipv6: add special mode accept_ra=2 to accept RA while configured as router
Date: Friday, September 3, 2010 - 5:59 am

Quoted 8 lines
Quoted 5 lines

You forgot to mention what the git commit id this is upstream in Linus's branch, and to copy the people involved in the original patch (author, subsystem maintainer, etc.) to see if they agree it should go in.

How in the world do you get the commit info?

From the original patch and Linus's git tree? Also, look at

scripts/get_maintainer.pl it will show you who to send stuff to.

Hope this helps,

greg k-h

#4 lore raw
Quoted 3 lines · Greg KH

It's not really obvious who is in charge, the -longterm maintainer really should put their name there. I think for .35 it's Andi Kleen.

I'll add myself there, thanks.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only