aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-06 23:24:53 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-07 19:08:03 -0500
commitba5dcee128d9f2877a6d2a5b150c24d90d77dad1 (patch)
treeefd5a53fcb30f56bf912bb2eb81ab156205d9a1b /net
parent881dbfe8accc9434dd0d7d052505e3dca6ad9b3c (diff)
[NETFILTER]: nfnetlink_log: fix crash on bridged packet
physoutdev is only set on purely bridged packet, when nfnetlink_log is used in the OUTPUT/FORWARD/POSTROUTING hooks on packets forwarded from or to a bridge it crashes when trying to dereference skb->nf_bridge->physoutdev. Reported by Holger Eitzenberger <heitzenberger@astaro.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nfnetlink_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 12f92e235a13..5cb30ebba0f4 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -486,7 +486,7 @@ __build_packet_message(struct nfulnl_instance *inst,
486 * for physical device (when called from ipv4) */ 486 * for physical device (when called from ipv4) */
487 NFA_PUT(inst->skb, NFULA_IFINDEX_OUTDEV, 487 NFA_PUT(inst->skb, NFULA_IFINDEX_OUTDEV,
488 sizeof(tmp_uint), &tmp_uint); 488 sizeof(tmp_uint), &tmp_uint);
489 if (skb->nf_bridge) { 489 if (skb->nf_bridge && skb->nf_bridge->physoutdev) {
490 tmp_uint = 490 tmp_uint =
491 htonl(skb->nf_bridge->physoutdev->ifindex); 491 htonl(skb->nf_bridge->physoutdev->ifindex);
492 NFA_PUT(inst->skb, NFULA_IFINDEX_PHYSOUTDEV, 492 NFA_PUT(inst->skb, NFULA_IFINDEX_PHYSOUTDEV,