Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2014-07-18 06:39:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2014-07-13 
17:16:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes     2014-07-18 
06:40:28.000000000 +0200
@@ -1,0 +2,16 @@
+Thu Jul 17 10:52:53 CEST 2014 - snw...@suse.de
+
+- fix proxy handling in linuxrc
+- 5.0.0
+
+-------------------------------------------------------------------
+Wed Jul 16 16:32:51 CEST 2014 - snw...@suse.de
+
+- avoid server name resolution
+- don't resolve proxy name
+- enable ipv6 by default
+- clean up cifs and nfs code
+- fix segfault and accept ipv6 netmasks (bnc 887501)
+- 4.2.45
+
+-------------------------------------------------------------------

Old:
----
  linuxrc-4.2.44.tar.xz

New:
----
  linuxrc-5.0.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.l08Vdd/_old  2014-07-18 06:40:29.000000000 +0200
+++ /var/tmp/diff_new_pack.l08Vdd/_new  2014-07-18 06:40:29.000000000 +0200
@@ -25,9 +25,9 @@
 Summary:        SUSE Installation Program
 License:        GPL-3.0+
 Group:          System/Boot
-Version:        4.2.44
+Version:        5.0.0
 Release:        0
-Source:         linuxrc-4.2.44.tar.xz
+Source:         linuxrc-5.0.0.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ linuxrc-4.2.44.tar.xz -> linuxrc-5.0.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/VERSION new/linuxrc-5.0.0/VERSION
--- old/linuxrc-4.2.44/VERSION  2014-07-10 11:33:37.000000000 +0200
+++ new/linuxrc-5.0.0/VERSION   2014-07-17 10:52:44.000000000 +0200
@@ -1 +1 @@
-4.2.44
+5.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/changelog new/linuxrc-5.0.0/changelog
--- old/linuxrc-4.2.44/changelog        2014-07-10 11:33:40.000000000 +0200
+++ new/linuxrc-5.0.0/changelog 2014-07-17 10:52:46.000000000 +0200
@@ -1,4 +1,15 @@
-2014-07-10:    HEAD
+2014-07-17:    5.0.0
+       - fix proxy handling in linuxrc
+
+2014-07-16:    4.2.45
+       - avoid server name resolution
+       - don't resolve proxy name
+       - enable ipv6 by default
+       - clean up cifs and nfs code
+       - fix segfault and accept ipv6 netmasks (bnc 887501)
+       - clean up nfs code
+
+2014-07-10:    4.2.44
        - added 'defaultrepo' option to specify the repos to try if there's no 
'install' option given
        - rewrote ibft parser
        - bot options: make plymouth.enable an alias to plymouth (bnc #886136)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/file.c new/linuxrc-5.0.0/file.c
--- old/linuxrc-4.2.44/file.c   2014-07-10 10:59:52.000000000 +0200
+++ new/linuxrc-5.0.0/file.c    2014-07-17 10:51:20.000000000 +0200
@@ -1942,14 +1942,7 @@
 
   }
 
-  if(config.url.proxy) {
-    if(config.url.proxy->used.server.ok) {
-      file_write_inet2(f, key_proxy, &config.url.proxy->used.server, 
INET_WRITE_NAME_OR_IP);
-    }
-    if(config.url.proxy->port) fprintf(f, "ProxyPort: %u\n", 
config.url.proxy->port);
-    fprintf(f, "ProxyProto: http\n");
-    fprintf(f, "ProxyURL: %s\n", url_print(config.url.proxy, 1));
-  }
+  if(config.url.proxy) fprintf(f, "ProxyURL: %s\n", 
url_print(config.url.proxy, 1));
 
   file_write_modparms(f);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/linuxrc.c new/linuxrc-5.0.0/linuxrc.c
--- old/linuxrc-4.2.44/linuxrc.c        2014-07-10 11:28:00.000000000 +0200
+++ new/linuxrc-5.0.0/linuxrc.c 2014-07-16 16:00:50.000000000 +0200
@@ -763,6 +763,7 @@
   config.net.tftp_timeout = 10;
   config.net.ifconfig = 1;
   config.net.ipv4 = 1;
