Hi Harald,

would you mind merging the prink()s ...

Harald Welte wrote:
> diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
> --- a/net/bridge/netfilter/ebt_log.c
> +++ b/net/bridge/netfilter/ebt_log.c
> @@ -55,17 +57,19 @@ static void print_MAC(unsigned char *p)
>  }
>  
>  #define myNIPQUAD(a) a[0], a[1], a[2], a[3]
> -static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
> -   const struct net_device *in, const struct net_device *out,
> -   const void *data, unsigned int datalen)
> +static void
> +ebt_log_packet(unsigned int pf, unsigned int hooknum,
> +   const struct sk_buff *skb, const struct net_device *in,
> +   const struct net_device *out, const struct nf_loginfo *loginfo,
> +   const char *prefix)
>  {
> -     struct ebt_log_info *info = (struct ebt_log_info *)data;
>       char level_string[4] = "< >";
> +     unsigned int bitmask;
>  
> -     level_string[1] = '0' + info->loglevel;
> +     level_string[1] = '0' + loginfo->u.log.level;
>       spin_lock_bh(&ebt_log_lock);
>       printk(level_string);
> -     printk("%s IN=%s OUT=%s ", info->prefix, in ? in->name : "",
> +     printk("%s IN=%s OUT=%s ", prefix, in ? in->name : "",
>          out ? out->name : "");
>  
>       printk("MAC source = ");

... here ...

> @@ -75,7 +79,12 @@ static void ebt_log(const struct sk_buff
>  
>       printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto));
>  

... and here?

> -     if ((info->bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
> +     if (loginfo->type == NF_LOG_TYPE_LOG)
> +             bitmask = loginfo->u.log.logflags;
> +     else
> +             bitmask = NF_LOG_MASK;
> +
> +     if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
>          htons(ETH_P_IP)){
>               struct iphdr _iph, *ih;
>  

I prefer evil printk()s over multiple ones :-)


Regards

Ingo Oeser

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to