• February 22, 2025, 03:15:24 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Bonjour (built-in) on 1.10b5  (Read 11828 times)

thebeck

  • Level 2 Member
  • **
  • Posts: 47
Bonjour (built-in) on 1.10b5
« on: March 04, 2011, 11:15:16 AM »

Hi D-Link

Follow up to this forum thread:  http://forums.dlink.com/index.php?topic=6405.0

I have been playing around with the now built-in bonjour service, which is still the old howl implementation (/usr/sbin/mDNSResponsder -v gives version 1.0.0 from the year 2005).  While the howl implementation has several issues (see http://forums.dlink.com/index.php?topic=6405.0), the one benefit of it being an add-on is that additional services can be added (e.g., afp via ffp netatalk) to the mDNSResponder.conf file.  Now that it is built-in, the mDNSResponder.conf file is in flash and reset on each reboot.

So, couple all the issues from http://forums.dlink.com/index.php?topic=6405.0 (I won't repeat them all here) with the fact that I can no longer extend the services offered means I will have to write a fun_plug just to "kill" the mDNSResponder so that I can run a much more stable zeroconfig implementation (i.e., avahi).

Since I did not see it in the admin UI, can you please add an admin configuration to let users "turn off" the built-in bonjour service just like UPnP, FTP, iTunes and others?
Logged
1) DNS-323 2x1.0TB (WD10EACS)-RAID 1 EXT3-1.08: Mac "Time Capsule"
2) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Copy of #1 + other stuff
3) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Remote mirrored backup of #2
4) DNS-323 2x500MB-RAID 1 EXT3-1.10b5: Playground

ffp 0.5 on all

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Bonjour (built-in) on 1.10b5
« Reply #1 on: March 04, 2011, 12:41:34 PM »

Not being able to turn this service off is probably not a good idea. I have no use for it, and would rather use the oh-so-precious RAM is uses for other things.
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

dmulligan

  • Level 1 Member
  • *
  • Posts: 1
Re: Bonjour (built-in) on 1.10b5
« Reply #2 on: March 08, 2011, 09:42:01 PM »

+1, please make this configurable.
Logged

thebeck

  • Level 2 Member
  • **
  • Posts: 47
Re: Bonjour (built-in) on 1.10b5
« Reply #3 on: March 11, 2011, 08:04:31 AM »

Hi D-Link Multimedia moderator,

Any chance you make the bonjour support configurable via the admin user interface?

Specifically, the ability to enable/disable.
Logged
1) DNS-323 2x1.0TB (WD10EACS)-RAID 1 EXT3-1.08: Mac "Time Capsule"
2) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Copy of #1 + other stuff
3) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Remote mirrored backup of #2
4) DNS-323 2x500MB-RAID 1 EXT3-1.10b5: Playground

ffp 0.5 on all

D-Link Multimedia

  • Poweruser
  • Level 7 Member
  • **
  • Posts: 1066
    • D-link Systems, Inc.
Re: Bonjour (built-in) on 1.10b5
« Reply #4 on: March 11, 2011, 09:47:27 AM »

Hi D-Link Multimedia moderator,

Any chance you make the bonjour support configurable via the admin user interface?

Specifically, the ability to enable/disable.

A user configurable option will not be implemented in 1.10.
Logged

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Bonjour (built-in) on 1.10b5
« Reply #5 on: March 11, 2011, 10:09:11 AM »

A user configurable option will not be implemented in 1.10.

Bad call, imho. Can you, at least, provide a method to turn it off from a fun-plug?
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

D-Link Multimedia

  • Poweruser
  • Level 7 Member
  • **
  • Posts: 1066
    • D-link Systems, Inc.
Re: Bonjour (built-in) on 1.10b5
« Reply #6 on: March 11, 2011, 10:29:49 AM »

Bad call, imho. Can you, at least, provide a method to turn it off from a fun-plug?

There is plenty of information on how to do that on the other forum.
Logged

thebeck

  • Level 2 Member
  • **
  • Posts: 47
Re: Bonjour (built-in) on 1.10b5
« Reply #7 on: March 11, 2011, 08:09:05 PM »

Echoing scaramanga's sentiments...

I think it is pretty sad that D-Link is using an extremely old zeroconf solution knowing full well (a) it is unsupported by the author, (b) there is an open source solution that is awesome (i.e., avahi) and kept up to date, and (c) Apple's own implementation of bonjour has seen many updates since 2005, which is the last time Porchdog made any real updates to their howl implementation.

In any event, when you start avahi via ffp using a shell script in the start directory, you will need to do something like the following (look for the kill statement inside the start function):
Code: [Select]
#!/ffp/bin/sh

# PROVIDE:
# REQUIRE:
# BEFORE:

. /ffp/etc/ffp.subr

name="avahi-daemon"
start_cmd="avahid_start"
stop_cmd="avahid_stop"
status_cmd="avahid_status"