+  config.net.ipv6 = 1;
   config.net.setup = NS_DEFAULT;
   config.net.nameservers = 1;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/module.c new/linuxrc-5.0.0/module.c
--- old/linuxrc-4.2.44/module.c 2014-05-21 11:30:38.000000000 +0200
+++ new/linuxrc-5.0.0/module.c  2014-07-16 15:36:38.000000000 +0200
@@ -653,7 +653,7 @@
     param = sl->value;
   }
 
-  if(config.debug) fprintf(stderr, "mod_insmod(\"%s\", \"%s\")\n", module, 
param);
+  if(config.debug) fprintf(stderr, "mod_insmod(%s, %s)\n", module, param ?: 
"");
 
   if(!module || config.test) return 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/net.c new/linuxrc-5.0.0/net.c
--- old/linuxrc-4.2.44/net.c    2014-07-09 16:16:21.000000000 +0200
+++ new/linuxrc-5.0.0/net.c     2014-07-16 15:53:05.000000000 +0200
@@ -34,17 +34,7 @@
 #include <net/route.h>
 #include <netinet/in.h>
 #include <netinet/ether.h>
-#include <nfs/nfs.h>
 #include <sys/wait.h>
-#include "nfs_mount4.h"
-
-/* this is probably the wrong solution... */
-#ifndef NFS_FHSIZE
-#define NFS_FHSIZE 32
-#endif
-#ifndef NFS_PORT
-#define NFS_PORT 2049
-#endif
 
 #include <hd.h>
 
@@ -58,12 +48,6 @@
 #include "url.h"
 #include "auto2.h"
 
-#define NFS_PROGRAM    100003
-#define NFS_VERSION         2
-
-#if !defined(NETWORK_CONFIG)
-#  define NETWORK_CONFIG 1
-#endif
 
 static int net_activate4(void);
 static int net_activate6(void);
@@ -73,11 +57,8 @@
 #endif
 static void net_setup_nameserver(void);
 
-#if NETWORK_CONFIG
 static int net_choose_device(void);
 static int net_input_data(void);
-#endif
-static int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, 
unsigned port, int flags);
 
 static int wlan_auth_cb(dia_item_t di);
 
@@ -85,6 +66,7 @@
 static int parse_leaseinfo(char *file);
 static int net_wicked_dhcp(void);
 
+static void net_cifs_build_options(char **options, char *user, char *password, 
char *workgroup);
 static void net_ask_domain(void);
 static int ifcfg_write2(char *device, ifcfg_t *ifcfg, int initial);
 static int ifcfg_write(char *device, ifcfg_t *ifcfg);
@@ -187,7 +169,6 @@
 int net_config()
 {
   int rc = 0;
-#if NETWORK_CONFIG
   char buf[256];
 
   if(!config.win && !config.manual && config.ifcfg.if_up) return 0;
@@ -246,8 +227,6 @@
     if(!config.test) return rc = -1;
   }
 
-#endif
-
   return rc;
 }
 
@@ -933,25 +912,19 @@
 /*
  * Build mount option suitable for muont.cifs.
  */
-void net_smb_get_mount_options(char *options, inet_t *server, char *user, char 
*password, char *workgroup)
+void net_cifs_build_options(char **options, char *user, char *password, char 
*workgroup)
 {
   if(!options) return;
-  *options = 0;
 
-  if(!server) return;
-  sprintf(options,"ip=%s", inet_ntoa(server->ip));
+  str_copy(options, "ro");
 
   if(user) {
-    strcat(options, ",username=");
-    strcat(options, user);
-    strcat(options, ",password=");
-    strcat(options, password ?: "");
+    strprintf(options, "%s,username=%s,password=%s", *options, user, password 
?: "");
     if(workgroup) {
-      strcat(options, ",workgroup=");
-      strcat(options, workgroup);
+      strprintf(options, "%s,workgroup=%s", *options, workgroup);
     }
   } else {
-    strcat(options, ",guest");
+    strprintf(options, "%s,guest", *options);
   }
 }
 
@@ -971,9 +944,6 @@
  * password: password (NULL: no password)
  * workgroup: workgroup (NULL: no workgroup)
  *
