Commit 9d6f229f authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller
Browse files

[NET] BRIDGE: Fix whitespace errors.


Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e87d142
...@@ -40,7 +40,7 @@ int br_dev_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -40,7 +40,7 @@ int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
skb->mac.raw = skb->data; skb->mac.raw = skb->data;
skb_pull(skb, ETH_HLEN); skb_pull(skb, ETH_HLEN);
if (dest[0] & 1) if (dest[0] & 1)
br_flood_deliver(br, skb, 0); br_flood_deliver(br, skb, 0);
else if ((dst = __br_fdb_get(br, dest)) != NULL) else if ((dst = __br_fdb_get(br, dest)) != NULL)
br_deliver(dst->dst, skb); br_deliver(dst->dst, skb);
...@@ -178,12 +178,12 @@ void br_dev_setup(struct net_device *dev) ...@@ -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;
} }
...@@ -52,7 +52,7 @@ static __inline__ unsigned long hold_time(const struct net_bridge *br) ...@@ -52,7 +52,7 @@ static __inline__ unsigned long hold_time(const struct net_bridge *br)
static __inline__ int has_expired(const struct net_bridge *br, static __inline__ int has_expired(const struct net_bridge *br,
const struct net_bridge_fdb_entry *fdb) const struct net_bridge_fdb_entry *fdb)
{ {
return !fdb->is_static return !fdb->is_static
&& time_before_eq(fdb->ageing_timer + hold_time(br), jiffies); && time_before_eq(fdb->ageing_timer + hold_time(br), jiffies);
} }
...@@ -71,7 +71,7 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr) ...@@ -71,7 +71,7 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr)
{ {
struct net_bridge *br = p->br; struct net_bridge *br = p->br;
int i; int i;
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
/* Search all chains since old address/hash is unknown */ /* Search all chains since old address/hash is unknown */
...@@ -85,7 +85,7 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr) ...@@ -85,7 +85,7 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr)
/* maybe another port has same hw addr? */ /* maybe another port has same hw addr? */
struct net_bridge_port *op; struct net_bridge_port *op;
list_for_each_entry(op, &br->port_list, list) { list_for_each_entry(op, &br->port_list, list) {
if (op != p && if (op != p &&
!compare_ether_addr(op->dev->dev_addr, !compare_ether_addr(op->dev->dev_addr,
f->addr.addr)) { f->addr.addr)) {
f->dst = op; f->dst = op;
...@@ -118,8 +118,8 @@ void br_fdb_cleanup(unsigned long _data) ...@@ -118,8 +118,8 @@ void br_fdb_cleanup(unsigned long _data)
struct hlist_node *h, *n; struct hlist_node *h, *n;
hlist_for_each_entry_safe(f, h, n, &br->hash[i], hlist) { hlist_for_each_entry_safe(f, h, n, &br->hash[i], hlist) {
if (!f->is_static && if (!f->is_static &&
time_before_eq(f->ageing_timer + delay, jiffies)) time_before_eq(f->ageing_timer + delay, jiffies))
fdb_delete(f); fdb_delete(f);
} }
} }
...@@ -138,11 +138,11 @@ void br_fdb_delete_by_port(struct net_bridge *br, ...@@ -138,11 +138,11 @@ void br_fdb_delete_by_port(struct net_bridge *br,
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
for (i = 0; i < BR_HASH_SIZE; i++) { for (i = 0; i < BR_HASH_SIZE; i++) {
struct hlist_node *h, *g; struct hlist_node *h, *g;
hlist_for_each_safe(h, g, &br->hash[i]) { hlist_for_each_safe(h, g, &br->hash[i]) {
struct net_bridge_fdb_entry *f struct net_bridge_fdb_entry *f
= hlist_entry(h, struct net_bridge_fdb_entry, hlist); = hlist_entry(h, struct net_bridge_fdb_entry, hlist);
if (f->dst != p) if (f->dst != p)
continue; continue;
if (f->is_static && !do_all) if (f->is_static && !do_all)
...@@ -155,7 +155,7 @@ void br_fdb_delete_by_port(struct net_bridge *br, ...@@ -155,7 +155,7 @@ void br_fdb_delete_by_port(struct net_bridge *br,
if (f->is_local) { if (f->is_local) {
struct net_bridge_port *op; struct net_bridge_port *op;
list_for_each_entry(op, &br->port_list, list) { list_for_each_entry(op, &br->port_list, list) {
if (op != p && if (op != p &&
!compare_ether_addr(op->dev->dev_addr, !compare_ether_addr(op->dev->dev_addr,
f->addr.addr)) { f->addr.addr)) {
f->dst = op; f->dst = op;
...@@ -190,14 +190,14 @@ struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br, ...@@ -190,14 +190,14 @@ struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
} }
/* Interface used by ATM hook that keeps a ref count */ /* Interface used by ATM hook that keeps a ref count */
struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br, struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br,
unsigned char *addr) unsigned char *addr)
{ {
struct net_bridge_fdb_entry *fdb; struct net_bridge_fdb_entry *fdb;
rcu_read_lock(); rcu_read_lock();
fdb = __br_fdb_get(br, addr); fdb = __br_fdb_get(br, addr);
if (fdb) if (fdb)
atomic_inc(&fdb->use_count); atomic_inc(&fdb->use_count);
rcu_read_unlock(); rcu_read_unlock();
return fdb; return fdb;
...@@ -218,7 +218,7 @@ void br_fdb_put(struct net_bridge_fdb_entry *ent) ...@@ -218,7 +218,7 @@ void br_fdb_put(struct net_bridge_fdb_entry *ent)
} }
/* /*
* Fill buffer with forwarding table records in * Fill buffer with forwarding table records in
* the API format. * the API format.
*/ */
int br_fdb_fillbuf(struct net_bridge *br, void *buf, int br_fdb_fillbuf(struct net_bridge *br, void *buf,
...@@ -237,7 +237,7 @@ int br_fdb_fillbuf(struct net_bridge *br, void *buf, ...@@ -237,7 +237,7 @@ int br_fdb_fillbuf(struct net_bridge *br, void *buf,
if (num >= maxnum) if (num >= maxnum)
goto out; goto out;
if (has_expired(br, f)) if (has_expired(br, f))
continue; continue;
if (skip) { if (skip) {
...@@ -277,7 +277,7 @@ static inline struct net_bridge_fdb_entry *fdb_find(struct hlist_head *head, ...@@ -277,7 +277,7 @@ static inline struct net_bridge_fdb_entry *fdb_find(struct hlist_head *head,
static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head, static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head,
struct net_bridge_port *source, struct net_bridge_port *source,
const unsigned char *addr, const unsigned char *addr,
int is_local) int is_local)
{ {
struct net_bridge_fdb_entry *fdb; struct net_bridge_fdb_entry *fdb;
...@@ -307,17 +307,17 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source, ...@@ -307,17 +307,17 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
fdb = fdb_find(head, addr); fdb = fdb_find(head, addr);
if (fdb) { if (fdb) {
/* it is okay to have multiple ports with same /* it is okay to have multiple ports with same
* address, just use the first one. * address, just use the first one.
*/ */
if (fdb->is_local) if (fdb->is_local)
return 0; return 0;
printk(KERN_WARNING "%s adding interface with same address " printk(KERN_WARNING "%s adding interface with same address "
"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;
...@@ -350,7 +350,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, ...@@ -350,7 +350,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
if (likely(fdb)) { if (likely(fdb)) {
/* attempt to update an entry for a local interface */ /* attempt to update an entry for a local interface */
if (unlikely(fdb->is_local)) { if (unlikely(fdb->is_local)) {
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_WARNING "%s: received packet with " printk(KERN_WARNING "%s: received packet with "
" own address as source address\n", " own address as source address\n",
source->dev->name); source->dev->name);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "br_private.h" #include "br_private.h"
/* Don't forward packets to originating port or forwarding diasabled */ /* Don't forward packets to originating port or forwarding diasabled */
static inline int should_deliver(const struct net_bridge_port *p, static inline int should_deliver(const struct net_bridge_port *p,
const struct sk_buff *skb) const struct sk_buff *skb)
{ {
return (skb->dev != p->dev && p->state == BR_STATE_FORWARDING); return (skb->dev != p->dev && p->state == BR_STATE_FORWARDING);
...@@ -101,7 +101,7 @@ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) ...@@ -101,7 +101,7 @@ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
/* called under bridge lock */ /* called under bridge lock */
static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone, static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone,
void (*__packet_hook)(const struct net_bridge_port *p, void (*__packet_hook)(const struct net_bridge_port *p,
struct sk_buff *skb)) struct sk_buff *skb))
{ {
struct net_bridge_port *p; struct net_bridge_port *p;
......
...@@ -47,7 +47,7 @@ static int port_cost(struct net_device *dev) ...@@ -47,7 +47,7 @@ static int port_cost(struct net_device *dev)
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
err = dev_ethtool(&ifr); err = dev_ethtool(&ifr);
set_fs(old_fs); set_fs(old_fs);
if (!err) { if (!err) {
switch(ecmd.speed) { switch(ecmd.speed) {
case SPEED_100: case SPEED_100:
...@@ -191,7 +191,7 @@ static void del_br(struct net_bridge *br) ...@@ -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)
...@@ -201,7 +201,7 @@ static struct net_device *new_bridge_dev(const char *name) ...@@ -201,7 +201,7 @@ static struct net_device *new_bridge_dev(const char *name)
dev = alloc_netdev(sizeof(struct net_bridge), name, dev = alloc_netdev(sizeof(struct net_bridge), name,
br_dev_setup); br_dev_setup);
if (!dev) if (!dev)
return NULL; return NULL;
...@@ -258,12 +258,12 @@ static int find_portno(struct net_bridge *br) ...@@ -258,12 +258,12 @@ static int find_portno(struct net_bridge *br)
} }
/* called with RTNL but without bridge lock */ /* called with RTNL but without bridge lock */
static struct net_bridge_port *new_nbp(struct net_bridge *br, static struct net_bridge_port *new_nbp(struct net_bridge *br,
struct net_device *dev) struct net_device *dev)
{ {
int index; int index;
struct net_bridge_port *p; struct net_bridge_port *p;
index = find_portno(br); index = find_portno(br);
if (index < 0) if (index < 0)
return ERR_PTR(index); return ERR_PTR(index);
...@@ -276,7 +276,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, ...@@ -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;
...@@ -298,7 +298,7 @@ int br_add_bridge(const char *name) ...@@ -298,7 +298,7 @@ int br_add_bridge(const char *name)
int ret; int ret;
dev = new_bridge_dev(name); dev = new_bridge_dev(name);
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
rtnl_lock(); rtnl_lock();
...@@ -329,7 +329,7 @@ int br_del_bridge(const char *name) ...@@ -329,7 +329,7 @@ int br_del_bridge(const char *name)
rtnl_lock(); rtnl_lock();
dev = __dev_get_by_name(name); dev = __dev_get_by_name(name);
if (dev == NULL) if (dev == NULL)
ret = -ENXIO; /* Could not find device */ ret = -ENXIO; /* Could not find device */
else if (!(dev->priv_flags & IFF_EBRIDGE)) { else if (!(dev->priv_flags & IFF_EBRIDGE)) {
...@@ -340,9 +340,9 @@ int br_del_bridge(const char *name) ...@@ -340,9 +340,9 @@ int br_del_bridge(const char *name)
else if (dev->flags & IFF_UP) { else if (dev->flags & IFF_UP) {
/* Not shutdown yet. */ /* Not shutdown yet. */
ret = -EBUSY; ret = -EBUSY;
} }
else else
del_br(netdev_priv(dev)); del_br(netdev_priv(dev));
rtnl_unlock(); rtnl_unlock();
...@@ -428,7 +428,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) ...@@ -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;
...@@ -464,8 +464,8 @@ err0: ...@@ -464,8 +464,8 @@ err0:
int br_del_if(struct net_bridge *br, struct net_device *dev) int br_del_if(struct net_bridge *br, struct net_device *dev)
{ {
struct net_bridge_port *p = dev->br_port; struct net_bridge_port *p = dev->br_port;
if (!p || p->br != br) if (!p || p->br != br)
return -EINVAL; return -EINVAL;
del_nbp(p); del_nbp(p);
......
...@@ -119,7 +119,7 @@ static inline int is_link_local(const unsigned char *dest) ...@@ -119,7 +119,7 @@ static inline int is_link_local(const unsigned char *dest)
* Called via br_handle_frame_hook. * Called via br_handle_frame_hook.
* Return 0 if *pskb should be processed furthur * Return 0 if *pskb should be processed furthur
* 1 if *pskb is handled * 1 if *pskb is handled
* note: already called with rcu_read_lock (preempt_disabled) * note: already called with rcu_read_lock (preempt_disabled)
*/ */
int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
{ {
...@@ -137,7 +137,7 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) ...@@ -137,7 +137,7 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
if (p->state == BR_STATE_FORWARDING || p->state == BR_STATE_LEARNING) { if (p->state == BR_STATE_FORWARDING || p->state == BR_STATE_LEARNING) {
if (br_should_route_hook) { if (br_should_route_hook) {
if (br_should_route_hook(pskb)) if (br_should_route_hook(pskb))
return 0; return 0;
skb = *pskb; skb = *pskb;
dest = eth_hdr(skb)->h_dest; dest = eth_hdr(skb)->h_dest;
......
...@@ -28,7 +28,7 @@ static int get_bridge_ifindices(int *indices, int num) ...@@ -28,7 +28,7 @@ static int get_bridge_ifindices(int *indices, int num)
int i = 0; int i = 0;
for (dev = dev_base; dev && i < num; dev = dev->next) { for (dev = dev_base; dev && i < num; dev = dev->next) {
if (dev->priv_flags & IFF_EBRIDGE) if (dev->priv_flags & IFF_EBRIDGE)
indices[i++] = dev->ifindex; indices[i++] = dev->ifindex;
} }
...@@ -53,7 +53,7 @@ static void get_port_ifindices(struct net_bridge *br, int *ifindices, int num) ...@@ -53,7 +53,7 @@ static void get_port_ifindices(struct net_bridge *br, int *ifindices, int num)
* (limited to a page for sanity) * (limited to a page for sanity)
* offset -- number of records to skip * offset -- number of records to skip
*/ */
static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, static int get_fdb_entries(struct net_bridge *br, void __user *userbuf,
unsigned long maxnum, unsigned long offset) unsigned long maxnum, unsigned long offset)
{ {
int num; int num;
...@@ -69,7 +69,7 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, ...@@ -69,7 +69,7 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf,
buf = kmalloc(size, GFP_USER); buf = kmalloc(size, GFP_USER);
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
num = br_fdb_fillbuf(br, buf, maxnum, offset); num = br_fdb_fillbuf(br, buf, maxnum, offset);
if (num > 0) { if (num > 0) {
if (copy_to_user(userbuf, buf, num*sizeof(struct __fdb_entry))) if (copy_to_user(userbuf, buf, num*sizeof(struct __fdb_entry)))
...@@ -91,7 +91,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) ...@@ -91,7 +91,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd)
dev = dev_get_by_index(ifindex); dev = dev_get_by_index(ifindex);
if (dev == NULL) if (dev == NULL)
return -EINVAL; return -EINVAL;
if (isadd) if (isadd)
ret = br_add_if(br, dev); ret = br_add_if(br, dev);
else else
...@@ -110,7 +110,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -110,7 +110,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
struct net_bridge *br = netdev_priv(dev); struct net_bridge *br = netdev_priv(dev);
unsigned long args[4]; unsigned long args[4];
if (copy_from_user(args, rq->ifr_data, sizeof(args))) if (copy_from_user(args, rq->ifr_data, sizeof(args)))
return -EFAULT; return -EFAULT;
...@@ -143,7 +143,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -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;
...@@ -275,7 +275,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -275,7 +275,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return -ERANGE; return -ERANGE;
spin_lock_bh(&br->lock); spin_lock_bh(&br->lock);
if ((p = br_get_port(br, args[1])) == NULL) if ((p = br_get_port(br, args[1])) == NULL)
ret = -EINVAL; ret = -EINVAL;
else else
br_stp_set_port_priority(p, args[2]); br_stp_set_port_priority(p, args[2]);
...@@ -301,7 +301,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -301,7 +301,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
} }
case BRCTL_GET_FDB_ENTRIES: case BRCTL_GET_FDB_ENTRIES:
return get_fdb_entries(br, (void __user *)args[1], return get_fdb_entries(br, (void __user *)args[1],
args[2], args[3]); args[2], args[3]);
} }
...@@ -368,7 +368,7 @@ int br_ioctl_deviceless_stub(unsigned int cmd, void __user *uarg) ...@@ -368,7 +368,7 @@ int br_ioctl_deviceless_stub(unsigned int cmd, void __user *uarg)
case SIOCGIFBR: case SIOCGIFBR:
case SIOCSIFBR: case SIOCSIFBR:
return old_deviceless(uarg); return old_deviceless(uarg);
case SIOCBRADDBR: case SIOCBRADDBR:
case SIOCBRDELBR: case SIOCBRDELBR:
{ {
......
...@@ -68,7 +68,7 @@ static __be16 inline vlan_proto(const struct sk_buff *skb) ...@@ -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) ...@@ -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) ...@@ -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;
...@@ -836,10 +836,10 @@ static unsigned int ip_sabotage_in(unsigned int hook, struct sk_buff **pskb, ...@@ -836,10 +836,10 @@ static unsigned int ip_sabotage_in(unsigned int hook, struct sk_buff **pskb,
* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because * For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
* ip_refrag() can return NF_STOLEN. */ * ip_refrag() can return NF_STOLEN. */
static struct nf_hook_ops br_nf_ops[] = { static struct nf_hook_ops br_nf_ops[] = {
{ .hook = br_nf_pre_routing, { .hook = br_nf_pre_routing,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_BRIDGE, .pf = PF_BRIDGE,
.hooknum = NF_BR_PRE_ROUTING, .hooknum = NF_BR_PRE_ROUTING,
.priority = NF_BR_PRI_BRNF, }, .priority = NF_BR_PRI_BRNF, },
{ .hook = br_nf_local_in, { .hook = br_nf_local_in,
.owner = THIS_MODULE, .owner = THIS_MODULE,
..