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 core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
bridge
/
netfilter
/
ebt_among.c
diff --git
a/net/bridge/netfilter/ebt_among.c
b/net/bridge/netfilter/ebt_among.c
index
5a1f5e3
..
ce97c42
100644
(file)
--- a/
net/bridge/netfilter/ebt_among.c
+++ b/
net/bridge/netfilter/ebt_among.c
@@
-15,7
+15,7
@@
#include <linux/module.h>
static int ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
#include <linux/module.h>
static int ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
- const char *mac,
uint32_t
ip)
+ const char *mac,
__be32
ip)
{
/* You may be puzzled as to how this code works.
* Some tricks were used, refer to
{
/* You may be puzzled as to how this code works.
* Some tricks were used, refer to
@@
-70,7
+70,7
@@
static int ebt_mac_wormhash_check_integrity(const struct ebt_mac_wormhash
return 0;
}
return 0;
}
-static int get_ip_dst(const struct sk_buff *skb,
uint32_t
*addr)
+static int get_ip_dst(const struct sk_buff *skb,
__be32
*addr)
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
struct iphdr _iph, *ih;
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
struct iphdr _iph, *ih;
@@
-81,16
+81,16
@@
static int get_ip_dst(const struct sk_buff *skb, uint32_t *addr)
*addr = ih->daddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
struct arphdr _arph, *ah;
*addr = ih->daddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
struct arphdr _arph, *ah;
-
uint32_t
buf, *bp;
+
__be32
buf, *bp;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
- ah->ar_pln != sizeof(
uint32_t
) ||
+ ah->ar_pln != sizeof(
__be32
) ||
ah->ar_hln != ETH_ALEN)
return -1;
bp = skb_header_pointer(skb, sizeof(struct arphdr) +
ah->ar_hln != ETH_ALEN)
return -1;
bp = skb_header_pointer(skb, sizeof(struct arphdr) +
- 2 * ETH_ALEN + sizeof(
uint32_t
),
- sizeof(
uint32_t
), &buf);
+ 2 * ETH_ALEN + sizeof(
__be32
),
+ sizeof(
__be32
), &buf);
if (bp == NULL)
return -1;
*addr = *bp;
if (bp == NULL)
return -1;
*addr = *bp;
@@
-98,7
+98,7
@@
static int get_ip_dst(const struct sk_buff *skb, uint32_t *addr)
return 0;
}
return 0;
}
-static int get_ip_src(const struct sk_buff *skb,
uint32_t
*addr)
+static int get_ip_src(const struct sk_buff *skb,
__be32
*addr)
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
struct iphdr _iph, *ih;
{
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
struct iphdr _iph, *ih;
@@
-109,15
+109,15
@@
static int get_ip_src(const struct sk_buff *skb, uint32_t *addr)
*addr = ih->saddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
struct arphdr _arph, *ah;
*addr = ih->saddr;
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
struct arphdr _arph, *ah;
-
uint32_t
buf, *bp;
+
__be32
buf, *bp;
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
if (ah == NULL ||
- ah->ar_pln != sizeof(
uint32_t
) ||
+ ah->ar_pln != sizeof(
__be32
) ||
ah->ar_hln != ETH_ALEN)
return -1;
bp = skb_header_pointer(skb, sizeof(struct arphdr) +
ah->ar_hln != ETH_ALEN)
return -1;
bp = skb_header_pointer(skb, sizeof(struct arphdr) +
- ETH_ALEN, sizeof(
uint32_t
), &buf);
+ ETH_ALEN, sizeof(
__be32
), &buf);
if (bp == NULL)
return -1;
*addr = *bp;
if (bp == NULL)
return -1;
*addr = *bp;
@@
-133,7
+133,7
@@
static int ebt_filter_among(const struct sk_buff *skb,
struct ebt_among_info *info = (struct ebt_among_info *) data;
const char *dmac, *smac;
const struct ebt_mac_wormhash *wh_dst, *wh_src;
struct ebt_among_info *info = (struct ebt_among_info *) data;
const char *dmac, *smac;
const struct ebt_mac_wormhash *wh_dst, *wh_src;
-
uint32_t
dip = 0, sip = 0;
+
__be32
dip = 0, sip = 0;
wh_dst = ebt_among_wh_dst(info);
wh_src = ebt_among_wh_src(info);
wh_dst = ebt_among_wh_dst(info);
wh_src = ebt_among_wh_src(info);
@@
-213,16
+213,16
@@
static struct ebt_match filter_among = {
.me = THIS_MODULE,
};
.me = THIS_MODULE,
};
-static int __init init(void)
+static int __init
ebt_among_
init(void)
{
return ebt_register_match(&filter_among);
}
{
return ebt_register_match(&filter_among);
}
-static void __exit fini(void)
+static void __exit
ebt_among_
fini(void)
{
ebt_unregister_match(&filter_among);
}
{
ebt_unregister_match(&filter_among);
}
-module_init(init);
-module_exit(fini);
+module_init(
ebt_among_
init);
+module_exit(
ebt_among_
fini);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");