Darren Reed writes:
> This wasn't what I was thinking of (I didn't even know linux had
> this misfeature.)

I suspect the potential for confusion is pretty high.  If we were to
do something like this, I think we'd need a better name that doesn't
somehow imply that the socket is bound to the interface itself.

> I don't mean that there should be either a system call or similar
> interface to support this using the kernel, rather that inetd should
> be able to take my input of "bge0" and translate that into an IP
> address for passing through to a bind() call.

"An" address?  Which one?  (Or does this use the logical interface
name, and thus name exactly one address?)

There are a host of interaction issues to deal with here.  Zones
currently causes arbitrary interface names ("addif") to be used, so
you wouldn't be able to use this feature in non-global zones, at least
until Clearview's vanity naming arrives.  (And then you'd have the
issue of how interface renames ought to be handled ... does dladm know
about this usage, or does the system just fall apart when you rename
things?)

> This may, in addition, require inetd to listen to the routing socket
> in order to close the socket and bind again to a different address,
> if we were to support the more dynamic side of network interfaces.

This all seems far too specific to inetd and this one usage case to
me.

You can already do part what you're asking (minus the dynamic
features) by creating reasonable entries in /etc/hosts, and using the
name instead of the numeric address.

Instead, if we do need this feature, I'd suggest roping off some
portion of the illegal host name space as resolving to logical
interface addresses.  For example, it's not possible to have a host
name (see RFCs 952 and 1123) that starts with "%", and a numeric
address can't start that way either (the IPv6 "zone" [interface] id
requires an address first), so you could do "%<intf>" to mean "the
local address configured on <intf>."

That way, it'd work everywhere, not just in inetd's configuration.
You'd be able to do "ping %bge0" if you wanted.

-- 
James Carlson, KISS Network                    <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to