avahid_check_user_group()
{
    export GROUP_CHK=`cat /etc/group | grep avahi`

    if [ "${GROUP_CHK}" = "" ]; then
       groupadd avahi -g 1000
       export GROUP_ADD="true"
    else
       export GROUP_ADD="false"
    fi

    export USER_CHK=`cat /etc/passwd | grep avahi`

    if [ "${USER_CHK}" = "" ]; then
       adduser -S -G avahi -D -H avahi
       export USER_ADD="true"
    else
       export USER_ADD="false"
    fi

    if [ "${GROUP_ADD}" = "true" -o "${USER_ADD}" = "true" ]; then
       /ffp/sbin/store-passwd.sh
    fi
}

avahid_start()
{
    avahid_check_user_group

    kill -9 `pidof mDNSResponder`

    export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v start`
    if [ "${AVAHID_CHK}" = "" ]; then
       if [ -f /ffp/var/run/avahi-daemon/pid ]; then
          rm -f /ffp/var/run/avahi-daemon/pid
       fi
    fi

    if [ -e /ffp/sbin/avahi-daemon ]; then
       /ffp/sbin/avahi-daemon -V

       /ffp/sbin/avahi-daemon -c
       if [ "$?" -ne "0" ]; then
          if [ -f /ffp/var/run/avahi-daemon/pid ]; then
             rm -f /ffp/var/run/avahi-daemon/pid
          fi

          echo "Starting..."
          /ffp/sbin/avahi-daemon -f /ffp/etc/avahi/avahi-daemon.conf -D
       else
          echo "Already Running"
       fi
    else
       echo "No Binary"
    fi
}

avahid_stop()
{
    export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v stop`
    if [ "${AVAHID_CHK}" = "" ]; then
       if [ -f /ffp/var/run/avahi-daemon/pid ]; then
          rm -f /ffp/var/run/avahi-daemon/pid
       fi
    fi

    if [ -e /ffp/sbin/avahi-daemon ]; then
       /ffp/sbin/avahi-daemon -V

       /ffp/sbin/avahi-daemon -c
       if [ "$?" -ne "0" ]; then
          echo "Not Running"
       else
          echo "Stopping..."
          /ffp/sbin/avahi-daemon -k
       fi
    else
       echo "No Binary"
    fi

    if [ -f /ffp/var/run/avahi-daemon/pid ]; then
       rm -f /ffp/var/run/avahi-daemon/pid
    fi
}

avahid_status()
{
    export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v status`
    if [ "${AVAHID_CHK}" = "" ]; then
       if [ -f /ffp/var/run/avahi-daemon/pid ]; then
          rm -f /ffp/var/run/avahi-daemon/pid
       fi
    fi

    if [ -e /ffp/sbin/avahi-daemon ]; then
       /ffp/sbin/avahi-daemon -V

       /ffp/sbin/avahi-daemon -c
       if [ "$?" -ne "0" ]; then
          echo "Not Running"

          if [ -f /ffp/var/run/avahi-daemon/pid ]; then
             rm -f /ffp/var/run/avahi-daemon/pid
          fi
       else
          echo "Running"
       fi
    else
       echo "No Binary"
    fi
}

run_rc_command "$1"

Note:  I suppose I could use the pidof technique in other places in the shell script (instead of the multiple grep statements), but you get the idea.
« Last Edit: March 11, 2011, 08:12:45 PM by thebeck »
Logged
1) DNS-323 2x1.0TB (WD10EACS)-RAID 1 EXT3-1.08: Mac "Time Capsule"
2) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Copy of #1 + other stuff
3) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Remote mirrored backup of #2
4) DNS-323 2x500MB-RAID 1 EXT3-1.10b5: Playground

ffp 0.5 on all

D-Link Multimedia

  • Poweruser
  • Level 7 Member
  • **
  • Posts: 1066
    • D-link Systems, Inc.
Re: Bonjour (built-in) on 1.10b5
« Reply #8 on: March 14, 2011, 10:22:17 AM »

Just to be clear, we would prefer to use Avahi however there is no flash space for avahi at this time.
Logged

thebeck

  • Level 2 Member
  • **
  • Posts: 47
Re: Bonjour (built-in) on 1.10b5
« Reply #9 on: March 14, 2011, 10:33:40 AM »

Great!!!

What about providing avahi as an add-on, instead?

Prior to 1.10, your zeroconf solution was an add-on, so perhaps you can shed some light as to why the move to providing zeroconf in the firmware?

I would bet there are others who would like to see a move to a newer linux kernel, upgraded busybox (1.18.4 vs. pre-1.0), upgraded samba (3.5.8 vs. 3.0.24) or other features rather than providing zeroconf built in.

Looking forward to your thoughts.
« Last Edit: March 14, 2011, 01:31:05 PM by thebeck »
Logged
1) DNS-323 2x1.0TB (WD10EACS)-RAID 1 EXT3-1.08: Mac "Time Capsule"
2) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Copy of #1 + other stuff
3) DNS-343 4x2.0TB (WD20EADS)-RAID 5 EXT3-1.03: Remote mirrored backup of #2
4) DNS-323 2x500MB-RAID 1 EXT3-1.10b5: Playground

ffp 0.5 on all