- */
-
-/*
  * depending on guest login
  *   options += "guest"
  * resp.
@@ -984,176 +954,108 @@
  *   options += ",ip=" + SERVER_IP          falls SERVER_IP gesetzt ist
  * "  mount -t smbfs" + device + " " + mountpoint + " " + options
  */
-int net_mount_smb(char *mountpoint, inet_t *server, char *share, char *user, 
char *password, char *workgroup)
+int net_mount_cifs(char *mountpoint, inet_t *server, char *share, char *user, 
char *password, char *workgroup, char *options)
 {
-  char tmp[1024];
-  char mount_options[256];
+  char *cmd = NULL;
+  char *real_options = NULL;
+  int err;
 
-  if(!config.net.cifs.binary) return -2;
+  if(!config.net.cifs.binary || !server->name) return -2;
 
-  if(net_check_address(server, 1)) return -3;
+  mod_modprobe(config.net.cifs.module, NULL);
 
   if(!share) share = "";
   if(!mountpoint || !*mountpoint) mountpoint = "/";
 
-  net_smb_get_mount_options(mount_options, server, user, password, workgroup);
-
-  sprintf(tmp,
-    "%s //%s/%s %s -o ro,%s >&2",
-    config.net.cifs.binary, server->name, share, mountpoint, mount_options
-  );
-
-  mod_modprobe(config.net.cifs.module, NULL);
-
-  fprintf(stderr, "%s\n", tmp);
-
-  if(system(tmp)) return -1;
-
-  return 0;
-}
-
-
-int xdr_dirpath (XDR *xdrs, dirpath *objp)
-    {
-    if (!xdr_string(xdrs, objp, MNTPATHLEN))
-        return (FALSE);
-    else
-        return (TRUE);
-    }
-
+  net_cifs_build_options(&real_options, user, password, workgroup);
 
-int xdr_fhandle (XDR *xdrs, fhandle objp)
-    {
-    if (!xdr_opaque(xdrs, objp, FHSIZE))
-        return (FALSE);
-    else
-        return (TRUE);
+  if(options) {
+    if(*options == '-') {
+      str_copy(&real_options, options + 1);
     }
-
-
-int xdr_fhstatus (XDR *xdrs, fhstatus *objp)
-    {
-    if (!xdr_u_int(xdrs, &objp->fhs_status))
-        return (FALSE);
-
-    if (!objp->fhs_status)
-        if (!xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle))
-            return (FALSE);
-
-    return (TRUE);
+    else {
+      strprintf(&real_options, "%s,%s", real_options, options);
     }
+  }
 
+  strprintf(&cmd, "%s '//%s/%s' '%s' -o '%s' >&2", config.net.cifs.binary, 
server->name, share, mountpoint, real_options);
 
-/*
- * Mount NFS volume.
- *
- * Tries v3 first, then v2.
- *
- * mountpoint: mount point
- * server: server address
- * hostdir: directory on server
- *
- * config.net.nfs: nfs options
- *
- * return:
- *      0: ok
- *   != 0: error code
- *
- */
-int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port)
-{
-  int err, flags = NFS_MOUNT_NONLM;
+  fprintf(stderr, "%s\n", cmd);
 
-  if(!config.net.nfs.udp) flags |= NFS_MOUNT_TCP;
-  if(config.net.nfs.vers != 2) flags |= NFS_MOUNT_VER3;
+  err = system(cmd);
 
-  /* first, v3 with tcp */
-  err = _net_mount_nfs(mountpoint, server, hostdir, port, flags);
+  str_copy(&cmd, NULL);
+  str_copy(&real_options, NULL);
 
-  /* if that doesn't work, try v2, with udp */
-  if(err == EPROTONOSUPPORT) {
-    err = _net_mount_nfs(mountpoint, server, hostdir, port, NFS_MOUNT_NONLM);
-  }
-
-  return err;
+  return err ? -1 : 0;
 }
 
 
 /*
  * Mount NFS volume.
  *
- * Similar to net_mount_nfs() but lets you specify NFS mount flags.
- *
  * mountpoint: mount point
  * server: server address
  * hostdir: directory on server
- * flags: NFS mount flags
+ * options: NFS mount options
+ *
+ * config.net.nfs: nfs options if options == NULL
  *
- * config.net.nfs: nfs options
+ * options are added to any options linuxrc uses unless it is prefixed with 
'-'.
  *
  * return:
  *      0: ok
  *   != 0: error code
  *
  */
