netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wangyufen <wangyufen@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <ioe@perches.com>, <kuznet@ms2.inr.ac.ru>,
	Wang Yufen <wangyufen@huawei.com>
Subject: [PATCH net-next v4 2/3] ipv6: reuse rt6_need_strict
Date: Fri, 28 Mar 2014 12:01:42 +0800	[thread overview]
Message-ID: <1395979303-7668-3-git-send-email-wangyufen@huawei.com> (raw)
In-Reply-To: <1395979303-7668-1-git-send-email-wangyufen@huawei.com>

From: Wang Yufen <wangyufen@huawei.com>

Modify the rt6_need_strict, so that it can be reused

Signed-off-by: Wang Yufen <wangyufen@huawei.com>
---
 include/net/ip6_route.h | 1 +
 net/ipv6/route.c        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 00e3f12..d9c316e 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -51,6 +51,7 @@ static inline unsigned int rt6_flags2srcprefs(int flags)
 	return (flags >> 3) & 7;
 }
 
+bool rt6_need_strict(const struct in6_addr *daddr);
 
 void ip6_route_input(struct sk_buff *skb);
 
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fba54a4..f5fdccc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -373,7 +373,7 @@ static bool rt6_check_expired(const struct rt6_info *rt)
 	return false;
 }
 
-static bool rt6_need_strict(const struct in6_addr *daddr)
+bool rt6_need_strict(const struct in6_addr *daddr)
 {
 	return ipv6_addr_type(daddr) &
 		(IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK);
-- 
1.7.12

  parent reply	other threads:[~2014-03-28  4:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  4:01 [PATCH net-next v4 0/3] ipv6: tcp_ipv6 policy route issue Wangyufen
2014-03-28  4:01 ` [PATCH net-next v4 1/3] ipv6: tcp_ipv6 do some cleanup Wangyufen
2014-03-28  4:01 ` Wangyufen [this message]
2014-03-28  7:41   ` [PATCH net-next v4 2/3] ipv6: reuse rt6_need_strict Hannes Frederic Sowa
2014-03-28  9:04     ` wangyufen
2014-03-28  4:01 ` [PATCH net-next v4 3/3] ipv6: tcp_ipv6 policy route issue Wangyufen

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=1395979303-7668-3-git-send-email-wangyufen@huawei.com \
    --to=wangyufen@huawei.com \
    --cc=davem@davemloft.net \
    --cc=ioe@perches.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --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).