[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
@@ -178,12 +178,12 @@ void br_dev_setup(struct net_device *dev)
|
||||
dev->change_mtu = br_change_mtu;
|
||||
dev->destructor = free_netdev;
|
||||
SET_MODULE_OWNER(dev);
|
||||
SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
|
||||
SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
|
||||
dev->stop = br_dev_stop;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->set_mac_address = br_set_mac_address;
|
||||
dev->priv_flags = IFF_EBRIDGE;
|
||||
|
||||
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
|
||||
NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST;
|
||||
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
|
||||
NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST;
|
||||
}
|
||||
|
@@ -317,7 +317,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
|
||||
"as a received packet\n",
|
||||
source->dev->name);
|
||||
fdb_delete(fdb);
|
||||
}
|
||||
}
|
||||
|
||||
if (!fdb_create(head, source, addr, 1))
|
||||
return -ENOMEM;
|
||||
|
@@ -191,7 +191,7 @@ static void del_br(struct net_bridge *br)
|
||||
del_timer_sync(&br->gc_timer);
|
||||
|
||||
br_sysfs_delbr(br->dev);
|
||||
unregister_netdevice(br->dev);
|
||||
unregister_netdevice(br->dev);
|
||||
}
|
||||
|
||||
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);
|
||||
p->dev = dev;
|
||||
p->path_cost = port_cost(dev);
|
||||
p->priority = 0x8000 >> BR_PORT_BITS;
|
||||
p->priority = 0x8000 >> BR_PORT_BITS;
|
||||
p->port_no = index;
|
||||
br_init_port(p);
|
||||
p->state = BR_STATE_DISABLED;
|
||||
@@ -428,7 +428,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
|
||||
if (err)
|
||||
goto err0;
|
||||
|
||||
err = br_fdb_insert(br, p, dev->dev_addr);
|
||||
err = br_fdb_insert(br, p, dev->dev_addr);
|
||||
if (err)
|
||||
goto err1;
|
||||
|
||||
|
@@ -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.topology_change_timer_value = br_timer_value(&br->topology_change_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)))
|
||||
return -EFAULT;
|
||||
|
@@ -68,7 +68,7 @@ static __be16 inline vlan_proto(const struct sk_buff *skb)
|
||||
|
||||
#define IS_VLAN_IP(skb) \
|
||||
(skb->protocol == htons(ETH_P_8021Q) && \
|
||||
vlan_proto(skb) == htons(ETH_P_IP) && \
|
||||
vlan_proto(skb) == htons(ETH_P_IP) && \
|
||||
brnf_filter_vlan_tagged)
|
||||
|
||||
#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)
|
||||
{
|
||||
int header_size = ETH_HLEN;
|
||||
int header_size = ETH_HLEN;
|
||||
|
||||
if (skb->protocol == htons(ETH_P_8021Q))
|
||||
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 err;
|
||||
int header_size = ETH_HLEN;
|
||||
int header_size = ETH_HLEN;
|
||||
|
||||
if (skb->protocol == htons(ETH_P_8021Q))
|
||||
header_size += VLAN_HLEN;
|
||||
|
@@ -203,7 +203,7 @@ extern void br_netfilter_fini(void);
|
||||
/* br_stp.c */
|
||||
extern void br_log_state(const struct net_bridge_port *p);
|
||||
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_become_designated_port(struct net_bridge_port *p);
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define LLC_RESERVE sizeof(struct llc_pdu_un)
|
||||
|
||||
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;
|
||||
|
||||
|
@@ -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 =
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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");
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user