commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 19/21: Fix crash on fsysopts when pfinet has no IPv6


From: Samuel Thibault
Subject: [hurd] 19/21: Fix crash on fsysopts when pfinet has no IPv6
Date: Tue, 04 Feb 2014 17:25:28 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 99c53218e3f0611eafde4f6375c4c5e4c2865875
Author: Samuel Thibault <address@hidden>
Date:   Thu Jan 30 01:20:23 2014 +0100

    Fix crash on fsysopts when pfinet has no IPv6
    
    * pfinet/options.c (add_dev_opts): Use a for loop over `idev->addr_list'
    instead of a while loop which assumes that it is not empty.
---
 pfinet/options.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pfinet/options.c b/pfinet/options.c
index 1d0a9e1..e9b81a9 100644
--- a/pfinet/options.c
+++ b/pfinet/options.c
@@ -540,16 +540,15 @@ trivfs_append_args (struct trivfs_control *fsys, char 
**argz, size_t *argz_len)
 
       if (idev)
        {
-         struct inet6_ifaddr *ifa = idev->addr_list;
+         struct inet6_ifaddr *ifa;
          static char addr_buf[INET6_ADDRSTRLEN];
 
          /* Push all IPv6 addresses assigned to the interface. */
-         do 
+         for (ifa = idev->addr_list; ifa; ifa = ifa->if_next)
            {
              inet_ntop (AF_INET6, &ifa->addr, addr_buf, INET6_ADDRSTRLEN);
              ADD_OPT ("--address6=%s/%d", addr_buf, ifa->prefix_len);
            }
-         while ((ifa = ifa->if_next));
 
          /* Last not least push --gateway6 option. */
          struct rt6_info *rt6i = ipv6_get_dflt_router ();

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]