* add an option to make avahi-daemon using POINTOPOINT interfaces (disable by default)
authorSebastien Estienne <sebastien.estienne@gmail.com>
Sun, 19 Feb 2006 23:28:57 +0000 (23:28 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Sun, 19 Feb 2006 23:28:57 +0000 (23:28 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1146 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/core.h
avahi-core/iface-linux.c
avahi-core/iface-pfroute.c
avahi-core/server.c
avahi-daemon/avahi-daemon.conf
avahi-daemon/main.c
man/avahi-daemon.conf.5.xml.in

index 62eeef6..d1c60cc 100644 (file)
@@ -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. */
index 985fe3f..910000d 100644 (file)
@@ -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));
index cb47a0d..6fb6cfc 100644 (file)
@@ -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);
index 017605e..4aa48a8 100644 (file)
@@ -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;
 }
index c99574f..d694d7b 100644 (file)
@@ -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
index 43ad74d..f32cbd6 100644 (file)
@@ -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)
index cce8229..86df421 100644 (file)
         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]">