aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink_log.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-06-15 02:50:45 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-15 14:48:58 -0400
commitf350a0a87374418635689471606454abc7beaa3a (patch)
treec8210542a9848f6b5953b58d2ba1dbfb11715f14 /net/netfilter/nfnetlink_log.c
parenta35e2c1b6d90544b3c688783869817628e5f9607 (diff)
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/netfilter/nfnetlink_log.c')
-rw-r--r--net/netfilter/nfnetlink_log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index fc9a211e629..e0504e90a0f 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -403,8 +403,9 @@ __build_packet_message(struct nfulnl_instance *inst,
403 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_PHYSINDEV, 403 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_PHYSINDEV,
404 htonl(indev->ifindex)); 404 htonl(indev->ifindex));
405 /* this is the bridge group "brX" */ 405 /* this is the bridge group "brX" */
406 /* rcu_read_lock()ed by nf_hook_slow or nf_log_packet */
406 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_INDEV, 407 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_INDEV,
407 htonl(indev->br_port->br->dev->ifindex)); 408 htonl(br_port_get_rcu(indev)->br->dev->ifindex));
408 } else { 409 } else {
409 /* Case 2: indev is bridge group, we need to look for 410 /* Case 2: indev is bridge group, we need to look for
410 * physical device (when called from ipv4) */ 411 * physical device (when called from ipv4) */
@@ -430,8 +431,9 @@ __build_packet_message(struct nfulnl_instance *inst,
430 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_PHYSOUTDEV, 431 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_PHYSOUTDEV,
431 htonl(outdev->ifindex)); 432 htonl(outdev->ifindex));
432 /* this is the bridge group "brX" */ 433 /* this is the bridge group "brX" */
434 /* rcu_read_lock()ed by nf_hook_slow or nf_log_packet */
433 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_OUTDEV, 435 NLA_PUT_BE32(inst->skb, NFULA_IFINDEX_OUTDEV,
434 htonl(outdev->br_port->br->dev->ifindex)); 436 htonl(br_port_get_rcu(outdev)->br->dev->ifindex));
435 } else { 437 } else {
436 /* Case 2: indev is a bridge group, we need to look 438 /* Case 2: indev is a bridge group, we need to look
437 * for physical device (when called from ipv4) */ 439 * for physical device (when called from ipv4) */