From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. c9e01c8cb87ff79a6fbb3a98e552757072c251ef
Date: Mon, 06 Aug 2012 20:21:02 +0200 [thread overview]
Message-ID: <20120806182103.24B4720099@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 5308 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via c9e01c8cb87ff79a6fbb3a98e552757072c251ef (commit)
from a1efb5dcc41a32a83644005d150420cb71e07f69 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c9e01c8cb87ff79a6fbb3a98e552757072c251ef
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Mon Aug 6 20:20:40 2012 +0200
connections.cgi: Show return paths (NAT endpoints).
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/connections.cgi | 89 +++++++++++++++++++++++++++++++++++-------
1 files changed, 75 insertions(+), 14 deletions(-)
Difference in files:
diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi
index 973a7d2..1edf3e5 100644
--- a/html/cgi-bin/connections.cgi
+++ b/html/cgi-bin/connections.cgi
@@ -331,9 +331,13 @@ foreach my $line (@conntrack) {
# Source and destination.
my $sip;
+ my $sip_ret;
my $dip;
+ my $dip_ret;
my $sport;
+ my $sport_ret;
my $dport;
+ my $dport_ret;
my @packets;
my @bytes;
@@ -349,16 +353,32 @@ foreach my $line (@conntrack) {
switch ($key) {
case "src" {
- $sip = $val;
+ if ($sip == "") {
+ $sip = $val;
+ } else {
+ $dip_ret = $val;
+ }
}
case "dst" {
- $dip = $val;
+ if ($dip == "") {
+ $dip = $val;
+ } else {
+ $sip_ret = $val;
+ }
}
case "sport" {
- $sport = $val;
+ if ($sport == "") {
+ $sport = $val;
+ } else {
+ $dport_ret = $val;
+ }
}
case "dport" {
- $dport = $val;
+ if ($dport == "") {
+ $dport = $val;
+ } else {
+ $sport_ret = $val;
+ }
}
case "packets" {
push(@packets, $val);
@@ -375,17 +395,11 @@ foreach my $line (@conntrack) {
my $sserv = '';
if ($sport < 1024) {
$sserv = uc(getservbyport($sport, lc($l4proto)));
- if ($sserv ne '') {
- $sserv = " ($sserv)";
- }
}
my $dserv = '';
if ($dport < 1024) {
$dserv = uc(getservbyport($dport, lc($l4proto)));
- if ($dserv ne '') {
- $dserv = " ($dserv)";
- }
}
my $bytes_in = format_bytes($bytes[0]);
@@ -394,6 +408,49 @@ foreach my $line (@conntrack) {
# Format TTL
$ttl = format_time($ttl);
+ my $sip_extra;
+ if ($sip ne $sip_ret) {
+ $sip_extra = "<font color='#FFFFFF'>></font> ";
+ $sip_extra .= "<a href='/cgi-bin/ipinfo.cgi?ip=$sip_ret'>";
+ $sip_extra .= " <font color='#FFFFFF'>$sip_ret</font>";
+ $sip_extra .= "</a>";
+ }
+
+ my $dip_extra;
+ if ($dip ne $dip_ret) {
+ $dip_extra = "<font color='#FFFFFF'>></font> ";
+ $dip_extra .= "<a href='/cgi-bin/ipinfo.cgi?ip=$dip_ret'>";
+ $dip_extra .= " <font color='#FFFFFF'>$dip_ret</font>";
+ $dip_extra .= "</a>";
+ }
+
+
+ my $sport_extra;
+ if ($sport ne $sport_ret) {
+ my $sserv_ret = '';
+ if ($sport_ret < 1024) {
+ $sserv_ret = uc(getservbyport($sport_ret, lc($l4proto)));
+ }
+
+ $sport_extra = "<font color='#FFFFFF'>></font> ";
+ $sport_extra .= "<a href='http://isc.sans.org/port_details.php?port=$sport_ret' target='top' title='$sserv_ret'>";
+ $sport_extra .= " <font color='#FFFFFF'>$sport_ret</font>";
+ $sport_extra .= "</a>";
+ }
+
+ my $dport_extra;
+ if ($dport ne $dport_ret) {
+ my $dserv_ret = '';
+ if ($dport_ret < 1024) {
+ $dserv_ret = uc(getservbyport($dport_ret, lc($l4proto)));
+ }
+
+ $dport_extra = "<font color='#FFFFFF'>></font> ";
+ $dport_extra .= "<a href='http://isc.sans.org/port_details.php?port=$dport_ret' target='top' title='$dserv_ret'>";
+ $dport_extra .= " <font color='#FFFFFF'>$dport_ret</font>";
+ $dport_extra .= "</a>";
+ }
+
print <<END;
<tr>
<td align='center'>$l4proto</td>
@@ -401,21 +458,25 @@ foreach my $line (@conntrack) {
<a href='/cgi-bin/ipinfo.cgi?ip=$sip'>
<font color='#FFFFFF'>$sip</font>
</a>
+ $sip_extra
</td>
<td align='center' bgcolor='$sip_colour'>
- <a href='http://isc.sans.org/port_details.php?port=$sport' target='top'>
- <font color='#FFFFFF'>$sport$sserv</font>
+ <a href='http://isc.sans.org/port_details.php?port=$sport' target='top' title='$sserv'>
+ <font color='#FFFFFF'>$sport</font>
</a>
+ $sport_extra
</td>
<td align='center' bgcolor='$dip_colour'>
<a href='/cgi-bin/ipinfo.cgi?ip=$dip'>
<font color='#FFFFFF'>$dip</font>
</a>
+ $dip_extra
</td>
<td align='center' bgcolor='$dip_colour'>
- <a href='http://isc.sans.org/port_details.php?port=$dport' target='top'>
- <font color='#FFFFFF'>$dport$dserv</font>
+ <a href='http://isc.sans.org/port_details.php?port=$dport' target='top' title='$dserv'>
+ <font color='#FFFFFF'>$dport</font>
</a>
+ $dport_extra
</td>
<td align='center'>
$bytes_in / $bytes_out
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2012-08-06 18:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120806182103.24B4720099@argus.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.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