git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
ipv6
/
inet6_connection_sock.c
diff --git
a/net/ipv6/inet6_connection_sock.c
b/net/ipv6/inet6_connection_sock.c
index
f8f3a37
..
116f94a
100644
(file)
--- a/
net/ipv6/inet6_connection_sock.c
+++ b/
net/ipv6/inet6_connection_sock.c
@@
-13,7
+13,6
@@
* 2 of the License, or(at your option) any later version.
*/
* 2 of the License, or(at your option) any later version.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/in6.h>
#include <linux/ipv6.h>
#include <linux/module.h>
#include <linux/in6.h>
#include <linux/ipv6.h>
@@
-53,20
+52,20
@@
EXPORT_SYMBOL_GPL(inet6_csk_bind_conflict);
/*
* request_sock (formerly open request) hash tables.
*/
/*
* request_sock (formerly open request) hash tables.
*/
-static u32 inet6_synq_hash(const struct in6_addr *raddr, const
u
16 rport,
+static u32 inet6_synq_hash(const struct in6_addr *raddr, const
__be
16 rport,
const u32 rnd, const u16 synq_hsize)
{
const u32 rnd, const u16 synq_hsize)
{
- u32 a = raddr->s6_addr32[0];
- u32 b = raddr->s6_addr32[1];
- u32 c = raddr->s6_addr32[2];
+ u32 a =
(__force u32)
raddr->s6_addr32[0];
+ u32 b =
(__force u32)
raddr->s6_addr32[1];
+ u32 c =
(__force u32)
raddr->s6_addr32[2];
a += JHASH_GOLDEN_RATIO;
b += JHASH_GOLDEN_RATIO;
c += rnd;
__jhash_mix(a, b, c);
a += JHASH_GOLDEN_RATIO;
b += JHASH_GOLDEN_RATIO;
c += rnd;
__jhash_mix(a, b, c);
- a += raddr->s6_addr32[3];
- b += (u32)rport;
+ a +=
(__force u32)
raddr->s6_addr32[3];
+ b += (
__force
u32)rport;
__jhash_mix(a, b, c);
return c & (synq_hsize - 1);
__jhash_mix(a, b, c);
return c & (synq_hsize - 1);
@@
-74,7
+73,7
@@
static u32 inet6_synq_hash(const struct in6_addr *raddr, const u16 rport,
struct request_sock *inet6_csk_search_req(const struct sock *sk,
struct request_sock ***prevp,
struct request_sock *inet6_csk_search_req(const struct sock *sk,
struct request_sock ***prevp,
- const __
u
16 rport,
+ const __
be
16 rport,
const struct in6_addr *raddr,
const struct in6_addr *laddr,
const int iif)
const struct in6_addr *raddr,
const struct in6_addr *laddr,
const int iif)
@@
-158,6
+157,7
@@
int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
fl.oif = sk->sk_bound_dev_if;
fl.fl_ip_sport = inet->sport;
fl.fl_ip_dport = inet->dport;
fl.oif = sk->sk_bound_dev_if;
fl.fl_ip_sport = inet->sport;
fl.fl_ip_dport = inet->dport;
+ security_sk_classify_flow(sk, &fl);
if (np->opt && np->opt->srcrt) {
struct rt0_hdr *rt0 = (struct rt0_hdr *)np->opt->srcrt;
if (np->opt && np->opt->srcrt) {
struct rt0_hdr *rt0 = (struct rt0_hdr *)np->opt->srcrt;
@@
-173,6
+173,7
@@
int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
if (err) {
sk->sk_err_soft = -err;
if (err) {
sk->sk_err_soft = -err;
+ kfree_skb(skb);
return err;
}
return err;
}
@@
-181,12
+182,11
@@
int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
sk->sk_route_caps = 0;
if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
sk->sk_route_caps = 0;
+ kfree_skb(skb);
return err;
}
return err;
}
- ip6_dst_store(sk, dst, NULL);
- sk->sk_route_caps = dst->dev->features &
- ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
+ __ip6_dst_store(sk, dst, NULL, NULL);
}
skb->dst = dst_clone(dst);
}
skb->dst = dst_clone(dst);