[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:
YOSHIFUJI Hideaki
2007-02-09 23:24:35 +09:00
committed by David S. Miller
parent 8e87d14255
commit 9d6f229fc4
25 changed files with 128 additions and 128 deletions

View File

@@ -178,12 +178,12 @@ void br_dev_setup(struct net_device *dev)
dev->change_mtu = br_change_mtu; dev->change_mtu = br_change_mtu;
dev->destructor = free_netdev; dev->destructor = free_netdev;
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_ETHTOOL_OPS(dev, &br_ethtool_ops); SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
dev->stop = br_dev_stop; dev->stop = br_dev_stop;
dev->tx_queue_len = 0; dev->tx_queue_len = 0;
dev->set_mac_address = br_set_mac_address; dev->set_mac_address = br_set_mac_address;
dev->priv_flags = IFF_EBRIDGE; dev->priv_flags = IFF_EBRIDGE;
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST; NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST;
} }

View File

@@ -317,7 +317,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
"as a received packet\n", "as a received packet\n",
source->dev->name); source->dev->name);
fdb_delete(fdb); fdb_delete(fdb);
} }
if (!fdb_create(head, source, addr, 1)) if (!fdb_create(head, source, addr, 1))
return -ENOMEM; return -ENOMEM;

View File

@@ -191,7 +191,7 @@ static void del_br(struct net_bridge *br)
del_timer_sync(&br->gc_timer); del_timer_sync(&br->gc_timer);
br_sysfs_delbr(br->dev); br_sysfs_delbr(br->dev);
unregister_netdevice(br->dev); unregister_netdevice(br->dev);
} }
static struct net_device *new_bridge_dev(const char *name) static struct net_device *new_bridge_dev(const char *name)
@@ -276,7 +276,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
dev_hold(dev); dev_hold(dev);
p->dev = dev; p->dev = dev;
p->path_cost = port_cost(dev); p->path_cost = port_cost(dev);
p->priority = 0x8000 >> BR_PORT_BITS; p->priority = 0x8000 >> BR_PORT_BITS;
p->port_no = index; p->port_no = index;
br_init_port(p); br_init_port(p);
p->state = BR_STATE_DISABLED; p->state = BR_STATE_DISABLED;
@@ -428,7 +428,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
if (err) if (err)
goto err0; goto err0;
err = br_fdb_insert(br, p, dev->dev_addr); err = br_fdb_insert(br, p, dev->dev_addr);
if (err) if (err)
goto err1; goto err1;

View File

@@ -143,7 +143,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
b.tcn_timer_value = br_timer_value(&br->tcn_timer); b.tcn_timer_value = br_timer_value(&br->tcn_timer);
b.topology_change_timer_value = br_timer_value(&br->topology_change_timer); b.topology_change_timer_value = br_timer_value(&br->topology_change_timer);
b.gc_timer_value = br_timer_value(&br->gc_timer); b.gc_timer_value = br_timer_value(&br->gc_timer);
rcu_read_unlock(); rcu_read_unlock();
if (copy_to_user((void __user *)args[1], &b, sizeof(b))) if (copy_to_user((void __user *)args[1], &b, sizeof(b)))
return -EFAULT; return -EFAULT;

View File

