netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Nowakowski <ryan@britestream.com>
To: netdev@vger.kernel.org
Subject: ipvs locahost client patch for 2.6?
Date: Thu, 10 Aug 2006 11:18:38 -0500	[thread overview]
Message-ID: <20060810161838.GD5088@britestream.com> (raw)

I found this patch for 2.4 that allows the host running ipvs to act
as it's own client via loopback connection.  Does anyone have a similar
patch for 2.6?

--- ip_vs_core.c.orig	2003-11-28 19:26:21.000000000 +0100
+++ ip_vs_core.c.list	2004-07-02 11:13:51.000000000 +0200
@@ -1036,7 +1036,7 @@
 	 *	Big tappo: only PACKET_HOST (nor loopback neither mcasts)
 	 *	... don't know why 1st test DOES NOT include 2nd (?)
 	 */
-	if (skb->pkt_type != PACKET_HOST || skb->dev == &loopback_dev) {
+	if (skb->pkt_type != PACKET_HOST) { /* || skb->dev == &loopback_dev) { */
 		IP_VS_DBG(12, "packet type=%d proto=%d daddr=%d.%d.%d.%d ignored\n",
 			  skb->pkt_type,
 			  iph->protocol,
@@ -1059,6 +1059,13 @@
 	iph = skb->nh.iph;
 	h.raw = (char*) iph + ihl;
 
+        cp = ip_vs_conn_out_get(iph->protocol, iph->saddr, h.portp[0],
+                               iph->daddr, h.portp[1]);
+        if (cp) {
+           __ip_vs_conn_put(cp);
+           return (ip_vs_out(hooknum,skb_p,in,out,okfn));
+        }
+
 	/*
 	 * Check if the packet belongs to an existing connection entry
 	 */


             reply	other threads:[~2006-08-10 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 16:18 Ryan Nowakowski [this message]
2006-09-20 14:57 ` ipvs locahost client patch for 2.6? Horms

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=20060810161838.GD5088@britestream.com \
    --to=ryan@britestream.com \
    --cc=netdev@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).