]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/bridge/netfilter/nf_log_bridge.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[mirror_ubuntu-zesty-kernel.git] / net / bridge / netfilter / nf_log_bridge.c
index 1663df59854502b997d9bc56bb49712c0b99f28a..bd2b3c78f59bddd92425974d5731fba3e962e4d5 100644 (file)
@@ -24,21 +24,8 @@ static void nf_log_bridge_packet(struct net *net, u_int8_t pf,
                                 const struct nf_loginfo *loginfo,
                                 const char *prefix)
 {
-       switch (eth_hdr(skb)->h_proto) {
-       case htons(ETH_P_IP):
-               nf_log_packet(net, NFPROTO_IPV4, hooknum, skb, in, out,
-                             loginfo, "%s", prefix);
-               break;
-       case htons(ETH_P_IPV6):
-               nf_log_packet(net, NFPROTO_IPV6, hooknum, skb, in, out,
-                             loginfo, "%s", prefix);
-               break;
-       case htons(ETH_P_ARP):
-       case htons(ETH_P_RARP):
-               nf_log_packet(net, NFPROTO_ARP, hooknum, skb, in, out,
-                             loginfo, "%s", prefix);
-               break;
-       }
+       nf_log_l2packet(net, pf, eth_hdr(skb)->h_proto, hooknum, skb,
+                       in, out, loginfo, prefix);
 }
 
 static struct nf_logger nf_bridge_logger __read_mostly = {