diff options
| author | Brian Haley <brian.haley@hp.com> | 2009-06-23 07:31:07 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-06-23 07:31:07 -0400 |
| commit | d5fdd6babcfc2b0e6a8da1acf492a69fb54b4c47 (patch) | |
| tree | e4ebdb5d6c4b1ddc16f83e701e3e6038c379a497 | |
| parent | 0cf08dcb78e8d61b6d4b2eb5cdb296d969971626 (diff) | |
ipv6: Use correct data types for ICMPv6 type and code
Change all the code that deals directly with ICMPv6 type and code
values to use u8 instead of a signed int as that's the actual data
type.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/linux/icmpv6.h | 6 | ||||
| -rw-r--r-- | include/net/protocol.h | 2 | ||||
| -rw-r--r-- | include/net/rawv6.h | 2 | ||||
| -rw-r--r-- | include/net/xfrm.h | 2 | ||||
| -rw-r--r-- | net/dccp/ipv6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/icmp.c | 12 | ||||
| -rw-r--r-- | net/ipv6/ip6_tunnel.c | 18 | ||||
| -rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/mip6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/raw.c | 4 | ||||
| -rw-r--r-- | net/ipv6/route.c | 2 | ||||
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/tunnel6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/udp.c | 6 | ||||
| -rw-r--r-- | net/ipv6/udp_impl.h | 2 | ||||
| -rw-r--r-- | net/ipv6/udplite.c | 2 | ||||
| -rw-r--r-- | net/ipv6/xfrm6_tunnel.c | 2 | ||||
| -rw-r--r-- | net/sctp/ipv6.c | 2 |
20 files changed, 38 insertions, 38 deletions
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 10d701eec484..b6a85183c333 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
| @@ -175,16 +175,16 @@ struct icmp6_filter { | |||
| 175 | 175 | ||
| 176 | 176 | ||
| 177 | extern void icmpv6_send(struct sk_buff *skb, | 177 | extern void icmpv6_send(struct sk_buff *skb, |
| 178 | int type, int code, | 178 | u8 type, u8 code, |
| 179 | __u32 info, | 179 | __u32 info, |
| 180 | struct net_device *dev); | 180 | struct net_device *dev); |
| 181 | 181 | ||
| 182 | extern int icmpv6_init(void); | 182 | extern int icmpv6_init(void); |
| 183 | extern int icmpv6_err_convert(int type, int code, | 183 | extern int icmpv6_err_convert(u8 type, u8 code, |
| 184 | int *err); | 184 | int *err); |
| 185 | extern void icmpv6_cleanup(void); | 185 | extern void icmpv6_cleanup(void); |
| 186 | extern void icmpv6_param_prob(struct sk_buff *skb, | 186 | extern void icmpv6_param_prob(struct sk_buff *skb, |
| 187 | int code, int pos); | 187 | u8 code, int pos); |
| 188 | 188 | ||
| 189 | struct flowi; | 189 | struct flowi; |
| 190 | struct in6_addr; | 190 | struct in6_addr; |
diff --git a/include/net/protocol.h b/include/net/protocol.h index ffa5b8b1f1df..1089d5aabd49 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
| @@ -53,7 +53,7 @@ struct inet6_protocol | |||
| 53 | 53 | ||
| 54 | void (*err_handler)(struct sk_buff *skb, | 54 | void (*err_handler)(struct sk_buff *skb, |
| 55 | struct inet6_skb_parm *opt, | 55 | struct inet6_skb_parm *opt, |
| 56 | int type, int code, int offset, | 56 | u8 type, u8 code, int offset, |
| 57 | __be32 info); | 57 | __be32 info); |
| 58 | 58 | ||
| 59 | int (*gso_send_check)(struct sk_buff *skb); | 59 | int (*gso_send_check)(struct sk_buff *skb); |
diff --git a/include/net/rawv6.h b/include/net/rawv6.h index 8a22599f26ba..f6b9b830df8c 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <net/protocol.h> | 6 | #include <net/protocol.h> |
| 7 | 7 | ||
| 8 | void raw6_icmp_error(struct sk_buff *, int nexthdr, | 8 | void raw6_icmp_error(struct sk_buff *, int nexthdr, |
| 9 | int type, int code, int inner_offset, __be32); | 9 | u8 type, u8 code, int inner_offset, __be32); |
| 10 | int raw6_local_deliver(struct sk_buff *, int); | 10 | int raw6_local_deliver(struct sk_buff *, int); |
| 11 | 11 | ||
| 12 | extern int rawv6_rcv(struct sock *sk, | 12 | extern int rawv6_rcv(struct sock *sk, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 736bca450886..9e3a3f4c1f60 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -1274,7 +1274,7 @@ struct xfrm_tunnel { | |||
| 1274 | struct xfrm6_tunnel { | 1274 | struct xfrm6_tunnel { |
| 1275 | int (*handler)(struct sk_buff *skb); | 1275 | int (*handler)(struct sk_buff *skb); |
| 1276 | int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, | 1276 | int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 1277 | int type, int code, int offset, __be32 info); | 1277 | u8 type, u8 code, int offset, __be32 info); |
| 1278 | struct xfrm6_tunnel *next; | 1278 | struct xfrm6_tunnel *next; |
| 1279 | int priority; | 1279 | int priority; |
| 1280 | }; | 1280 | }; |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 05ea7440d9e5..3e70faab2989 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
| @@ -85,7 +85,7 @@ static inline __u32 dccp_v6_init_sequence(struct sk_buff *skb) | |||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 87 | static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 88 | int type, int code, int offset, __be32 info) | 88 | u8 type, u8 code, int offset, __be32 info) |
| 89 | { | 89 | { |
| 90 | struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data; | 90 | struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data; |
| 91 | const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); | 91 | const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset); |
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 52449f7a1b71..86f42a288c4b 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
| @@ -405,7 +405,7 @@ out: | |||
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 407 | static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 408 | int type, int code, int offset, __be32 info) | 408 | u8 type, u8 code, int offset, __be32 info) |
| 409 | { | 409 | { |
| 410 | struct net *net = dev_net(skb->dev); | 410 | struct net *net = dev_net(skb->dev); |
| 411 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 411 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; |
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index c2f250150db1..678bb95b1525 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
| @@ -354,7 +354,7 @@ static u32 esp6_get_mtu(struct xfrm_state *x, int mtu) | |||
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 356 | static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 357 | int type, int code, int offset, __be32 info) | 357 | u8 type, u8 code, int offset, __be32 info) |
| 358 | { | 358 | { |
| 359 | struct net *net = dev_net(skb->dev); | 359 | struct net *net = dev_net(skb->dev); |
| 360 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 360 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 36dff8807183..eab62a7a8f06 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
| @@ -117,7 +117,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk) | |||
| 117 | /* | 117 | /* |
| 118 | * Slightly more convenient version of icmpv6_send. | 118 | * Slightly more convenient version of icmpv6_send. |
| 119 | */ | 119 | */ |
| 120 | void icmpv6_param_prob(struct sk_buff *skb, int code, int pos) | 120 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) |
| 121 | { | 121 | { |
| 122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); |
| 123 | kfree_skb(skb); | 123 | kfree_skb(skb); |
| @@ -161,7 +161,7 @@ static int is_ineligible(struct sk_buff *skb) | |||
| 161 | /* | 161 | /* |
| 162 | * Check the ICMP output rate limit | 162 | * Check the ICMP output rate limit |
| 163 | */ | 163 | */ |
| 164 | static inline int icmpv6_xrlim_allow(struct sock *sk, int type, | 164 | static inline int icmpv6_xrlim_allow(struct sock *sk, u8 type, |
| 165 | struct flowi *fl) | 165 | struct flowi *fl) |
| 166 | { | 166 | { |
| 167 | struct dst_entry *dst; | 167 | struct dst_entry *dst; |
| @@ -305,7 +305,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {} | |||
| 305 | /* | 305 | /* |
| 306 | * Send an ICMP message in response to a packet in error | 306 | * Send an ICMP message in response to a packet in error |
| 307 | */ | 307 | */ |
| 308 | void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | 308 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, |
| 309 | struct net_device *dev) | 309 | struct net_device *dev) |
| 310 | { | 310 | { |
| 311 | struct net *net = dev_net(skb->dev); | 311 | struct net *net = dev_net(skb->dev); |
| @@ -590,7 +590,7 @@ out: | |||
| 590 | icmpv6_xmit_unlock(sk); | 590 | icmpv6_xmit_unlock(sk); |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info) | 593 | static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) |
| 594 | { | 594 | { |
| 595 | struct inet6_protocol *ipprot; | 595 | struct inet6_protocol *ipprot; |
| 596 | int inner_offset; | 596 | int inner_offset; |
| @@ -643,7 +643,7 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
| 643 | struct in6_addr *saddr, *daddr; | 643 | struct in6_addr *saddr, *daddr; |
| 644 | struct ipv6hdr *orig_hdr; | 644 | struct ipv6hdr *orig_hdr; |
| 645 | struct icmp6hdr *hdr; | 645 | struct icmp6hdr *hdr; |
| 646 | int type; | 646 | u8 type; |
| 647 | 647 | ||
| 648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
| 649 | struct sec_path *sp = skb_sec_path(skb); | 649 | struct sec_path *sp = skb_sec_path(skb); |
| @@ -914,7 +914,7 @@ static const struct icmp6_err { | |||
| 914 | }, | 914 | }, |
| 915 | }; | <||