@@ -68,7 +68,7 @@ static __be16 inline vlan_proto(const struct sk_buff *skb)
#define IS_VLAN_IP(skb) \ #define IS_VLAN_IP(skb) \
(skb->protocol == htons(ETH_P_8021Q) && \ (skb->protocol == htons(ETH_P_8021Q) && \
vlan_proto(skb) == htons(ETH_P_IP) && \ vlan_proto(skb) == htons(ETH_P_IP) && \
brnf_filter_vlan_tagged) brnf_filter_vlan_tagged)
#define IS_VLAN_IPV6(skb) \ #define IS_VLAN_IPV6(skb) \
@@ -124,7 +124,7 @@ static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb)
static inline void nf_bridge_save_header(struct sk_buff *skb) static inline void nf_bridge_save_header(struct sk_buff *skb)
{ {
int header_size = ETH_HLEN; int header_size = ETH_HLEN;
if (skb->protocol == htons(ETH_P_8021Q)) if (skb->protocol == htons(ETH_P_8021Q))
header_size += VLAN_HLEN; header_size += VLAN_HLEN;
@@ -139,7 +139,7 @@ static inline void nf_bridge_save_header(struct sk_buff *skb)
int nf_bridge_copy_header(struct sk_buff *skb) int nf_bridge_copy_header(struct sk_buff *skb)
{ {
int err; int err;
int header_size = ETH_HLEN; int header_size = ETH_HLEN;
if (skb->protocol == htons(ETH_P_8021Q)) if (skb->protocol == htons(ETH_P_8021Q))
header_size += VLAN_HLEN; header_size += VLAN_HLEN;

View File

@@ -203,7 +203,7 @@ extern void br_netfilter_fini(void);
/* br_stp.c */ /* br_stp.c */
extern void br_log_state(const struct net_bridge_port *p); extern void br_log_state(const struct net_bridge_port *p);
extern struct net_bridge_port *br_get_port(struct net_bridge *br, extern struct net_bridge_port *br_get_port(struct net_bridge *br,
u16 port_no); u16 port_no);
extern void br_init_port(struct net_bridge_port *p); extern void br_init_port(struct net_bridge_port *p);
extern void br_become_designated_port(struct net_bridge_port *p); extern void br_become_designated_port(struct net_bridge_port *p);

View File

@@ -29,7 +29,7 @@
#define LLC_RESERVE sizeof(struct llc_pdu_un) #define LLC_RESERVE sizeof(struct llc_pdu_un)
static void br_send_bpdu(struct net_bridge_port *p, static void br_send_bpdu(struct net_bridge_port *p,
const unsigned char *data, int length) const unsigned char *data, int length)
{ {
struct sk_buff *skb; struct sk_buff *skb;

View File

@@ -51,7 +51,7 @@ static int ebt_target_reply(struct sk_buff **pskb, unsigned int hooknr,
return EBT_DROP; return EBT_DROP;
arp_send(ARPOP_REPLY, ETH_P_ARP, *siptr, (struct net_device *)in, 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; return info->target;
} }

View File

@@ -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) { if (info->bitmask & EBT_IP_DPORT) {
u32 dst = ntohs(pptr->dst); u32 dst = ntohs(pptr->dst);
if (FWINV(dst < info->dport[0] || if (FWINV(dst < info->dport[0] ||
dst > info->dport[1], dst > info->dport[1],
EBT_IP_DPORT)) EBT_IP_DPORT))
return EBT_NOMATCH; return EBT_NOMATCH;
} }
if (info->bitmask & EBT_IP_SPORT) { if (info->bitmask & EBT_IP_SPORT) {
u32 src = ntohs(pptr->src); u32 src = ntohs(pptr->src);
if (FWINV(src < info->sport[0] || if (FWINV(src < info->sport[0] ||
src > info->sport[1], src > info->sport[1],
EBT_IP_SPORT)) EBT_IP_SPORT))
return EBT_NOMATCH; return EBT_NOMATCH;
} }
} }

View File

@@ -169,10 +169,10 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
if (info->bitmask & EBT_LOG_NFLOG) if (info->bitmask & EBT_LOG_NFLOG)
nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
"%s", info->prefix); "%s", info->prefix);
else else
ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
info->prefix); info->prefix);
} }
static struct ebt_watcher log = static struct ebt_watcher log =

View File

@@ -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, static int ebt_mark_check(const char *tablename, unsigned int hookmask,
const struct ebt_entry *e, void *data, unsigned int datalen) 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))) if (datalen != EBT_ALIGN(sizeof(struct ebt_mark_m_info)))
return -EINVAL; return -EINVAL;

View File

@@ -62,7 +62,7 @@ static int ebt_filter_config(struct ebt_stp_info *info,
verdict = 0; verdict = 0;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
verdict |= (stpc->root[2+i] ^ c->root_addr[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)) if (FWINV(verdict != 0, EBT_STP_ROOTADDR))
return EBT_NOMATCH; return EBT_NOMATCH;
} }
@@ -82,7 +82,7 @@ static int ebt_filter_config(struct ebt_stp_info *info,
verdict = 0; verdict = 0;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
verdict |= (stpc->sender[2+i] ^ c->sender_addr[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)) if (FWINV(verdict != 0, EBT_STP_SENDERADDR))
return EBT_NOMATCH; return EBT_NOMATCH;
} }

View File

