netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
	netfilter-devel@vger.kernel.org
Subject: netfilter 08/09: xt_time: print timezone for user information
Date: Mon, 12 Jan 2009 11:06:10 +0100 (MET)	[thread overview]
Message-ID: <20090112100610.9280.48102.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20090112100559.9280.23431.sendpatchset@x2.localnet>

commit 0fd565aa7fdb2dc88c65b16a4e2260d4abd5b027
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Jan 12 10:51:56 2009 +0100

    netfilter: xt_time: print timezone for user information
    
    Let users have a way to figure out if their distro set the kernel
    timezone at all.
    
    Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index 29375ba..93acaa5 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -243,6 +243,17 @@ static struct xt_match xt_time_mt_reg __read_mostly = {
 
 static int __init time_mt_init(void)
 {
+	int minutes = sys_tz.tz_minuteswest;
+
+	if (minutes < 0) /* east of Greenwich */
+		printk(KERN_INFO KBUILD_MODNAME
+		       ": kernel timezone is +%02d%02d\n",
+		       -minutes / 60, -minutes % 60);
+	else /* west of Greenwich */
+		printk(KERN_INFO KBUILD_MODNAME
+		       ": kernel timezone is -%02d%02d\n",
+		       minutes / 60, minutes % 60);
+
 	return xt_register_match(&xt_time_mt_reg);
 }
 

  parent reply	other threads:[~2009-01-12 10:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 10:05 netfilter 00/09: netfilter fixes/trivial patches Patrick McHardy
2009-01-12 10:06 ` netfilter 01/09: remove "happy cracking" message Patrick McHardy
2009-01-12 10:06 ` netfilter 02/09: bridge: Fix handling of non-IP packets in FORWARD/POST_ROUTING Patrick McHardy
2009-01-12 10:06 ` netfilter 03/09: bridge: Disable PPPOE/VLAN processing by default Patrick McHardy
2009-01-12 10:06 ` netfilter 04/09: x_tables: fix match/target revision lookup Patrick McHardy
2009-01-12 10:06 ` netfilter 05/09: ebtables: fix inversion in match code Patrick McHardy
2009-01-12 10:06 ` netfilter 06/09: nf_conntrack: fix ICMP/ICMPv6 timeout sysctls on big-endian Patrick McHardy
2009-01-12 10:06 ` netfilter 07/09: simplify nf_conntrack_alloc() error handling Patrick McHardy
2009-01-12 10:06 ` Patrick McHardy [this message]
2009-01-12 10:06 ` netfilter 09/09: remove padding from struct xt_match on 64bit builds Patrick McHardy
2009-01-13  0:39 ` netfilter 00/09: netfilter fixes/trivial patches David Miller

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=20090112100610.9280.48102.sendpatchset@x2.localnet \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).