diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-06-15 06:50:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-15 11:48:58 -0700 |
commit | f350a0a87374418635689471606454abc7beaa3a (patch) | |
tree | c8210542a9848f6b5953b58d2ba1dbfb11715f14 /net/bridge/br_notify.c | |
parent | a35e2c1b6d90544b3c688783869817628e5f9607 (diff) | |
download | linux-3.10-f350a0a87374418635689471606454abc7beaa3a.tar.gz linux-3.10-f350a0a87374418635689471606454abc7beaa3a.tar.bz2 linux-3.10-f350a0a87374418635689471606454abc7beaa3a.zip |
bridge: use rx_handler_data pointer to store net_bridge_port pointer
Register net_bridge_port pointer as rx_handler data pointer. As br_port is
removed from struct net_device, another netdev priv_flag is added to indicate
the device serves as a bridge port. Also rcuized pointers are now correctly
dereferenced in br_fdb.c and in netfilter parts.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_notify.c')
-rw-r--r-- | net/bridge/br_notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c index 717e1fd6133..404d4e14c6a 100644 --- a/net/bridge/br_notify.c +++ b/net/bridge/br_notify.c @@ -32,14 +32,15 @@ struct notifier_block br_device_notifier = { static int br_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = ptr; - struct net_bridge_port *p = dev->br_port; + struct net_bridge_port *p = br_port_get(dev); struct net_bridge *br; int err; /* not a port of a bridge */ - if (p == NULL) + if (!br_port_exists(dev)) return NOTIFY_DONE; + p = br_port_get(dev); br = p->br; switch (event) { |