All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Oeser <netdev-BkyiQQGWkgE@public.gmane.org>
To: Harald Welte <laforge-TgoAw6mPHtdg9hUCZPvPmw@public.gmane.org>
Cc: Bart De Schuymer
	<bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>,
	Linux Netdev List
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Re: [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log
Date: Mon, 14 Nov 2005 13:09:37 +0100	[thread overview]
Message-ID: <200511141309.37056.netdev@axxeo.de> (raw)
In-Reply-To: <20051112094936.GA27644-XKR8MNpNCaUy1wpV0ib6OjPN8QKu1tr+@public.gmane.org>

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



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click

      parent reply	other threads:[~2005-11-14 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 23:49 [PATCH] ebtables: Port ebt_[u]log.c to nf[netlink]_log Harald Welte
     [not found] ` <20051007234903.GR4450-5xaKNk1AN7bNqB9Gf7YOJg/oQhhTQFE7QQ4Iyu8u01E@public.gmane.org>
2005-10-11 19:31   ` Bart De Schuymer
     [not found]     ` <1129059110.5087.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-10-11 19:55       ` David S. Miller
     [not found]         ` <20051011.125506.46476570.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2005-10-11 20:49           ` Bart De Schuymer
2005-10-12  6:27       ` Harald Welte
     [not found]         ` <20051012062745.GB4237-d6usTx1WJblOCgDDqY8e12D2FQJk+8+b@public.gmane.org>
2005-10-12 20:10           ` Ian McDonald
2005-10-17 17:59   ` Bart De Schuymer
     [not found]     ` <1129571999.3383.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-10-18  8:58       ` Harald Welte
     [not found]         ` <20051018085853.GG20338-XKR8MNpNCaUy1wpV0ib6OjPN8QKu1tr+@public.gmane.org>
2005-10-18 15:12           ` Bart De Schuymer
     [not found]             ` <1129648337.4504.3.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-11-12  9:49               ` Harald Welte
     [not found]                 ` <20051112094936.GA27644-XKR8MNpNCaUy1wpV0ib6OjPN8QKu1tr+@public.gmane.org>
2005-11-14 12:09                   ` Ingo Oeser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511141309.37056.netdev@axxeo.de \
    --to=netdev-bkyiqqgwkge@public.gmane.org \
    --cc=bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org \
    --cc=ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=laforge-TgoAw6mPHtdg9hUCZPvPmw@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.