mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-21 12:07:46 +00:00
[NET] BRIDGE: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8e87d14255
commit
9d6f229fc4
@@ -5,7 +5,7 @@
|
||||
* Chris Vitale csv@bluetail.com
|
||||
*
|
||||
* May 2003
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/netfilter_bridge/ebtables.h>
|
||||
@@ -20,7 +20,7 @@ static int ebt_filter_802_3(const struct sk_buff *skb, const struct net_device *
|
||||
__be16 type = hdr->llc.ui.ctrl & IS_UI ? hdr->llc.ui.type : hdr->llc.ni.type;
|
||||
|
||||
if (info->bitmask & EBT_802_3_SAP) {
|
||||
if (FWINV(info->sap != hdr->llc.ui.ssap, EBT_802_3_SAP))
|
||||
if (FWINV(info->sap != hdr->llc.ui.ssap, EBT_802_3_SAP))
|
||||
return EBT_NOMATCH;
|
||||
if (FWINV(info->sap != hdr->llc.ui.dsap, EBT_802_3_SAP))
|
||||
return EBT_NOMATCH;
|
||||
@@ -29,7 +29,7 @@ static int ebt_filter_802_3(const struct sk_buff *skb, const struct net_device *
|
||||
if (info->bitmask & EBT_802_3_TYPE) {
|
||||
if (!(hdr->llc.ui.dsap == CHECK_TYPE && hdr->llc.ui.ssap == CHECK_TYPE))
|
||||
return EBT_NOMATCH;
|
||||
if (FWINV(info->type != type, EBT_802_3_TYPE))
|
||||
if (FWINV(info->type != type, EBT_802_3_TYPE))
|
||||
return EBT_NOMATCH;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ static int ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
|
||||
const char *mac, __be32 ip)
|
||||
{
|
||||
/* You may be puzzled as to how this code works.
|
||||
* Some tricks were used, refer to
|
||||
* Some tricks were used, refer to
|
||||
* include/linux/netfilter_bridge/ebt_among.h
|
||||
* as there you can find a solution of this mystery.
|
||||
*/
|
||||
@@ -207,8 +207,8 @@ static int ebt_among_check(const char *tablename, unsigned int hookmask,
|
||||
}
|
||||
|
||||
static struct ebt_match filter_among = {
|
||||
.name = EBT_AMONG_MATCH,
|
||||
.match = ebt_filter_among,
|
||||
.name = EBT_AMONG_MATCH,
|
||||
.match = ebt_filter_among,
|
||||
.check = ebt_among_check,
|
||||
.me = THIS_MODULE,
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ static int ebt_target_reply(struct sk_buff **pskb, unsigned int hooknr,
|
||||
return EBT_DROP;
|
||||
|
||||
arp_send(ARPOP_REPLY, ETH_P_ARP, *siptr, (struct net_device *)in,
|
||||
*diptr, shp, info->mac, shp);
|
||||
*diptr, shp, info->mac, shp);
|
||||
|
||||
return info->target;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,10 +169,10 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
|
||||
|
||||
if (info->bitmask & EBT_LOG_NFLOG)
|
||||
nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
|
||||
"%s", info->prefix);
|
||||
"%s", info->prefix);
|
||||
else
|
||||
ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
|
||||
info->prefix);
|
||||
info->prefix);
|
||||
}
|
||||
|
||||
static struct ebt_watcher log =
|
||||
@@ -199,7 +199,7 @@ static int __init ebt_log_init(void)
|
||||
if (nf_log_register(PF_BRIDGE, &ebt_log_logger) < 0) {
|
||||
printk(KERN_WARNING "ebt_log: not logging via system console "
|
||||
"since somebody else already registered for PF_INET\n");
|
||||
/* we cannot make module load fail here, since otherwise
|
||||
/* we cannot make module load fail here, since otherwise
|
||||
* ebtables userspace would abort */
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ static int ebt_filter_mark(const struct sk_buff *skb,
|
||||
static int ebt_mark_check(const char *tablename, unsigned int hookmask,
|
||||
const struct ebt_entry *e, void *data, unsigned int datalen)
|
||||
{
|
||||
struct ebt_mark_m_info *info = (struct ebt_mark_m_info *) data;
|
||||
struct ebt_mark_m_info *info = (struct ebt_mark_m_info *) data;
|
||||
|
||||
if (datalen != EBT_ALIGN(sizeof(struct ebt_mark_m_info)))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -62,7 +62,7 @@ static int ebt_filter_config(struct ebt_stp_info *info,
|
||||
verdict = 0;
|
||||
for (i = 0; i < 6; i++)
|
||||
verdict |= (stpc->root[2+i] ^ c->root_addr[i]) &
|
||||
c->root_addrmsk[i];
|
||||
c->root_addrmsk[i];
|
||||
if (FWINV(verdict != 0, EBT_STP_ROOTADDR))
|
||||
return EBT_NOMATCH;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ static int ebt_filter_config(struct ebt_stp_info *info,
|
||||
verdict = 0;
|
||||
for (i = 0; i < 6; i++)
|
||||
verdict |= (stpc->sender[2+i] ^ c->sender_addr[i]) &
|
||||
c->sender_addrmsk[i];
|
||||
c->sender_addrmsk[i];
|
||||
if (FWINV(verdict != 0, EBT_STP_SENDERADDR))
|
||||
return EBT_NOMATCH;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* Based on ipt_ULOG.c, which is
|
||||
* (C) 2000-2002 by Harald Welte <laforge@netfilter.org>
|
||||
*
|
||||
* This module accepts two parameters:
|
||||
*
|
||||
* This module accepts two parameters:
|
||||
*
|
||||
* nlbufsiz:
|
||||
* The parameter specifies how big the buffer for each netlink multicast
|
||||
* group is. e.g. If you say nlbufsiz=8192, up to eight kb of packets will
|
||||
@@ -43,17 +43,17 @@
|
||||
#include "../br_private.h"
|
||||
|
||||
#define PRINTR(format, args...) do { if (net_ratelimit()) \
|
||||
printk(format , ## args); } while (0)
|
||||
printk(format , ## args); } while (0)
|
||||
|
||||
static unsigned int nlbufsiz = NLMSG_GOODSIZE;
|
||||
module_param(nlbufsiz, uint, 0600);
|
||||
MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) "
|
||||
"(defaults to 4096)");
|
||||
"(defaults to 4096)");
|
||||
|
||||
static unsigned int flushtimeout = 10;
|
||||
module_param(flushtimeout, uint, 0600);
|
||||
MODULE_PARM_DESC(flushtimeout, "buffer flush timeout (hundredths ofa second) "
|
||||
"(defaults to 10)");
|
||||
"(defaults to 10)");
|
||||
|
||||
typedef struct {
|
||||
unsigned int qlen; /* number of nlmsgs' in the skb */
|
||||
@@ -157,7 +157,7 @@ static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb,
|
||||
}
|
||||
|
||||
nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, 0,
|
||||
size - NLMSG_ALIGN(sizeof(*nlh)));
|
||||
size - NLMSG_ALIGN(sizeof(*nlh)));
|
||||
ub->qlen++;
|
||||
|
||||
pm = NLMSG_DATA(nlh);
|
||||
@@ -302,7 +302,7 @@ static int __init ebt_ulog_init(void)
|
||||
}
|
||||
|
||||
ebtulognl = netlink_kernel_create(NETLINK_NFLOG, EBT_ULOG_MAXNLGROUPS,
|
||||
NULL, THIS_MODULE);
|
||||
NULL, THIS_MODULE);
|
||||
if (!ebtulognl)
|
||||
ret = -ENOMEM;
|
||||
else if ((ret = ebt_register_watcher(&ulog)))
|
||||
@@ -344,4 +344,4 @@ module_exit(ebt_ulog_fini);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
|
||||
MODULE_DESCRIPTION("ebtables userspace logging module for bridged Ethernet"
|
||||
" frames");
|
||||
" frames");
|
||||
|
||||
@@ -128,9 +128,9 @@ ebt_check_vlan(const char *tablename,
|
||||
|
||||
/* Reserved VLAN ID (VID) values
|
||||
* -----------------------------
|
||||
* 0 - The null VLAN ID.
|
||||
* 0 - The null VLAN ID.
|
||||
* 1 - The default Port VID (PVID)
|
||||
* 0x0FFF - Reserved for implementation use.
|
||||
* 0x0FFF - Reserved for implementation use.
|
||||
* if_vlan.h: VLAN_GROUP_ARRAY_LEN 4096. */
|
||||
if (GET_BITMASK(EBT_VLAN_ID)) {
|
||||
if (!!info->id) { /* if id!=0 => check vid range */
|
||||
@@ -141,7 +141,7 @@ ebt_check_vlan(const char *tablename,
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Note: This is valid VLAN-tagged frame point.
|
||||
* Any value of user_priority are acceptable,
|
||||
* Any value of user_priority are acceptable,
|
||||
* but should be ignored according to 802.1Q Std.
|
||||
* So we just drop the prio flag. */
|
||||
info->bitmask &= ~EBT_VLAN_PRIO;
|
||||
|
||||
@@ -51,10 +51,10 @@ static int check(const struct ebt_table_info *info, unsigned int valid_hooks)
|
||||
}
|
||||
|
||||
static struct ebt_table frame_filter =
|
||||
{
|
||||
{
|
||||
.name = "filter",
|
||||
.table = &initial_table,
|
||||
.valid_hooks = FILTER_VALID_HOOKS,
|
||||
.valid_hooks = FILTER_VALID_HOOKS,
|
||||
.lock = RW_LOCK_UNLOCKED,
|
||||
.check = check,
|
||||
.me = THIS_MODULE,
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "../br_private.h"
|
||||
|
||||
#define BUGPRINT(format, args...) printk("kernel msg: ebtables bug: please "\
|
||||
"report to author: "format, ## args)
|
||||
"report to author: "format, ## args)
|
||||
/* #define BUGPRINT(format, args...) */
|
||||
#define MEMPRINT(format, args...) printk("kernel msg: ebtables "\
|
||||
": out of memory: "format, ## args)
|
||||
": out of memory: "format, ## args)
|
||||
/* #define MEMPRINT(format, args...) */
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@ ebt_check_entry_size_and_hooks(struct ebt_entry *e,
|
||||
as it said it has */
|
||||
if (*n != *cnt) {
|
||||
BUGPRINT("nentries does not equal the nr of entries "
|
||||
"in the chain\n");
|
||||
"in the chain\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (((struct ebt_entries *)e)->policy != EBT_DROP &&
|
||||
@@ -809,7 +809,7 @@ static int translate_table(char *name, struct ebt_table_info *newinfo)
|
||||
i = 0; /* holds the expected nr. of entries for the chain */
|
||||
j = 0; /* holds the up to now counted entries for the chain */
|
||||
k = 0; /* holds the total nr. of entries, should equal
|
||||
newinfo->nentries afterwards */
|
||||
newinfo->nentries afterwards */
|
||||
udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */
|
||||
ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
|
||||
ebt_check_entry_size_and_hooks, newinfo,
|
||||
@@ -820,7 +820,7 @@ static int translate_table(char *name, struct ebt_table_info *newinfo)
|
||||
|
||||
if (i != j) {
|
||||
BUGPRINT("nentries does not equal the nr of entries in the "
|
||||
"(last) chain\n");
|
||||
"(last) chain\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (k != newinfo->nentries) {
|
||||
@@ -835,7 +835,7 @@ static int translate_table(char *name, struct ebt_table_info *newinfo)
|
||||
if an error occurs */
|
||||
newinfo->chainstack =
|
||||
vmalloc((highest_possible_processor_id()+1)
|
||||
* sizeof(*(newinfo->chainstack)));
|
||||
* sizeof(*(newinfo->chainstack)));
|
||||
if (!newinfo->chainstack)
|
||||
return -ENOMEM;
|
||||
for_each_possible_cpu(i) {
|
||||
@@ -948,7 +948,7 @@ static int do_replace(void __user *user, unsigned int len)
|
||||
if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
|
||||
return -ENOMEM;
|
||||
|
||||
countersize = COUNTER_OFFSET(tmp.nentries) *
|
||||
countersize = COUNTER_OFFSET(tmp.nentries) *
|
||||
(highest_possible_processor_id()+1);
|
||||
newinfo = vmalloc(sizeof(*newinfo) + countersize);
|
||||
if (!newinfo)
|
||||
@@ -1350,7 +1350,7 @@ static inline int ebt_make_names(struct ebt_entry *e, char *base, char __user *u
|
||||
|
||||
hlp = ubase + (((char *)e + e->target_offset) - base);
|
||||
t = (struct ebt_entry_target *)(((char *)e) + e->target_offset);
|
||||
|
||||
|
||||
ret = EBT_MATCH_ITERATE(e, ebt_make_matchname, base, ubase);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user