-int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port, int flags)
+int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port, char *options)
 {
-  int i = 0;
-  char addr[INET6_ADDRSTRLEN];
-  char *args[6];
-  char *path;
-  char options[4096];
-  int err, len = 0;
+  char *path = NULL;
+  char *real_options = NULL;
   pid_t mount_pid;
 
-  if(net_check_address(server, 1)) return -2;
+  if(!server->name) return -2;
 
   if(!hostdir) hostdir = "/";
   if(!mountpoint || !*mountpoint) mountpoint = "/";
 
   mount_pid = fork();
-  if (mount_pid < 0) {
+  if(mount_pid < 0) {
     perror("fork");
+
     return mount_pid;
-  } else if (mount_pid > 0) {
+  }
+  else if(mount_pid > 0) {
     int err;
     pid_t pid;
     while((pid = waitpid(-1, &err, 0)) && pid != mount_pid);
+
     return WEXITSTATUS(err);
   }
 
-  if (server->ipv4)
-    err = asprintf(&path, "%s:%s",
-                  inet_ntop(AF_INET, &server->ip.s_addr, addr,
-                            INET_ADDRSTRLEN), hostdir);
-  else
-    err = asprintf(&path, "[%s]:%s",
-                  inet_ntop(AF_INET6, &server->ip6.s6_addr, addr,
-                            INET6_ADDRSTRLEN), hostdir);
-  if (err < 0) {
-    perror("asprintf");
-    return err;
-  }
-
-  len = snprintf(options, sizeof(options), "%s%s%sretrans=%d,timeo=%d",
-                flags & NFS_MOUNT_TCP ? "tcp," : "",
-                flags & NFS_MOUNT_VER3 ? "vers=3," : "",
-                flags & NFS_MOUNT_NONLM ? "nolock," : "",
-                3, 7);
-
-  if (config.net.nfs.rsize && len < sizeof(options))
-    len += snprintf(options, sizeof(options) - len,
-                   ",rsize=%d", config.net.nfs.rsize);
-  if (config.net.nfs.wsize && len < sizeof(options))
-    len += snprintf(options, sizeof(options) - len,
-                   ",wsize=%d", config.net.nfs.wsize);
-
-  args[i++] = "mount";
-  args[i++] = "-o";
-  args[i++] = options;
-  args[i++] = path;
-  args[i++] = mountpoint;
-  args[i++] = NULL;
+  if(strchr(server->name, ':')) {
+    strprintf(&path, "[%s]:%s", server->name, hostdir);
+  }
+  else {
+    strprintf(&path, "%s:%s", server->name, hostdir);
+  }
+
+  str_copy(&real_options, "nolock");
+
+  if(!options) options = config.net.nfs.opts;
+
+  if(options) {
+    if(*options == '-') {
+      str_copy(&real_options, options + 1);
+    }
+    else {
+      strprintf(&real_options, "%s,%s", real_options, options);
+    }
+  }
+
+  if(config.debug) fprintf(stderr, "mount -o '%s' '%s' '%s'\n", real_options, 
path, mountpoint);
+
+  char *args[6] = { "mount", "-o", real_options, path, mountpoint /*, NULL */ 
};
 
   signal(SIGUSR1, SIG_IGN);
   execvp("mount", args);
@@ -1162,7 +1064,6 @@
 }
 
 
-#if NETWORK_CONFIG
 /*
  * Let user select a network interface.
  *
@@ -1408,7 +1309,6 @@
 
   return choice > 0 ? 0 : -1;
 }
-#endif
 
 
 /*
@@ -1467,7 +1367,6 @@
 }
 
 
-#if NETWORK_CONFIG
 /*
  * Let user enter some network config data.
  *
@@ -1563,7 +1462,6 @@
 
   return 0;
 }
-#endif
 
 
 /*
@@ -2717,6 +2615,7 @@
   if(!config.ifcfg.list) return;
 
   update_device_list(0);
+  // list of network cards (this will exclude, e.g., 'lo')
   net_list = hd_list(config.hd_data, hw_network_ctrl, 0, NULL);
 
   // 1st, all explicitly named interfaces
@@ -2849,14 +2748,8 @@
       config.net.netmask.ok &&
       config.net.netmask.ip.s_addr
     ) {
-      int i = 1;
-      uint32_t u = ntohl(config.net.netmask.ip.s_addr);
-
-      while(u <<= 1) i++;
-
-      if(config.debug) fprintf(stderr, "netmask to prefix: %d\n", i);
-
-      config.net.hostname.prefix4 = i;
+      int i = netmask_to_prefix(config.net.netmask.name);
+      if(i >= 0) config.net.hostname.prefix4 = i;
     }
   }
 
@@ -2932,17 +2825,17 @@
         str_copy(&sl->value, device);
       }
 
-      sl0 = slist_split(' ', ifcfg->ip);
-
-      if(!sl0->next) {
-        sl = slist_append_str(&sl_ifcfg, "IPADDR");
-        str_copy(&sl->value, sl0->key);
-      }
-      else {
-        for(i = 0, sl1 = sl0; sl1; sl1 = sl1->next) {
-          sl = slist_append(&sl_ifcfg, slist_new());
-          strprintf(&sl->key, "IPADDR_%d", ++i);
-          str_copy(&sl->value, sl1->key);
+      if((sl0 = slist_split(' ', ifcfg->ip))) {
+        if(!sl0->next) {
+          sl = slist_append_str(&sl_ifcfg, "IPADDR");
+          str_copy(&sl->value, sl0->key);
+        }
+        else {
+          for(i = 0, sl1 = sl0; sl1; sl1 = sl1->next) {
+            sl = slist_append(&sl_ifcfg, slist_new());
+            strprintf(&sl->key, "IPADDR_%d", ++i);
+            str_copy(&sl->value, sl1->key);
+          }
         }
       }
 
@@ -3269,3 +3162,48 @@
   str_copy(&buf, NULL);
 }
 
+
+/*
+ * Convert netmask string to network prefix bits.
+ * Both ipv4 and ipv6 forms are allowed.
+ *
+ * Return -1 if it fails.
+ */
+int netmask_to_prefix(char *netmask)
+{
+  int prefix = -1;
+  uint32_t u;
+  struct in_addr ip4;
+  struct in6_addr ip6;
+
+  if(netmask) {
+    if(strchr(netmask, ':')) {
+      if(inet_pton(AF_INET6, netmask, &ip6) > 0) {
+        prefix = 0;
+        for(u = 0; u < 16 && ip6.s6_addr[u] == 0xff; u++) {
+          prefix += 8;
+        }
+        if(u < 16) {
+          for(u = ip6.s6_addr[u]; u & 0x80; u <<= 1, prefix++);
+        }
+      }
+    }
+    else {
+      if(inet_pton(AF_INET, netmask, &ip4) > 0) {
+        u = ntohl(ip4.s_addr);
+        if(u == 0) {
+          prefix = 0;
+        }
+        else {
+          prefix = 1;
+          while(u <<= 1) prefix++;
+        }
+      }
+    }
+  }
+
+  if(config.debug) fprintf(stderr, "netmask -> prefix: %s -> %d\n", netmask, 
prefix);
+
+  return prefix;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/net.h new/linuxrc-5.0.0/net.h
--- old/linuxrc-4.2.44/net.h    2014-07-08 14:12:11.000000000 +0200
+++ new/linuxrc-5.0.0/net.h     2014-07-16 15:34:06.000000000 +0200
@@ -9,9 +9,8 @@
 int net_config(void);
 int net_config2(int type);
 void net_ask_password(void);
-int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port);
-int net_mount_smb(char *mountpoint, inet_t *server, char *hostdir, char *user, 
char *password, char *workgroup);
-void net_smb_get_mount_options(char *options, inet_t *server, char *user, char 
*password, char *workgroup);
+int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port, char *options);
+int net_mount_cifs(char *mountpoint, inet_t *server, char *hostdir, char 
*user, char *password, char *workgroup, char *options);
 void net_stop(void);
 int net_check_address(inet_t *inet, int do_dns);
 int net_activate_ns(void);
