]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntp_io.c:
authorFrank Kardel <kardel@ntp.org>
Wed, 24 Aug 2005 21:42:33 +0000 (21:42 +0000)
committerFrank Kardel <kardel@ntp.org>
Wed, 24 Aug 2005 21:42:33 +0000 (21:42 +0000)
  fix interface number log output

bk: 430ce9c9rky8QyhS_TBpGqc-f7YR2g

ntpd/ntp_io.c

index 78bd20e267eef3587bf30c569f2eaa61978d5f7b..e4e1d54091ea17e2748a52726cd2eb03738603a4 100644 (file)
@@ -399,14 +399,15 @@ interface_dump(struct interface *itf)
 static void
 print_interface(struct interface *iface, char *pfx, char *sfx)
 {
-       printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, scope=%d",
+       printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, scope=%d, ifindex=%d",
               pfx,
-              iface->ifindex,
+              iface->ifnum,
               iface->fd,
               iface->bfd,
               iface->name,
               iface->flags,
-              iface->scopeid);
+              iface->scopeid,
+              iface->ifindex);
        /* Leave these as three printf calls. */
        printf(", sin=%s",
               stoa((&iface->sin)));
@@ -527,7 +528,7 @@ remove_interface(struct interface *interface)
        if (interface->fd != INVALID_SOCKET) 
        {
                msyslog(LOG_INFO, "Deleting interface #%d %s, %s#%d",
-                       interface->ifindex,
+                       interface->ifnum,
                        interface->name,
                        stoa((&interface->sin)),
                        NTP_PORT);  /* XXX should extract port from sin structure */
@@ -537,7 +538,7 @@ remove_interface(struct interface *interface)
        if (interface->bfd != INVALID_SOCKET) 
        {
                msyslog(LOG_INFO, "Deleting interface #%d %s, broadcast address %s#%d",
-                       interface->ifindex,
+                       interface->ifnum,
                        interface->name,
                        stoa((&interface->bcast)),
                        (u_short) NTP_PORT);  /* XXX extract port from sin structure */