diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-18 02:14:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-18 02:24:13 -0400 |
commit | 92113bfde2f0982daa5a372d67b62f3d55bbc88a (patch) | |
tree | b5170e0f77f259c231cd105d7035203f1fa0bc1f /net/ipv6 | |
parent | cbc264cacd08e51fd4a64b5d5b1ba48f523990d1 (diff) |
ipv6: bool conversions phase1
ipv6_opt_accepted() returns a bool, and can use const pointers
ipv6_addr_equal(), ipv6_addr_any(), ipv6_addr_loopback(),
ipv6_addr_orchid() return a bool.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 10 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 138d4986c327..e22e6d88bac6 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -678,10 +678,10 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
678 | } | 678 | } |
679 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); | 679 | EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header); |
680 | 680 | ||
681 | int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) | 681 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb) |
682 | { | 682 | { |
683 | struct ipv6_pinfo *np = inet6_sk(sk); | 683 | const struct ipv6_pinfo *np = inet6_sk(sk); |
684 | struct inet6_skb_parm *opt = IP6CB(skb); | 684 | const struct inet6_skb_parm *opt = IP6CB(skb); |
685 | 685 | ||
686 | if (np->rxopt.all) { | 686 | if (np->rxopt.all) { |
687 | if ((opt->hop && (np->rxopt.bits.hopopts || | 687 | if ((opt->hop && (np->rxopt.bits.hopopts || |
@@ -693,9 +693,9 @@ int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb) | |||
693 | np->rxopt.bits.osrcrt)) || | 693 | np->rxopt.bits.osrcrt)) || |
694 | ((opt->dst1 || opt->dst0) && | 694 | ((opt->dst1 || opt->dst0) && |
695 | (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts))) | 695 | (np->rxopt.bits.dstopts || np->rxopt.bits.odstopts))) |
696 | return 1; | 696 | return true; |
697 | } | 697 | } |
698 | return 0; | 698 | return false; |
699 | } | 699 | } |
700 | EXPORT_SYMBOL_GPL(ipv6_opt_accepted); | 700 | EXPORT_SYMBOL_GPL(ipv6_opt_accepted); |
701 | 701 | ||
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index e65c56009bb0..c9015fad8d65 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -818,7 +818,7 @@ static void init_tel_txopt(struct ipv6_tel_txoption *opt, __u8 encap_limit) | |||
818 | * 0 else | 818 | * 0 else |
819 | **/ | 819 | **/ |
820 | 820 | ||
821 | static inline int | 821 | static inline bool |
822 | ip6_tnl_addr_conflict(const struct ip6_tnl *t, const struct ipv6hdr *hdr) | 822 | ip6_tnl_addr_conflict(const struct ip6_tnl *t, const struct ipv6hdr *hdr) |
823 | { | 823 | { |
824 | return ipv6_addr_equal(&t->parms.raddr, &hdr->saddr); | 824 | return ipv6_addr_equal(&t->parms.raddr, &hdr->saddr); |