Commit f9380ee9 authored by David S. Miller's avatar David S. Miller

Merge bk://212.42.230.204/net-2.6

into nuts.davemloft.net:/disk1/BK/net-2.6
parents f9db9abb c661d238
......@@ -376,7 +376,7 @@ struct tc_action_ops
extern int tcf_register_action(struct tc_action_ops *a);
extern int tcf_unregister_action(struct tc_action_ops *a);
extern void tcf_action_destroy(struct tc_action *a, int bind);
extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a);
extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res);
extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int);
......
......@@ -1167,7 +1167,7 @@ static inline int tcp_skb_pcount(struct sk_buff *skb)
}
/* This is valid iff tcp_skb_pcount() > 1. */
static inline int tcp_skb_psize(struct sk_buff *skb)
static inline int tcp_skb_mss(struct sk_buff *skb)
{
return skb_shinfo(skb)->tso_size;
}
......
......@@ -406,12 +406,6 @@ struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey,
goto out;
}
if (tbl->entries > (tbl->hash_mask + 1)) {
write_lock_bh(&tbl->lock);
neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1);
write_unlock_bh(&tbl->lock);
}
memcpy(n->primary_key, pkey, key_len);
n->dev = dev;
dev_hold(dev);
......@@ -433,6 +427,9 @@ struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey,
write_lock_bh(&tbl->lock);
if (tbl->entries > (tbl->hash_mask + 1)) {
neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1);
hash_val = tbl->hash(pkey, dev) & tbl->hash_mask;
if (n->parms->dead) {
......
......@@ -312,7 +312,6 @@ static int inet_create(struct socket *sock, int protocol)
sk_set_owner(sk, THIS_MODULE);
sk->sk_destruct = inet_sock_destruct;
sk->sk_zapped = 0;
sk->sk_family = PF_INET;
sk->sk_protocol = protocol;
sk->sk_backlog_rcv = sk->sk_prot->backlog_rcv;
......
......@@ -1593,14 +1593,6 @@ void tcp_destroy_sock(struct sock *sk)
/* If it has not 0 inet_sk(sk)->num, it must be bound */
BUG_TRAP(!inet_sk(sk)->num || tcp_sk(sk)->bind_hash);
#ifdef TCP_DEBUG
if (sk->sk_zapped) {
printk(KERN_DEBUG "TCP: double destroy sk=%p\n", sk);
sock_hold(sk);
}
sk->sk_zapped = 1;
#endif
sk->sk_prot->destroy(sk);
sk_stream_kill_queues(sk);
......
......@@ -563,8 +563,6 @@ static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb)
if (num < s_num)
continue;
if (!(r->tcpdiag_states & (1 << sk->sk_zapped)))
continue;
if (r->id.tcpdiag_sport != inet->sport &&
r->id.tcpdiag_sport)
continue;
......
......@@ -2369,7 +2369,7 @@ static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb,
{
struct tcp_opt *tp = tcp_sk(sk);
struct tcp_skb_cb *scb = TCP_SKB_CB(skb);
__u32 mss = tcp_skb_psize(skb);
__u32 mss = tcp_skb_mss(skb);
__u32 snd_una = tp->snd_una;
__u32 orig_seq, seq;
__u32 packets_acked = 0;
......
......@@ -191,7 +191,6 @@ static int inet6_create(struct socket *sock, int protocol)
}
sk->sk_destruct = inet6_sock_destruct;
sk->sk_zapped = 0;
sk->sk_family = PF_INET6;
sk->sk_protocol = protocol;
......
......@@ -487,6 +487,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
}
}
if (rt->rt_type != RTN_UNICAST) {
ip_rt_put(rt);
tunnel->stat.tx_carrier_errors++;
goto tx_error_icmp;
}
......
......@@ -155,7 +155,7 @@ struct tc_action_ops *tc_lookup_action_id(u32 type)
return a;
}
int tcf_action_exec(struct sk_buff *skb,struct tc_action *act)
int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res)
{
struct tc_action *a;
......@@ -164,7 +164,8 @@ int tcf_action_exec(struct sk_buff *skb,struct tc_action *act)
if (skb->tc_verd & TC_NCLS) {
skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
D2PRINTK("(%p)tcf_action_exec: cleared TC_NCLS in %s out %s\n",skb,skb->input_dev?skb->input_dev->name:"xxx",skb->dev->name);
return TC_ACT_OK;
ret = TC_ACT_OK;
goto exec_done;
}
while ((a = act) != NULL) {
repeat:
......@@ -186,6 +187,11 @@ int tcf_action_exec(struct sk_buff *skb,struct tc_action *act)
}
exec_done:
if (skb->tc_classid > 0) {
res->classid = skb->tc_classid;
res->class = 0;
skb->tc_classid = 0;
}
return ret;
}
......
......@@ -102,7 +102,7 @@ static int fw_classify(struct sk_buff *skb, struct tcf_proto *tp,
}
#endif
if (f->action) {
int pol_res = tcf_action_exec(skb, f->action);
int pol_res = tcf_action_exec(skb, f->action, res);
if (pol_res >= 0)
return pol_res;
} else
......
......@@ -175,12 +175,7 @@ static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_re
#endif
#ifdef CONFIG_NET_CLS_ACT
if (n->action) {
int pol_res = tcf_action_exec(skb, n->action);
if (skb->tc_classid > 0) {
res->classid = skb->tc_classid;
skb->tc_classid = 0;
}
int pol_res = tcf_action_exec(skb, n->action, res);
if (pol_res >= 0)
return pol_res;
} else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment