[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-1-g3de647c
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-1-g3de647c |
Date: |
Fri, 17 Jul 2015 22:08:42 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 3de647c8548f30f882c6ad5088df9acdc8cda300 (commit)
from a95c081ab2edc53f51797780fcfc3737a9a60ac4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=3de647c8548f30f882c6ad5088df9acdc8cda300
commit 3de647c8548f30f882c6ad5088df9acdc8cda300
Author: Mats Erik Andersson <address@hidden>
Date: Fri Jul 17 23:02:37 2015 +0200
ifconfig: Sporadically appearing regression.
Device flags are sometimes calculated before their
query using SIOCGIFFLAGS. First observed on GNU/Hurd.
diff --git a/ChangeLog b/ChangeLog
index ea184b0..7f799da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-07-17 Mats Erik Andersson <address@hidden>
+
+ ifconfig: Sporadically appearing regression.
+ Device flags are sometimes calculated before their
+ query using SIOCGIFFLAGS. First observed on GNU/Hurd.
+
+ * ifconfig/printif.c (fh_brdaddr_query, fh_dstaddr_query):
+ Execute ioctl(SIOCGIFFLAGS) before calculating UFLAGS.
+
2015-05-27 Alfred M. Szmidt <address@hidden>
* Makefile.am (ACLOCAL_AMFLAGS): New variable.
diff --git a/ifconfig/printif.c b/ifconfig/printif.c
index 615a630..a269a50 100644
--- a/ifconfig/printif.c
+++ b/ifconfig/printif.c
@@ -719,24 +719,32 @@ fh_brdaddr_query (format_data_t form, int argc, char
*argv[])
# ifdef SIOCGIFFLAGS
int f;
int rev;
- unsigned int uflags = (unsigned short) form->ifr->ifr_flags;
+ unsigned int uflags;
-# ifdef ifr_flagshigh
+ f = if_nameztoflag ("BROADCAST", &rev);
+
+ if (f == 0 || (ioctl (form->sfd, SIOCGIFFLAGS, form->ifr) < 0))
+ {
+ select_arg (form, argc, argv, 1);
+ return;
+ }
+
+ uflags = (unsigned short) form->ifr->ifr_flags;
+# ifdef ifr_flagshigh
uflags |= (unsigned short) form->ifr->ifr_flagshigh << 16;
-# endif /* ifr_flagshigh */
+# endif /* ifr_flagshigh */
- if (0 == (f = if_nameztoflag ("BROADCAST", &rev))
- || (ioctl (form->sfd, SIOCGIFFLAGS, form->ifr) < 0)
- || ((f & uflags) == 0))
+ if ((f & uflags) == 0)
{
select_arg (form, argc, argv, 1);
return;
}
-# endif
+# endif /* SIOCGIFFLAGS */
+
if (ioctl (form->sfd, SIOCGIFBRDADDR, form->ifr) >= 0)
select_arg (form, argc, argv, 0);
else
-#endif
+#endif /* SIOCGIFBRDADDR */
select_arg (form, argc, argv, 1);
}
@@ -763,24 +771,32 @@ fh_dstaddr_query (format_data_t form, int argc, char
*argv[])
# ifdef SIOCGIFFLAGS
int f;
int rev;
- unsigned int uflags = (unsigned short) form->ifr->ifr_flags;
+ unsigned int uflags;
+
+ f = if_nameztoflag ("POINTOPOINT", &rev);
+ if (f == 0 || (ioctl (form->sfd, SIOCGIFFLAGS, form->ifr) < 0))
+ {
+ select_arg (form, argc, argv, 1);
+ return;
+ }
+
+ uflags = (unsigned short) form->ifr->ifr_flags;
# ifdef ifr_flagshigh
uflags |= (unsigned short) form->ifr->ifr_flagshigh << 16;
# endif /* ifr_flagshigh */
- if (0 == (f = if_nameztoflag ("POINTOPOINT", &rev))
- || (ioctl (form->sfd, SIOCGIFFLAGS, form->ifr) < 0)
- || ((f & uflags) == 0))
+ if ((f & uflags) == 0)
{
select_arg (form, argc, argv, 1);
return;
}
-# endif
+# endif /* SIOCGIFFLAGS */
+
if (ioctl (form->sfd, SIOCGIFDSTADDR, form->ifr) >= 0)
select_arg (form, argc, argv, 0);
else
-#endif
+#endif /* SIOCGIFDSTADDR */
select_arg (form, argc, argv, 1);
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
ifconfig/printif.c | 44 ++++++++++++++++++++++++++++++--------------
2 files changed, 39 insertions(+), 14 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-1-g3de647c,
Mats Erik Andersson <=