~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to net/bridge/netfilter/ebt_arpreply.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <linux/netfilter_bridge/ebt_arpreply.h>
17
17
 
18
18
static unsigned int
19
 
ebt_arpreply_tg(struct sk_buff *skb, const struct xt_target_param *par)
 
19
ebt_arpreply_tg(struct sk_buff *skb, const struct xt_action_param *par)
20
20
{
21
21
        const struct ebt_arpreply_info *info = par->targinfo;
22
22
        const __be32 *siptr, *diptr;
57
57
        return info->target;
58
58
}
59
59
 
60
 
static bool ebt_arpreply_tg_check(const struct xt_tgchk_param *par)
 
60
static int ebt_arpreply_tg_check(const struct xt_tgchk_param *par)
61
61
{
62
62
        const struct ebt_arpreply_info *info = par->targinfo;
63
63
        const struct ebt_entry *e = par->entryinfo;
64
64
 
65
65
        if (BASE_CHAIN && info->target == EBT_RETURN)
66
 
                return false;
 
66
                return -EINVAL;
67
67
        if (e->ethproto != htons(ETH_P_ARP) ||
68
68
            e->invflags & EBT_IPROTO)
69
 
                return false;
70
 
        return true;
 
69
                return -EINVAL;
 
70
        return 0;
71
71
}
72
72
 
73
73
static struct xt_target ebt_arpreply_tg_reg __read_mostly = {
78
78
        .hooks          = (1 << NF_BR_NUMHOOKS) | (1 << NF_BR_PRE_ROUTING),
79
79
        .target         = ebt_arpreply_tg,
80
80
        .checkentry     = ebt_arpreply_tg_check,
81
 
        .targetsize     = XT_ALIGN(sizeof(struct ebt_arpreply_info)),
 
81
        .targetsize     = sizeof(struct ebt_arpreply_info),
82
82
        .me             = THIS_MODULE,
83
83
};
84
84