aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_log.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /net/bridge/netfilter/ebt_log.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'net/bridge/netfilter/ebt_log.c')
-rw-r--r--net/bridge/netfilter/ebt_log.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 92de5e5f9db..6e5a8bb9b94 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -80,7 +80,7 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
80 unsigned int bitmask; 80 unsigned int bitmask;
81 81
82 spin_lock_bh(&ebt_log_lock); 82 spin_lock_bh(&ebt_log_lock);
83 printk(KERN_SOH "%c%s IN=%s OUT=%s MAC source = %pM MAC dest = %pM proto = 0x%04x", 83 printk("<%c>%s IN=%s OUT=%s MAC source = %pM MAC dest = %pM proto = 0x%04x",
84 '0' + loginfo->u.log.level, prefix, 84 '0' + loginfo->u.log.level, prefix,
85 in ? in->name : "", out ? out->name : "", 85 in ? in->name : "", out ? out->name : "",
86 eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest, 86 eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest,
@@ -107,13 +107,12 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
107 goto out; 107 goto out;
108 } 108 }
109 109
110#if IS_ENABLED(CONFIG_BRIDGE_EBT_IP6) 110#if defined(CONFIG_BRIDGE_EBT_IP6) || defined(CONFIG_BRIDGE_EBT_IP6_MODULE)
111 if ((bitmask & EBT_LOG_IP6) && eth_hdr(skb)->h_proto == 111 if ((bitmask & EBT_LOG_IP6) && eth_hdr(skb)->h_proto ==
112 htons(ETH_P_IPV6)) { 112 htons(ETH_P_IPV6)) {
113 const struct ipv6hdr *ih; 113 const struct ipv6hdr *ih;
114 struct ipv6hdr _iph; 114 struct ipv6hdr _iph;
115 uint8_t nexthdr; 115 uint8_t nexthdr;
116 __be16 frag_off;
117 int offset_ph; 116 int offset_ph;
118 117
119 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); 118 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
@@ -124,7 +123,7 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
124 printk(" IPv6 SRC=%pI6 IPv6 DST=%pI6, IPv6 priority=0x%01X, Next Header=%d", 123 printk(" IPv6 SRC=%pI6 IPv6 DST=%pI6, IPv6 priority=0x%01X, Next Header=%d",
125 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr); 124 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr);
126 nexthdr = ih->nexthdr; 125 nexthdr = ih->nexthdr;
127 offset_ph = ipv6_skip_exthdr(skb, sizeof(_iph), &nexthdr, &frag_off); 126 offset_ph = ipv6_skip_exthdr(skb, sizeof(_iph), &nexthdr);
128 if (offset_ph == -1) 127 if (offset_ph == -1)
129 goto out; 128 goto out;
130 print_ports(skb, nexthdr, offset_ph); 129 print_ports(skb, nexthdr, offset_ph);