]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netfilter: Change return types of targets/watchers for Ebtables extensions
authorJan Engelhardt <jengelh@medozas.de>
Wed, 8 Oct 2008 09:35:13 +0000 (11:35 +0200)
committerPatrick McHardy <kaber@trash.net>
Wed, 8 Oct 2008 09:35:13 +0000 (11:35 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter_bridge/ebtables.h
net/bridge/netfilter/ebt_arpreply.c
net/bridge/netfilter/ebt_dnat.c
net/bridge/netfilter/ebt_log.c
net/bridge/netfilter/ebt_mark.c
net/bridge/netfilter/ebt_nflog.c
net/bridge/netfilter/ebt_redirect.c
net/bridge/netfilter/ebt_snat.c
net/bridge/netfilter/ebt_ulog.c

index f9fda2c442a0953c1c0318eab06b393c48f7d112..097432b94c556cde0293406466392264d582634a 100644 (file)
@@ -221,7 +221,7 @@ struct ebt_watcher
 {
        struct list_head list;
        const char name[EBT_FUNCTION_MAXNAMELEN];
-       void (*watcher)(const struct sk_buff *skb, unsigned int hooknr,
+       unsigned int (*watcher)(const struct sk_buff *skb, unsigned int hooknr,
           const struct net_device *in, const struct net_device *out,
           const void *watcherdata, unsigned int datalen);
        bool (*check)(const char *tablename, unsigned int hookmask,
@@ -235,8 +235,8 @@ struct ebt_target
 {
        struct list_head list;
        const char name[EBT_FUNCTION_MAXNAMELEN];
-       /* returns one of the standard verdicts */
-       int (*target)(struct sk_buff *skb, unsigned int hooknr,
+       /* returns one of the standard EBT_* verdicts */
+       unsigned int (*target)(struct sk_buff *skb, unsigned int hooknr,
           const struct net_device *in, const struct net_device *out,
           const void *targetdata, unsigned int datalen);
        bool (*check)(const char *tablename, unsigned int hookmask,
index c298d3deffa460da736d571cd36d2b6ab02b7a44..b444cf835f1e268eacfa915bdb59f17c72585f50 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_arpreply.h>
 
-static int ebt_target_reply(struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_target_reply(struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
index 6ddea2184e95ca12d0824c74e92da3ea789d4e09..d58b9e32338e6ac4c35da19f644179a4769802b2 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_nat.h>
 
-static int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
index f3d6d5ec2dc6449edc61fb6d14ec2bc47c037b43..2705d7a2a9b541a9be2b1bb89783ad1504fbb0c2 100644 (file)
@@ -192,7 +192,7 @@ out:
 
 }
 
-static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_log(const struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
@@ -209,6 +209,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
        else
                ebt_log_packet(NFPROTO_BRIDGE, hooknr, skb, in, out, &li,
                               info->prefix);
+       return EBT_CONTINUE;
 }
 
 static struct ebt_watcher log =
index b85c73895aeb69107ba6ee9ea582321119f76cdb..e4b91d8e2c6c00dbf805feba1c35091690293b30 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_mark_t.h>
 
-static int ebt_target_mark(struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_target_mark(struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
index a6954eb3f58ae95643b8cab20e00667fabfb4561..2c75023b3260f49c8c48e72b7474497d69c23d25 100644 (file)
 #include <linux/netfilter_bridge/ebt_nflog.h>
 #include <net/netfilter/nf_log.h>
 
-static void ebt_nflog(const struct sk_buff *skb,
-                     unsigned int hooknr,
-                     const struct net_device *in,
-                     const struct net_device *out,
-                     const void *data, unsigned int datalen)
+static unsigned int ebt_nflog(const struct sk_buff *skb,
+                             unsigned int hooknr,
+                             const struct net_device *in,
+                             const struct net_device *out,
+                             const void *data, unsigned int datalen)
 {
        struct ebt_nflog_info *info = (struct ebt_nflog_info *)data;
        struct nf_loginfo li;
@@ -34,6 +34,7 @@ static void ebt_nflog(const struct sk_buff *skb,
        li.u.ulog.qthreshold = info->threshold;
 
        nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, "%s", info->prefix);
+       return EBT_CONTINUE;
 }
 
 static bool ebt_nflog_check(const char *tablename,
index d2076f4227cd90650e214c541ceae9f7f19ad5b6..7bf1390ad97bb3ace030ebf923211e6c036d72ae 100644 (file)
@@ -15,7 +15,8 @@
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_redirect.h>
 
-static int ebt_target_redirect(struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_target_redirect(struct sk_buff *skb,
+   unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
index 5a5a16acca00982c7705dae9fd3ee0197814871c..d13f05d2620efe4b3bee01c69268f9f24ea2f16b 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_nat.h>
 
-static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
index e13a005f58ad361fd945dc69e2a259b9ca56ab5b..5f86f555f6d144d5ba30c71a5d49ec034a849cf8 100644 (file)
@@ -246,13 +246,14 @@ static void ebt_log_packet(u_int8_t pf, unsigned int hooknum,
        ebt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix);
 }
 
-static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+static unsigned int ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
    const void *data, unsigned int datalen)
 {
        const struct ebt_ulog_info *uloginfo = data;
 
        ebt_ulog_packet(hooknr, skb, in, out, uloginfo, NULL);
+       return EBT_CONTINUE;
 }
 
 static bool ebt_ulog_check(const char *tablename, unsigned int hookmask,