netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rami Rosen" <ramirose@gmail.com>
To: "David Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH] [IPV6] Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric.
Date: Fri, 8 Feb 2008 12:14:18 +0200	[thread overview]
Message-ID: <eb3ff54b0802080214u5c20f061of4144964c8776359@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Hi,
  This patch replaces the explicit usage of the magic constant "1024"
with IP6_RT_PRIO_USER in the IPV6 tree.

Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 799 bytes --]

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 513f72e..6e7b56e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1620,7 +1620,7 @@ static struct rt6_info *rt6_add_route_info(struct in6_addr *prefix, int prefixle
 {
 	struct fib6_config cfg = {
 		.fc_table	= RT6_TABLE_INFO,
-		.fc_metric	= 1024,
+		.fc_metric	= IP6_RT_PRIO_USER,
 		.fc_ifindex	= ifindex,
 		.fc_dst_len	= prefixlen,
 		.fc_flags	= RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO |
@@ -1670,7 +1670,7 @@ struct rt6_info *rt6_add_dflt_router(struct in6_addr *gwaddr,
 {
 	struct fib6_config cfg = {
 		.fc_table	= RT6_TABLE_DFLT,
-		.fc_metric	= 1024,
+		.fc_metric	= IP6_RT_PRIO_USER,
 		.fc_ifindex	= dev->ifindex,
 		.fc_flags	= RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT |
 				  RTF_UP | RTF_EXPIRES | RTF_PREF(pref),

             reply	other threads:[~2008-02-08 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 10:14 Rami Rosen [this message]
2008-02-10  7:43 ` [PATCH] [IPV6] Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric David 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=eb3ff54b0802080214u5c20f061of4144964c8776359@mail.gmail.com \
    --to=ramirose@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).