Skip to content

Commit c3f9fd5

Browse files
Snorchummakynes
authored andcommitted
netfilter: nfnetlink_log: use proper helper for fetching physinif
We don't use physindev in __build_packet_message except for getting physinif from it. So let's switch to nf_bridge_get_physinif to get what we want directly. Signed-off-by: Pavel Tikhomirov <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 91a139c commit c3f9fd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/netfilter/nfnetlink_log.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,18 +508,18 @@ __build_packet_message(struct nfnl_log_net *log,
508508
htonl(br_port_get_rcu(indev)->br->dev->ifindex)))
509509
goto nla_put_failure;
510510
} else {
511-
struct net_device *physindev;
511+
int physinif;
512512

513513
/* Case 2: indev is bridge group, we need to look for
514514
* physical device (when called from ipv4) */
515515
if (nla_put_be32(inst->skb, NFULA_IFINDEX_INDEV,
516516
htonl(indev->ifindex)))
517517
goto nla_put_failure;
518518

519-
physindev = nf_bridge_get_physindev(skb);
520-
if (physindev &&
519+
physinif = nf_bridge_get_physinif(skb);
520+
if (physinif &&
521521
nla_put_be32(inst->skb, NFULA_IFINDEX_PHYSINDEV,
522-
htonl(physindev->ifindex)))
522+
htonl(physinif)))
523523
goto nla_put_failure;
524524
}
525525
#endif

0 commit comments

Comments
 (0)