X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fbridge%2Fnetfilter%2Febt_ip.c;h=69f7f0ab9c76ae5fa5d4cdd7ef2264417a675ba3;hb=a887c1c148ffb3eb1c193e9869ca5297c6e22078;hp=dc5d0b2427cf4c359aa0eb961b9108808db8cfbc;hpb=10379a25fee8ddc8698d2f6c54ccedd4664c2941;p=mv-sheeva.git diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c index dc5d0b2427c..69f7f0ab9c7 100644 --- a/net/bridge/netfilter/ebt_ip.c +++ b/net/bridge/netfilter/ebt_ip.c @@ -20,8 +20,8 @@ #include struct tcpudphdr { - uint16_t src; - uint16_t dst; + __be16 src; + __be16 dst; }; static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in, @@ -61,15 +61,15 @@ static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in, if (info->bitmask & EBT_IP_DPORT) { u32 dst = ntohs(pptr->dst); if (FWINV(dst < info->dport[0] || - dst > info->dport[1], - EBT_IP_DPORT)) + dst > info->dport[1], + EBT_IP_DPORT)) return EBT_NOMATCH; } if (info->bitmask & EBT_IP_SPORT) { u32 src = ntohs(pptr->src); if (FWINV(src < info->sport[0] || - src > info->sport[1], - EBT_IP_SPORT)) + src > info->sport[1], + EBT_IP_SPORT)) return EBT_NOMATCH; } } @@ -93,6 +93,7 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask, return -EINVAL; if (info->protocol != IPPROTO_TCP && info->protocol != IPPROTO_UDP && + info->protocol != IPPROTO_UDPLITE && info->protocol != IPPROTO_SCTP && info->protocol != IPPROTO_DCCP) return -EINVAL; @@ -112,16 +113,16 @@ static struct ebt_match filter_ip = .me = THIS_MODULE, }; -static int __init init(void) +static int __init ebt_ip_init(void) { return ebt_register_match(&filter_ip); } -static void __exit fini(void) +static void __exit ebt_ip_fini(void) { ebt_unregister_match(&filter_ip); } -module_init(init); -module_exit(fini); +module_init(ebt_ip_init); +module_exit(ebt_ip_fini); MODULE_LICENSE("GPL");