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 kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
sched
/
act_api.c
diff --git
a/net/sched/act_api.c
b/net/sched/act_api.c
index
914c85f
..
2ffa11c
100644
(file)
--- a/
net/sched/act_api.c
+++ b/
net/sched/act_api.c
@@
-34,7
+34,7
@@
#include <net/sch_generic.h>
#include <net/act_api.h>
#include <net/sch_generic.h>
#include <net/act_api.h>
-#if
1
/* control */
+#if
0
/* control */
#define DPRINTK(format, args...) printk(KERN_DEBUG format, ##args)
#else
#define DPRINTK(format, args...)
#define DPRINTK(format, args...) printk(KERN_DEBUG format, ##args)
#else
#define DPRINTK(format, args...)
@@
-165,7
+165,7
@@
int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
while ((a = act) != NULL) {
repeat:
if (a->ops && a->ops->act) {
while ((a = act) != NULL) {
repeat:
if (a->ops && a->ops->act) {
- ret = a->ops->act(
&skb, a
);
+ ret = a->ops->act(
skb, a, res
);
if (TC_MUNGED & skb->tc_verd) {
/* copied already, allow trampling */
skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
if (TC_MUNGED & skb->tc_verd) {
/* copied already, allow trampling */
skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
@@
-179,11
+179,6
@@
repeat:
act = a->next;
}
exec_done:
act = a->next;
}
exec_done:
- if (skb->tc_classid > 0) {
- res->classid = skb->tc_classid;
- res->class = 0;
- skb->tc_classid = 0;
- }
return ret;
}
return ret;
}
@@
-295,7
+290,7
@@
struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
if (a_o == NULL) {
#ifdef CONFIG_KMOD
rtnl_unlock();
if (a_o == NULL) {
#ifdef CONFIG_KMOD
rtnl_unlock();
- request_module(act_name);
+ request_module(
"act_%s",
act_name);
rtnl_lock();
a_o = tc_lookup_action_n(act_name);
rtnl_lock();
a_o = tc_lookup_action_n(act_name);
@@
-428,17
+423,19
@@
errout:
static int
tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
static int
tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
- u
nsigned
flags, int event, int bind, int ref)
+ u
16
flags, int event, int bind, int ref)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
unsigned char *b = skb->tail;
struct rtattr *x;
{
struct tcamsg *t;
struct nlmsghdr *nlh;
unsigned char *b = skb->tail;
struct rtattr *x;
- nlh = NLMSG_
PUT(skb, pid, seq, event, sizeof(*t)
);
- nlh->nlmsg_flags = flags;
+ nlh = NLMSG_
NEW(skb, pid, seq, event, sizeof(*t), flags
);
+
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
+ t->tca__pad1 = 0;
+ t->tca__pad2 = 0;
x = (struct rtattr*) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
x = (struct rtattr*) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
@@
-580,6
+577,8
@@
static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
+ t->tca__pad1 = 0;
+ t->tca__pad2 = 0;
x = (struct rtattr *) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
x = (struct rtattr *) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
@@
-594,7
+593,7
@@
static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
nlh->nlmsg_flags |= NLM_F_ROOT;
module_put(a->ops->owner);
kfree(a);
nlh->nlmsg_flags |= NLM_F_ROOT;
module_put(a->ops->owner);
kfree(a);
- err = rtnetlink_send(skb, pid, RT
M
GRP_TC, n->nlmsg_flags&NLM_F_ECHO);
+ err = rtnetlink_send(skb, pid, RT
NL
GRP_TC, n->nlmsg_flags&NLM_F_ECHO);
if (err > 0)
return 0;
if (err > 0)
return 0;
@@
-657,7
+656,7
@@
tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
/* now do the delete */
tcf_action_destroy(head, 0);
/* now do the delete */
tcf_action_destroy(head, 0);
- ret = rtnetlink_send(skb, pid, RT
M
GRP_TC,
+ ret = rtnetlink_send(skb, pid, RT
NL
GRP_TC,
n->nlmsg_flags&NLM_F_ECHO);
if (ret > 0)
return 0;
n->nlmsg_flags&NLM_F_ECHO);
if (ret > 0)
return 0;
@@
-669,7
+668,7
@@
err:
}
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
}
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
- u
nsigned
flags)
+ u
16
flags)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
{
struct tcamsg *t;
struct nlmsghdr *nlh;
@@
-684,11
+683,12
@@
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
b = (unsigned char *)skb->tail;
b = (unsigned char *)skb->tail;
- nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t));
- nlh->nlmsg_flags = flags;
+ nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
-
+ t->tca__pad1 = 0;
+ t->tca__pad2 = 0;
+
x = (struct rtattr*) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
x = (struct rtattr*) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
@@
-698,16
+698,16
@@
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
x->rta_len = skb->tail - (u8*)x;
nlh->nlmsg_len = skb->tail - b;
x->rta_len = skb->tail - (u8*)x;
nlh->nlmsg_len = skb->tail - b;
- NETLINK_CB(skb).dst_group
s = RTM
GRP_TC;
+ NETLINK_CB(skb).dst_group
= RTNL
GRP_TC;
- err = rtnetlink_send(skb, pid, RT
M
GRP_TC, flags&NLM_F_ECHO);
+ err = rtnetlink_send(skb, pid, RT
NL
GRP_TC, flags&NLM_F_ECHO);
if (err > 0)
err = 0;
return err;
rtattr_failure:
nlmsg_failure:
if (err > 0)
err = 0;
return err;
rtattr_failure:
nlmsg_failure:
-
skb_trim(skb, b - skb->data
);
+
kfree_skb(skb
);
return -1;
}
return -1;
}
@@
-843,6
+843,8
@@
tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
cb->nlh->nlmsg_type, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
cb->nlh->nlmsg_type, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
+ t->tca__pad1 = 0;
+ t->tca__pad2 = 0;
x = (struct rtattr *) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
x = (struct rtattr *) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);