@@ -30,3 +29,4 @@
 void net_update_state(void);
 void net_wicked_up(char *ifname);
 void net_wicked_down(char *ifname);
+int netmask_to_prefix(char *netmask);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/url.c new/linuxrc-5.0.0/url.c
--- old/linuxrc-4.2.44/url.c    2014-07-09 15:41:13.000000000 +0200
+++ new/linuxrc-5.0.0/url.c     2014-07-17 10:38:29.000000000 +0200
@@ -99,28 +99,17 @@
   curl_easy_setopt(c_handle, CURLOPT_PROGRESSDATA, url_data);
   curl_easy_setopt(c_handle, CURLOPT_NOPROGRESS, 0);
 
-  if(config.net.ipv6) {
-    curl_easy_setopt(c_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
-  }
-
   url_data->err = curl_easy_setopt(c_handle, CURLOPT_URL, url_data->url->str);
-  // fprintf(stderr, "curl opt url = %d\n", url_data->err);
 
+  if(config.debug >= 2) fprintf(stderr, "curl opt url = %d (%s)\n", 
url_data->err, url_data->curl_err_buf);
   if(config.debug >= 2) fprintf(stderr, "url_read(%s)\n", url_data->url->str);
 
   str_copy(&proxy_url, url_print(config.url.proxy, 1));
   if(proxy_url) {
     if(config.debug >= 2) fprintf(stderr, "using proxy %s\n", proxy_url);
     name2inet(&config.url.proxy->used.server, config.url.proxy->server);
-    if(net_check_address(&config.url.proxy->used.server, 1)) {
-      snprintf(url_data->err_buf, url_data->err_buf_len, "invalid proxy 
address: %s", config.url.proxy->used.server.name);
-      fprintf(stderr, "%s\n", url_data->err_buf);
-      url_data->err = 105;
-    }
-    else {
-      curl_easy_setopt(c_handle, CURLOPT_PROXY, proxy_url);
-      if(config.debug >= 2) fprintf(stderr, "proxy: %s\n", proxy_url);
-    }
+    curl_easy_setopt(c_handle, CURLOPT_PROXY, proxy_url);
+    if(config.debug >= 2) fprintf(stderr, "proxy: %s\n", proxy_url);
   }
 
   if(url_data->progress) url_data->progress(url_data, 0);
@@ -135,7 +124,7 @@
     url_write_cb(NULL, 0, 0, url_data);
   }
 
-  // fprintf(stderr, "curl perform = %d (%s)\n", url_data->err, 
url_data->err_buf);
+  if(config.debug >= 2) fprintf(stderr, "curl perform = %d (%s)\n", 
url_data->err, url_data->curl_err_buf);
 
   if(url_data->f) {
     i = url_data->pipe_fd >= 0 ? pclose(url_data->f) : fclose(url_data->f);
@@ -339,7 +328,7 @@
 /*
  * scheme://domain;user:password@server:port/path?query
  *
- * smb: path = share/path
+ * cifs: path = share/path
  * disk: path = [device/]path
  */
 
@@ -449,7 +438,7 @@
     tmp = NULL;
   }
 