@@ -43,17 +43,17 @@
#include "../br_private.h" #include "../br_private.h"
#define PRINTR(format, args...) do { if (net_ratelimit()) \ #define PRINTR(format, args...) do { if (net_ratelimit()) \
printk(format , ## args); } while (0) printk(format , ## args); } while (0)
static unsigned int nlbufsiz = NLMSG_GOODSIZE; static unsigned int nlbufsiz = NLMSG_GOODSIZE;
module_param(nlbufsiz, uint, 0600); module_param(nlbufsiz, uint, 0600);
MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) " MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) "
"(defaults to 4096)"); "(defaults to 4096)");
static unsigned int flushtimeout = 10; static unsigned int flushtimeout = 10;
module_param(flushtimeout, uint, 0600); module_param(flushtimeout, uint, 0600);
MODULE_PARM_DESC(flushtimeout, "buffer flush timeout (hundredths ofa second) " MODULE_PARM_DESC(flushtimeout, "buffer flush timeout (hundredths ofa second) "
"(defaults to 10)"); "(defaults to 10)");
typedef struct { typedef struct {
unsigned int qlen; /* number of nlmsgs' in the skb */ 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, nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, 0,
size - NLMSG_ALIGN(sizeof(*nlh))); size - NLMSG_ALIGN(sizeof(*nlh)));
ub->qlen++; ub->qlen++;
pm = NLMSG_DATA(nlh); pm = NLMSG_DATA(nlh);
@@ -302,7 +302,7 @@ static int __init ebt_ulog_init(void)
} }
ebtulognl = netlink_kernel_create(NETLINK_NFLOG, EBT_ULOG_MAXNLGROUPS, ebtulognl = netlink_kernel_create(NETLINK_NFLOG, EBT_ULOG_MAXNLGROUPS,
NULL, THIS_MODULE); NULL, THIS_MODULE);
if (!ebtulognl) if (!ebtulognl)
ret = -ENOMEM; ret = -ENOMEM;
else if ((ret = ebt_register_watcher(&ulog))) else if ((ret = ebt_register_watcher(&ulog)))
@@ -344,4 +344,4 @@ module_exit(ebt_ulog_fini);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>"); MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
MODULE_DESCRIPTION("ebtables userspace logging module for bridged Ethernet" MODULE_DESCRIPTION("ebtables userspace logging module for bridged Ethernet"
" frames"); " frames");

View File

@@ -33,10 +33,10 @@
#include "../br_private.h" #include "../br_private.h"
#define BUGPRINT(format, args...) printk("kernel msg: ebtables bug: please "\ #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 BUGPRINT(format, args...) */
#define MEMPRINT(format, args...) printk("kernel msg: ebtables "\ #define MEMPRINT(format, args...) printk("kernel msg: ebtables "\
": out of memory: "format, ## args) ": out of memory: "format, ## args)
/* #define MEMPRINT(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 */ as it said it has */
if (*n != *cnt) { if (*n != *cnt) {
BUGPRINT("nentries does not equal the nr of entries " BUGPRINT("nentries does not equal the nr of entries "
"in the chain\n"); "in the chain\n");
return -EINVAL; return -EINVAL;
} }
if (((struct ebt_entries *)e)->policy != EBT_DROP && 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 */ i = 0; /* holds the expected nr. of entries for the chain */
j = 0; /* holds the up to now counted 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 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) */ udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */
ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size, ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_check_entry_size_and_hooks, newinfo, 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) { if (i != j) {
BUGPRINT("nentries does not equal the nr of entries in the " BUGPRINT("nentries does not equal the nr of entries in the "
"(last) chain\n"); "(last) chain\n");
return -EINVAL; return -EINVAL;
} }
if (k != newinfo->nentries) { if (k != newinfo->nentries) {
@@ -835,7 +835,7 @@ static int translate_table(char *name, struct ebt_table_info *newinfo)
if an error occurs */ if an error occurs */
newinfo->chainstack = newinfo->chainstack =
vmalloc((highest_possible_processor_id()+1) vmalloc((highest_possible_processor_id()+1)
* sizeof(*(newinfo->chainstack))); * sizeof(*(newinfo->chainstack)));
if (!newinfo->chainstack) if (!newinfo->chainstack)
return -ENOMEM; return -ENOMEM;
for_each_possible_cpu(i) { for_each_possible_cpu(i) {