diff options
| author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2006-02-19 23:28:57 +0000 | 
|---|---|---|
| committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2006-02-19 23:28:57 +0000 | 
| commit | bba061b0c38d6308a10c8ef543fa72c1e1c5fad7 (patch) | |
| tree | 27995c4e67035c0e97717dffb5c9fa6eb954c983 | |
| parent | 3f8227311e734f408e34d114be975f400b20c989 (diff) | |
 * add an option to make avahi-daemon using POINTOPOINT interfaces (disable by default)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1146 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
| -rw-r--r-- | avahi-core/core.h | 1 | ||||
| -rw-r--r-- | avahi-core/iface-linux.c | 2 | ||||
| -rw-r--r-- | avahi-core/iface-pfroute.c | 2 | ||||
| -rw-r--r-- | avahi-core/server.c | 1 | ||||
| -rw-r--r-- | avahi-daemon/avahi-daemon.conf | 1 | ||||
| -rw-r--r-- | avahi-daemon/main.c | 2 | ||||
| -rw-r--r-- | man/avahi-daemon.conf.5.xml.in | 7 | 
7 files changed, 14 insertions, 2 deletions
| diff --git a/avahi-core/core.h b/avahi-core/core.h index 62eeef6..d1c60cc 100644 --- a/avahi-core/core.h +++ b/avahi-core/core.h @@ -62,6 +62,7 @@ typedef struct AvahiServerConfig {      int disallow_other_stacks;        /**< Make sure that only one mDNS responder is run at the same time on the local machine. If this is enable Avahi will not set SO_REUSADDR on its sockets, effectively preventing other stacks from running on the local machine */      AvahiStringList *browse_domains;  /**< Additional browsing domains */      int disable_publishing;           /**< Disable publishing of any record */ +    int allow_point_to_point;         /**< Enable publishing on POINTOPOINT interfaces */  } AvahiServerConfig;  /** Allocate a new mDNS responder object. */ diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c index 985fe3f..910000d 100644 --- a/avahi-core/iface-linux.c +++ b/avahi-core/iface-linux.c @@ -98,7 +98,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat              (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) &&              !(ifinfomsg->ifi_flags & IFF_LOOPBACK) &&              (ifinfomsg->ifi_flags & IFF_MULTICAST) && -            !(ifinfomsg->ifi_flags & IFF_POINTOPOINT); +            (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT));          /* Handle interface attributes */          l = NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg)); diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c index cb47a0d..6fb6cfc 100644 --- a/avahi-core/iface-pfroute.c +++ b/avahi-core/iface-pfroute.c @@ -80,7 +80,7 @@ static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)      (!m->server->config.use_iff_running || (ifm->ifm_flags & IFF_RUNNING)) &&      !(ifm->ifm_flags & IFF_LOOPBACK) &&      (ifm->ifm_flags & IFF_MULTICAST) && -    !(ifm->ifm_flags & IFF_POINTOPOINT); +    (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT));    avahi_free(hw->name);    hw->name = avahi_strndup(sdl->sdl_data, sdl->sdl_nlen); diff --git a/avahi-core/server.c b/avahi-core/server.c index 017605e..4aa48a8 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -1538,6 +1538,7 @@ AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) {      c->disallow_other_stacks = 0;      c->browse_domains = NULL;      c->disable_publishing = 0; +    c->allow_point_to_point = 0;      return c;  } diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf index c99574f..d694d7b 100644 --- a/avahi-daemon/avahi-daemon.conf +++ b/avahi-daemon/avahi-daemon.conf @@ -30,6 +30,7 @@ use-ipv6=no  #use-iff-running=no  #enable-dbus=yes  #disallow-other-stacks=no +#allow-point-to-point=no  [wide-area]  enable-wide-area=yes diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 43ad74d..f32cbd6 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -487,6 +487,8 @@ static int load_config_file(DaemonConfig *c) {                      c->server_config.use_ipv6 = is_yes(p->value);                  else if (strcasecmp(p->key, "check-response-ttl") == 0)                      c->server_config.check_response_ttl = is_yes(p->value); +                else if (strcasecmp(p->key, "allow-point-to-point") == 0) +                    c->server_config.allow_point_to_point = is_yes(p->value);                  else if (strcasecmp(p->key, "use-iff-running") == 0)                      c->server_config.use_iff_running = is_yes(p->value);                  else if (strcasecmp(p->key, "disallow-other-stacks") == 0) diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in index cce8229..86df421 100644 --- a/man/avahi-daemon.conf.5.xml.in +++ b/man/avahi-daemon.conf.5.xml.in @@ -116,6 +116,13 @@          people this option defaults to "no".</p>        </option> +      <option> +        <p><opt>allow-point-to-point=</opt> Takes a boolean value +        ("yes" or "no"). If set to "yes", avahi-daemon will accept +	interfaces with the POINTOPOINT flag. This option defaults +	to "no" as it may be unreliable.</p> +      </option> +  	</section>  	<section name="Section [wide-area]"> | 
