diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-06-02 14:03:34 -0400 |
---|---|---|
committer | pablo <pablo@1984.(none)> | 2009-06-02 14:03:34 -0400 |
commit | 8b0a231d4d6336baf10f13b6142fd5c1f628247e (patch) | |
tree | 3b6e7439889f52f122a814915e559840c30e1eb9 /net | |
parent | f49c857ff20a660850bf8014716d0df6175e1883 (diff) |
netfilter: ctnetlink: remove nowait parameter from *fill_info()
This patch is a cleanup, it removes the `nowait' parameter
from all *fill_info() function since it is always set to one.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index c523f0b8cee5..2d7d69ff215d 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -350,8 +350,7 @@ nla_put_failure: | |||
350 | 350 | ||
351 | static int | 351 | static int |
352 | ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | 352 | ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq, |
353 | int event, int nowait, | 353 | int event, const struct nf_conn *ct) |
354 | const struct nf_conn *ct) | ||
355 | { | 354 | { |
356 | struct nlmsghdr *nlh; | 355 | struct nlmsghdr *nlh; |
357 | struct nfgenmsg *nfmsg; | 356 | struct nfgenmsg *nfmsg; |
@@ -362,7 +361,7 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | |||
362 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(struct nfgenmsg)); | 361 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(struct nfgenmsg)); |
363 | nfmsg = NLMSG_DATA(nlh); | 362 | nfmsg = NLMSG_DATA(nlh); |
364 | 363 | ||
365 | nlh->nlmsg_flags = (nowait && pid) ? NLM_F_MULTI : 0; | 364 | nlh->nlmsg_flags = pid ? NLM_F_MULTI : 0; |
366 | nfmsg->nfgen_family = nf_ct_l3num(ct); | 365 | nfmsg->nfgen_family = nf_ct_l3num(ct); |
367 | nfmsg->version = NFNETLINK_V0; | 366 | nfmsg->version = NFNETLINK_V0; |
368 | nfmsg->res_id = 0; | 367 | nfmsg->res_id = 0; |
@@ -637,8 +636,7 @@ restart: | |||
637 | } | 636 | } |
638 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, | 637 | if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, |
639 | cb->nlh->nlmsg_seq, | 638 | cb->nlh->nlmsg_seq, |
640 | IPCTNL_MSG_CT_NEW, | 639 | IPCTNL_MSG_CT_NEW, ct) < 0) { |
641 | 1, ct) < 0) { | ||
642 | cb->args[1] = (unsigned long)ct; | 640 | cb->args[1] = (unsigned long)ct; |
643 | goto out; | 641 | goto out; |
644 | } | 642 | } |
@@ -880,7 +878,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
880 | 878 | ||
881 | rcu_read_lock(); | 879 | rcu_read_lock(); |
882 | err = ctnetlink_fill_info(skb2, NETLINK_CB(skb).pid, nlh->nlmsg_seq, | 880 | err = ctnetlink_fill_info(skb2, NETLINK_CB(skb).pid, nlh->nlmsg_seq, |
883 | IPCTNL_MSG_CT_NEW, 1, ct); | 881 | IPCTNL_MSG_CT_NEW, ct); |
884 | rcu_read_unlock(); | 882 | rcu_read_unlock(); |
885 | nf_ct_put(ct); | 883 | nf_ct_put(ct); |
886 | if (err <= 0) | 884 | if (err <= 0) |
@@ -1503,9 +1501,7 @@ nla_put_failure: | |||
1503 | 1501 | ||
1504 | static int | 1502 | static int |
1505 | ctnetlink_exp_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | 1503 | ctnetlink_exp_fill_info(struct sk_buff *skb, u32 pid, u32 seq, |
1506 | int event, | 1504 | int event, const struct nf_conntrack_expect *exp) |
1507 | int nowait, | ||
1508 | const struct nf_conntrack_expect *exp) | ||
1509 | { | 1505 | { |
1510 | struct nlmsghdr *nlh; | 1506 | struct nlmsghdr *nlh; |
1511 | struct nfgenmsg *nfmsg; | 1507 | struct nfgenmsg *nfmsg; |
@@ -1515,7 +1511,7 @@ ctnetlink_exp_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | |||
1515 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(struct nfgenmsg)); | 1511 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(struct nfgenmsg)); |
1516 | nfmsg = NLMSG_DATA(nlh); | 1512 | nfmsg = NLMSG_DATA(nlh); |
1517 | 1513 | ||
1518 | nlh->nlmsg_flags = (nowait && pid) ? NLM_F_MULTI : 0; | 1514 | nlh->nlmsg_flags = pid ? NLM_F_MULTI : 0; |
1519 | nfmsg->nfgen_family = exp->tuple.src.l3num; | 1515 | nfmsg->nfgen_family = exp->tuple.src.l3num; |
1520 | nfmsg->version = NFNETLINK_V0; | 1516 | nfmsg->version = NFNETLINK_V0; |
1521 | nfmsg->res_id = 0; | 1517 | nfmsg->res_id = 0; |
@@ -1617,10 +1613,11 @@ restart: | |||
1617 | continue; | 1613 | continue; |
1618 | cb->args[1] = 0; | 1614 | cb->args[1] = 0; |
1619 | } | 1615 | } |
1620 | if (ctnetlink_exp_fill_info(skb, NETLINK_CB(cb->skb).pid, | 1616 | if (ctnetlink_exp_fill_info(skb, |
1617 | NETLINK_CB(cb->skb).pid, | ||
1621 | cb->nlh->nlmsg_seq, | 1618 | cb->nlh->nlmsg_seq, |
1622 | IPCTNL_MSG_EXP_NEW, | 1619 | IPCTNL_MSG_EXP_NEW, |
1623 | 1, exp) < 0) { | 1620 | exp) < 0) { |
1624 | if (!atomic_inc_not_zero(&exp->use)) | 1621 | if (!atomic_inc_not_zero(&exp->use)) |
1625 | continue; | 1622 | continue; |
1626 | cb->args[1] = (unsigned long)exp; | 1623 | cb->args[1] = (unsigned long)exp; |
@@ -1689,8 +1686,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, | |||
1689 | 1686 | ||
1690 | rcu_read_lock(); | 1687 | rcu_read_lock(); |
1691 | err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, | 1688 | err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, |
1692 | nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW, | 1689 | nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW, exp); |
1693 | 1, exp); | ||
1694 | rcu_read_unlock(); | 1690 | rcu_read_unlock(); |
1695 | if (err <= 0) | 1691 | if (err <= 0) |
1696 | goto free; | 1692 | goto free; |