-  /* smb: first path element is share */
+  /* cifs: first path element is share */
   if(url->scheme == inst_smb && url->path) {
     url->share = url->path;
     url->path = NULL;
@@ -815,6 +804,21 @@
     }
   }
 
+  if(
+    config.url.proxy &&
+    config.url.proxy->server && (
+      url->scheme == inst_http ||
+      url->scheme == inst_https ||
+      url->scheme == inst_ftp ||
+      url->scheme == inst_tftp
+    )
+  ) {
+    strprintf(&buf, "%s%cproxy=%s", buf, q++ ? '&' : '?', 
config.url.proxy->server);
+    if(config.url.proxy->port) strprintf(&buf, "%s%cproxyport=%u", buf, q++ ? 
'&' : '?', config.url.proxy->port);
+    if(config.url.proxy->user) strprintf(&buf, "%s%cproxyuser=%s", buf, q++ ? 
'&' : '?', config.url.proxy->user);
+    if(config.url.proxy->password) strprintf(&buf, "%s%cproxypass=%s", buf, 
q++ ? '&' : '?', config.url.proxy->password);
+  }
+
   if(url->is.file && file) {
     strprintf(&buf, "iso:/?iso=%s&url=%s", file, buf);
   }
@@ -1157,6 +1161,9 @@
   else {
     /* network device */
 
+    slist_t *options_sl = slist_getentry(url->query, "options");
+    char *options = options_sl ? options_sl->value : NULL;
+
     switch(url->scheme) {
       case inst_nfs:
         str_copy(&url->mount, dir ?: new_mountpoint());
@@ -1164,7 +1171,7 @@
         if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
 
         if(!url->is.file) {
-          err = net_mount_nfs(url->mount, &url->used.server, url->path, 
url->port);
+          err = net_mount_nfs(url->mount, &url->used.server, url->path, 
url->port, options);
           fprintf(stderr, "nfs: %s -> %s (%d)\n", url->path, url->mount, err);
         }
         else {
@@ -1181,7 +1188,7 @@
 
             if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
 
-            err = net_mount_nfs(url->tmp_mount, &url->used.server, buf, 
url->port);
+            err = net_mount_nfs(url->tmp_mount, &url->used.server, buf, 
url->port, options);
             fprintf(stderr, "nfs: %s -> %s (%d)\n", buf, url->tmp_mount, err);
     
             if(err) {
@@ -1212,8 +1219,8 @@
 
         if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
 
-        err = net_mount_smb(s, &url->used.server, url->share, url->user, 
url->password, url->domain);
-        fprintf(stderr, "smb: %s -> %s (%d)\n", url->share, s, err);
+        err = net_mount_cifs(s, &url->used.server, url->share, url->user, 
url->password, url->domain, options);
+        fprintf(stderr, "cifs: %s -> %s (%d)\n", url->share, s, err);
         if(err) {
           str_copy(&url->tmp_mount, NULL);
           str_copy(&url->mount, NULL);
@@ -2246,17 +2253,7 @@
   }
   else {
     ok = url_setup_interface(url);
-
-    if(ok) {
-      name2inet(&url->used.server, url->server);
-
-      if(net_check_address(&url->used.server, 1)) {
-        fprintf(stderr, "invalid server address: %s\n", url->used.server.name);
-        config.net.configured = nc_none;
-
-        ok = 0;
-      }
-    }
+    if(ok) name2inet(&url->used.server, url->server);
   }
 
   return ok;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.44/util.c new/linuxrc-5.0.0/util.c
--- old/linuxrc-4.2.44/util.c   2014-07-10 11:00:16.000000000 +0200
+++ new/linuxrc-5.0.0/util.c    2014-07-16 14:05:38.000000000 +0200
@@ -4359,26 +4359,15 @@
       strprintf(&attr, "%s/subnet-mask", sysfs_ibft);
       s = util_get_attr(attr);
       fprintf(stderr, "ibft: subnet-mask = %s\n", s);
-
-      if(*s) {
-        inet_t netmask = {};
-        int i = 1;
-        uint32_t u;
-
-        name2inet(&netmask, s);
-        net_check_address(&netmask, 0);
-        if(netmask.ok && netmask.ip.s_addr) {
-          u = ntohl(netmask.ip.s_addr);
-          while(u <<= 1) i++;
-          prefix = i;
-        }
-      }
+      prefix = netmask_to_prefix(s);
 
       strprintf(&attr, "%s/ip-addr", sysfs_ibft);
       s = util_get_attr(attr);
-      fprintf(stderr, "ibft: ip-addr = %s/%d\n", s, prefix);
-
-      if(*s && prefix > 0) str_copy(&ifcfg->ip, s);
+      if(*s) {
+        str_copy(&ifcfg->ip, s);
+        if(prefix > 0) strprintf(&ifcfg->ip, "%s/%d", ifcfg->ip, prefix);
+      }
+      fprintf(stderr, "ibft: ip-addr = %s\n", ifcfg->ip ?: "");
 
       strprintf(&attr, "%s/gateway", sysfs_ibft);
       s = util_get_attr(attr);

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to