RE: feature request from debian user: no DNS



I am all for this feature.

TAO also has a similar command line option.

Our production systems do not use DNS, in order to use orbit in this
environment we need to then set the hostnames in /etc/hosts which is prone
to misconfiguration.

-Sean


-----Original Message-----
From: Chris Waters [mailto:xtifr@debian.org]
Sent: Monday, September 17, 2001 1:49 PM
To: orbit-list@gnome.org
Subject: feature request from debian user: no DNS


Hi,

I got a feature request from a Debian user, and I'm a little dubious,
but not enough to reject it out of hand, so I thought I'd post it to
the list and see what others think of it.  Especially since the
gentleman was nice enough to include a patch (against 0.5.8).

My first reaction was, why should we support broken systems?  If you
want a VPN, set one up properly!  But on further reflection, I
thought, well, the extra flexibility probably can't hurt.  I can't see
any obvious harm in this patch -- the default behavior is unchanged --
so why not bring it up for discussion?

Comments?  And if we decide this is reasonable, should we add it to
orbit2 as well?  (I'm just starting to look at the orbit2 code
myself.)

cheers,
Chris

----- Forwarded message from Jamie Walker <jamie@sagaxis.co.uk> -----

Date: Sun, 16 Sep 2001 20:46:33 +0100
Subject: Bug#112474: orbit encodes hostname in IOR
From: Jamie Walker <jamie@sagaxis.co.uk>
To: Debian Bug Tracking System <maintonly@bugs.debian.org>
Reply-To: Jamie Walker <jamie@sagaxis.co.uk>,
112474-maintonly@bugs.debian.org
Orignal-Sender: Jamie Walker <jamie@sagaxis.co.uk>
X-Debian-PR-Message: report 112474
X-Debian-PR-Package: orbit
X-Debian-PR-Keywords: patch
X-Reportbug-Version: 1.23

Package: orbit
Version: 0.5.8-2
Severity: wishlist
Tags: patch 

Orbit always encodes the server's hostname in the ior. This breaks
IIOP if any clients do not have the DNS configured properly. I enclose
a patch to add a command line option, ORBIIOPIPv4NoDNS, to force the
IP address to be used instead of the hostname. This fixes the problem
on our WAN, and also keeps the original behavior as default. Would be
grateful if this could be applied and/or forwarded upstream:

--- orbit-0.5.8.orig/src/orb/orb.c
+++ orbit-0.5.8/src/orb/orb.c
@@ -284,6 +284,7 @@
 	int no_iiop_server=0;
 	int no_iiop_proxy=0;
 	int use_ipv4=0;
+	int nodns=0;
 	int use_ipv6=0;
 	int use_usock=1;
 	int debug_level=0;
@@ -333,6 +334,7 @@
 		{"ORBIIOPUSock", int_arg, NULL},
 		{"ORBIIOPIPv4", int_arg, NULL},
 		{"ORBIIOPIPv6", int_arg, NULL},
+		{"ORBIIOPIPv4NoDNS", int_arg, NULL},
 		{NULL,0,NULL},
 	};
 
@@ -360,6 +362,7 @@
 	options[15].arg = (void *) &use_usock;
 	options[16].arg = (void *) &use_ipv4;
 	options[17].arg = (void *) &use_ipv6;
+	options[18].arg = (void *) &nodns;
 
 	ORBit_option_parse(argc, argv, pre_rc_options);
 
@@ -419,7 +422,7 @@
 	}
 
 	if(use_ipv4) {
-		orb->cnx.ipv4 = GIOP_CONNECTION(iiop_connection_server());
+		orb->cnx.ipv4 =
GIOP_CONNECTION(iiop_connection_server(nodns));
 		giop_connection_ref(orb->cnx.ipv4);
 		GIOP_CONNECTION(orb->cnx.ipv4)->orb_data = orb;
 	
--- orbit-0.5.8.orig/src/IIOP/connection.c
+++ orbit-0.5.8/src/IIOP/connection.c
@@ -501,7 +501,7 @@
  *                 connections come.
  */
 IIOPConnection *
-iiop_connection_server(void)
+iiop_connection_server(int nodns)
 {
   struct hostent *hent;
   char hn_tmp[65];
@@ -540,7 +540,7 @@
   hent = gethostbyname(hn_tmp);
   if(hent) 
     {
-      if (strchr (hent->h_name, '.'))
+      if (strchr (hent->h_name, '.') && !nodns)
 	server_cnx->u.ipv4.hostname = g_strdup(hent->h_name);
       else
 	{
--- orbit-0.5.8.orig/src/IIOP/IIOP.h
+++ orbit-0.5.8/src/IIOP/IIOP.h
@@ -24,7 +24,7 @@
 					 gboolean existing_only);
 
 /* gives us a local socket that other people can connect to... */
-IIOPConnection *iiop_connection_server(void);
+IIOPConnection *iiop_connection_server(int nodns);
 IIOPConnection *iiop_connection_server_ipv6(void);
 IIOPConnection *iiop_connection_server_unix(const char *sockpath);
 

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux sagaxis 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586
Locale: LANG=C, LC_CTYPE=C

Versions of packages orbit depends on:
ii  libc6                         2.2.3-5    GNU C Library: Shared libraries
an
ii  libglib1.2                    1.2.10-1.2 The GLib library of C routines
ii  liborbit0                     0.5.8-2    Libraries for ORBit - a CORBA
ORB
ii  libwrap0                      7.6-8      Wietse Venema's TCP wrappers
libra

Regards,
-- 
Jamie Walker	            "To err is human, but to really screw things
jamie@sagaxis.co.uk          up requires a computer."
http://www.sagaxis.co.uk  			     Anon.



----- End forwarded message -----

-- 
Chris Waters           |  Pneumonoultra-        osis is too long
xtifr@debian.org       |  microscopicsilico-    to fit into a single
or xtifr@speakeasy.net |  volcaniconi-          standalone haiku

_______________________________________________
orbit-list mailing list
orbit-list@gnome.org
http://mail.gnome.org/mailman/listinfo/orbit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]