Hi All,

I actually obtained help on IRC for this from a very kind gentleman, and the 
issue is now hopefully resolved. I'm sending this email for future reference 
for anyone googling something similar. The "solution" is here:

http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6852739

Basically alter the code slightly and recompile mdns. Here was what I wrote 
prior to getting help on IRC:

-----
I'm encountering issues setting up an AI server inside a zone - mainly, I can't 
get mdns to work.

When I enable the svc:/network/dns/multicast:default service, it goes into 
maintenance mode due to restarting too quickly. If I run it on the command line 
with the -debug option, it stops and starts:

# /usr/lib/inet/mdnsd -debug
starting
stopping
# 

If I run mdnsd in the global zone, it's fine. However inside a zone, it doesn't 
want to work. I compared the truss output of the two, and spotted something. 
This is the output from inside the zone:

8678:   so_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP, 0x00000000, SOV_XPG4_2) = 5
8678:   ioctl(5, SIOCGLIFNUM, 0x08047B00)               = 0
8678:   ioctl(5, SIOCGLIFCONF, 0x08047B10)              = 0
8678:   ioctl(5, SIOCGLIFZONE, 0x08047050)              = 0
8678:   zone_lookup(0x00000000)                         = 2
8678:   ioctl(5, SIOCGLIFZONE, 0x08047050)              = 0
8678:   zone_lookup(0x00000000)                         = 2
8678:   close(5)                                        = 0
8678:   open("/etc/resolv.conf", O_RDONLY)              = 5

This differs from the global zone:

8654:   so_socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP, 0x00000000, SOV_XPG4_2) = 5
8654:   ioctl(5, SIOCGLIFNUM, 0x08047AE0)               = 0
8654:   ioctl(5, SIOCGLIFCONF, 0x08047AF0)              = 0
8654:   ioctl(5, SIOCGLIFZONE, 0x080471A0)              = 0
8654:   zone_lookup(0x00000000)                         = 0
8654:   ioctl(5, SIOCGLIFFLAGS, 0x080471A0)             = 0
8654:   so_socket(PF_INET, SOCK_DGRAM, IPPROTO_IP, 0x00000000, SOV_DEFAULT) = 6
8654:   ioctl(6, SIOCGLIFINDEX, 0x08046FB0)             = 0
8654:   close(6)                                        = 0
8654:   close(5)                                        = 0

So they seem to take different code paths based on whether it's inside a zone 
or not. I tracked it down to this bit of code:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cmd-inet/usr.lib/mdnsd/mDNSUNP.c#376

#ifdef HAVE_SOLARIS_ZONES
       /* Check the zone associated with the address */
       lifrcopy = *lifr;
       if (ioctl(sockfd, SIOCGLIFZONE, &lifrcopy) < 0) {
           /* interface removed */
           if (errno == ENXIO)
               continue;
           return(NULL);
       }
       if (lifrcopy.lifr_zoneid != getzoneid())
           continue;
#endif

getzoneid() is responsible for the zone_lookup system call. I have no idea why 
it gets called twice above and only once below. But I suspect this code is 
broken somehow.

If anyone has any ideas as to how to solve this, please let me know.

Cheers,

Alasdair
_______________________________________________
install-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/install-discuss

Reply via email to