Commit 85c1937b authored by David S. Miller's avatar David S. Miller

[EBTABLES]: Fix thinkos in ebt_log.c

When converting over the skb_header_pointer(), I converted parts of
this module incorrectly.  Kill the 'u' union in ebt_log() and all the
bogus references to it.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61998bcb
...@@ -61,8 +61,6 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, ...@@ -61,8 +61,6 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
{ {
struct ebt_log_info *info = (struct ebt_log_info *)data; struct ebt_log_info *info = (struct ebt_log_info *)data;
char level_string[4] = "< >"; char level_string[4] = "< >";
union {struct iphdr iph; struct tcpudphdr ports;
struct arphdr arph; struct arppayload arpp;} u;
level_string[1] = '0' + info->loglevel; level_string[1] = '0' + info->loglevel;
spin_lock_bh(&ebt_log_lock); spin_lock_bh(&ebt_log_lock);
...@@ -88,7 +86,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, ...@@ -88,7 +86,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
} }
printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u,", printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u,",
NIPQUAD(ih->saddr), NIPQUAD(ih->daddr)); NIPQUAD(ih->saddr), NIPQUAD(ih->daddr));
printk(" IP tos=0x%02X, IP proto=%d", u.iph.tos, printk(" IP tos=0x%02X, IP proto=%d", ih->tos,
ih->protocol); ih->protocol);
if (ih->protocol == IPPROTO_TCP || if (ih->protocol == IPPROTO_TCP ||
ih->protocol == IPPROTO_UDP) { ih->protocol == IPPROTO_UDP) {
...@@ -127,7 +125,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, ...@@ -127,7 +125,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
ah->ar_pln == sizeof(uint32_t)) { ah->ar_pln == sizeof(uint32_t)) {
struct arppayload _arpp, *ap; struct arppayload _arpp, *ap;
ap = skb_header_pointer(skb, sizeof(u.arph), ap = skb_header_pointer(skb, sizeof(_arph),
sizeof(_arpp), &_arpp); sizeof(_arpp), &_arpp);
if (ap == NULL) { if (ap == NULL) {
printk(" INCOMPLETE ARP payload"); printk(" INCOMPLETE ARP payload");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment